Comparing version 0.0.23 to 0.0.24
@@ -0,0 +0,0 @@ import { HTTPClient, HTTPRequestOptions } from "../interfaces/HTTPClient"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { StorageAdapter } from "../interfaces/StorageAdapter"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { HTTPClient } from "./interfaces/HTTPClient"; |
@@ -70,14 +70,20 @@ "use strict"; | ||
while (!res || !res.refresh_token) { | ||
res = yield this.httpClient.request({ | ||
method: HTTPClient_1.HTTPRequestMethod.POST, | ||
url: "https://oauth2.googleapis.com/token", | ||
data: JSON.stringify({ | ||
client_id: CLIENT_ID, | ||
client_secret: CLIENT_SECRET, | ||
device_code: deviceCode, | ||
grant_type: "urn:ietf:params:oauth:grant-type:device_code" | ||
}) | ||
}); | ||
res = JSON.parse(res.data); | ||
yield new Promise(resolve => setTimeout(resolve, 5000)); | ||
try { | ||
res = yield this.httpClient.request({ | ||
method: HTTPClient_1.HTTPRequestMethod.POST, | ||
url: "https://oauth2.googleapis.com/token", | ||
data: JSON.stringify({ | ||
client_id: CLIENT_ID, | ||
client_secret: CLIENT_SECRET, | ||
device_code: deviceCode, | ||
grant_type: "urn:ietf:params:oauth:grant-type:device_code" | ||
}) | ||
}); | ||
res = JSON.parse(res.data); | ||
yield new Promise(resolve => setTimeout(resolve, 5000)); | ||
} | ||
catch (err) { | ||
if (constants_1.DEBUG) | ||
console.log("[AUTHENTICATOR] Failed to recieve Token with Code:\n", err); | ||
} | ||
} | ||
@@ -84,0 +90,0 @@ this.token = { type: null, access: null, refresh: res.refresh_token, expireDate: null }; |
@@ -0,0 +0,0 @@ export declare const DEBUG = false; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { WrappedHTTPClient } from "../WrappedHTTPClient"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { WrappedHTTPClient } from "../WrappedHTTPClient"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { ContinuatedList, WrappedHTTPClient } from "../main"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { WrappedHTTPClient } from "../WrappedHTTPClient"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { WrappedHTTPClient } from "../WrappedHTTPClient"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { Channel } from "../interfaces/Channel"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { WrappedHTTPClient } from "../main"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { WrappedHTTPClient } from "../WrappedHTTPClient"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { WrappedHTTPClient } from "../WrappedHTTPClient"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { List } from "../main"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export interface CaptionTrack { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -0,0 +0,0 @@ import { ContinuatedList, Thumbnail, ChannelBadge, WrappedHTTPClient } from "../main"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export interface ChannelBadge { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -0,0 +0,0 @@ import { Thumbnail } from "../main"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -0,0 +0,0 @@ import { Channel, WrappedHTTPClient } from "../main"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { WrappedHTTPClient, Comment, CommentThreadRepliesContinuatedList } from "../main"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export interface HTTPClient { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { Video, Channel, Playlist, Comment, CommentThread } from "../main"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { PlaylistContinuatedList } from "../fetchers/PlaylistContinuatedList"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export interface StorageAdapter { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -0,0 +0,0 @@ export interface Thumbnail { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -0,0 +0,0 @@ import { CommentSectionContinuatedList, ContinuatedList, WrappedHTTPClient, Channel, Thumbnail, CaptionTrack, CommentThread } from "../main"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { Authenticator } from "./Authenticator"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { Explorer } from "./fetchers/Explorer"; |
@@ -0,0 +0,0 @@ "use strict"; |
import { IYoutube } from "./main"; | ||
declare const _default: IYoutube; | ||
export default _default; |
@@ -0,0 +0,0 @@ "use strict"; |
import { IYoutube } from "./main"; | ||
declare const _default: IYoutube; | ||
export default _default; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { HTTPClient, HTTPMap, HTTPRequestOptions } from "./interfaces/HTTPClient"; |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "iyoutube", | ||
"version": "0.0.23", | ||
"version": "0.0.24", | ||
"description": "The ultimate unofficial YouTube API Client for Javascript", | ||
@@ -5,0 +5,0 @@ "main": "output/main.js", |
@@ -0,0 +0,0 @@ <h1 align="center">IYoutube</h1> |
@@ -0,0 +0,0 @@ import { HTTPClient, HTTPRequestOptions } from "../interfaces/HTTPClient"; |
@@ -0,0 +0,0 @@ import { StorageAdapter } from "../interfaces/StorageAdapter"; |
@@ -62,14 +62,19 @@ import { CONSOLE_COLORS, DEBUG } from "./constants"; | ||
while(!res || !res.refresh_token) { | ||
res = await this.httpClient.request({ | ||
method: HTTPRequestMethod.POST, | ||
url: "https://oauth2.googleapis.com/token", | ||
data: JSON.stringify({ | ||
client_id: CLIENT_ID, | ||
client_secret: CLIENT_SECRET, | ||
device_code: deviceCode, | ||
grant_type: "urn:ietf:params:oauth:grant-type:device_code" | ||
}) | ||
}); | ||
res = JSON.parse(res.data); | ||
await new Promise(resolve => setTimeout(resolve, 5000)); | ||
try { | ||
res = await this.httpClient.request({ | ||
method: HTTPRequestMethod.POST, | ||
url: "https://oauth2.googleapis.com/token", | ||
data: JSON.stringify({ | ||
client_id: CLIENT_ID, | ||
client_secret: CLIENT_SECRET, | ||
device_code: deviceCode, | ||
grant_type: "urn:ietf:params:oauth:grant-type:device_code" | ||
}) | ||
}); | ||
res = JSON.parse(res.data); | ||
await new Promise(resolve => setTimeout(resolve, 5000)); | ||
} catch(err) { | ||
if(DEBUG) console.log("[AUTHENTICATOR] Failed to recieve Token with Code:\n", err); | ||
} | ||
} | ||
@@ -76,0 +81,0 @@ |
@@ -0,0 +0,0 @@ export const DEBUG = false; |
@@ -0,0 +0,0 @@ import { ENDPOINT_NEXT } from "../constants"; |
@@ -0,0 +0,0 @@ import { ENDPOINT_NEXT } from "../constants"; |
@@ -0,0 +0,0 @@ import helpers from "./helpers"; |
@@ -0,0 +0,0 @@ import { HTTPRequestMethod } from "../interfaces/HTTPClient"; |
@@ -0,0 +0,0 @@ import { Channel } from "../interfaces/Channel"; |
@@ -0,0 +0,0 @@ import { HTTPRequestMethod } from "../interfaces/HTTPClient"; |
@@ -0,0 +0,0 @@ import { HTTPRequestMethod } from "../interfaces/HTTPClient"; |
@@ -0,0 +0,0 @@ import { HTTPRequestMethod } from "../interfaces/HTTPClient"; |
@@ -0,0 +0,0 @@ import { Channel, List } from "../main"; |
@@ -0,0 +0,0 @@ export interface CaptionTrack { |
@@ -0,0 +0,0 @@ import { ENDPOINT_BROWSE, ENDPOINT_SUBSCRIBE, ENDPOINT_UNSUBSCRIBE } from "../constants"; |
@@ -0,0 +0,0 @@ export interface ChannelBadge { |
@@ -0,0 +0,0 @@ import { Thumbnail } from "../main"; |
@@ -0,0 +0,0 @@ import { Channel, WrappedHTTPClient } from "../main"; |
@@ -0,0 +0,0 @@ import helpers from "../fetchers/helpers"; |
@@ -0,0 +0,0 @@ export interface HTTPClient { |
@@ -0,0 +0,0 @@ import { Video, Channel, Playlist, Comment, CommentThread } from "../main"; |
@@ -0,0 +0,0 @@ import helpers from "../fetchers/helpers"; |
@@ -0,0 +0,0 @@ export interface StorageAdapter { |
@@ -0,0 +0,0 @@ export interface Thumbnail { |
@@ -0,0 +0,0 @@ import { ENDPOINT_COMMENT_CREATE, ENDPOINT_DISLIKE, ENDPOINT_LIKE, ENDPOINT_NEXT, ENDPOINT_PLAYER, ENDPOINT_REMOVELIKE } from "../constants"; |
@@ -0,0 +0,0 @@ import { Authenticator } from "./Authenticator"; |
@@ -0,0 +0,0 @@ import { Explorer } from "./fetchers/Explorer"; |
@@ -0,0 +0,0 @@ import { NodeFetchClientAdapter } from "./adapters/NodeFetchClientAdapter"; |
@@ -0,0 +0,0 @@ import { CONSOLE_COLORS, DEBUG, DEFAULT_API_KEY, DEFAULT_CLIENT_NAME, DEFAULT_CLIENT_VERSION, DEFAULT_CONTEXT, DEFAULT_USER_AGENT } from "./constants"; |
@@ -0,0 +0,0 @@ /* Import Library */ |
@@ -0,0 +0,0 @@ ## Todo |
@@ -0,0 +0,0 @@ { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
206390
4162