twitch-getter
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -11,2 +11,4 @@ "use strict"; | ||
var key = keys[x], item = config[key]; | ||
if (!item) | ||
continue; | ||
if (!checked) { | ||
@@ -13,0 +15,0 @@ result = result + ("?" + key + "=" + item); |
@@ -41,3 +41,3 @@ "use strict"; | ||
(function () { return __awaiter(void 0, void 0, void 0, function () { | ||
var id, api, streams; | ||
var id, api, something, item, channel; | ||
return __generator(this, function (_a) { | ||
@@ -47,11 +47,18 @@ switch (_a.label) { | ||
id = process.env.TWITCH ? process.env.TWITCH : "yeet"; | ||
console.log(id); | ||
api = new index_1.NewTwitchAPI(id); | ||
return [4 /*yield*/, api.GetNewTopGames()]; | ||
api = new index_1.V5TwitchAPI(id); | ||
return [4 /*yield*/, api.GetV5Streams({ | ||
language: "en" | ||
})]; | ||
case 1: | ||
streams = _a.sent(); | ||
console.log(streams); | ||
return [2 /*return*/]; | ||
something = _a.sent(); | ||
if (!something.streams) return [3 /*break*/, 3]; | ||
item = something.streams[0]; | ||
return [4 /*yield*/, api.GetV5Channel(item.channel._id)]; | ||
case 2: | ||
channel = _a.sent(); | ||
console.log(channel); | ||
_a.label = 3; | ||
case 3: return [2 /*return*/]; | ||
} | ||
}); | ||
}); })(); |
@@ -19,5 +19,5 @@ import { V5StreamersPayload, TopGames } from "./v5_types"; | ||
GetV5Streams(config?: V5StreamsConfig): Promise<V5StreamersPayload>; | ||
GetV5Channel(channel_id: string): Promise<any>; | ||
GetV5Channel(channel_id: string | number): Promise<any>; | ||
GetV5TopGames(config?: V5TopGames): Promise<TopGames>; | ||
} | ||
export {}; |
{ | ||
"name": "twitch-getter", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Get data from twitch's own API", | ||
@@ -30,3 +30,12 @@ "main": "lib/index.js", | ||
}, | ||
"files": ["lib/**/*"] | ||
"files": [ | ||
"lib/**/*" | ||
], | ||
"keywords": [ | ||
"twitch", | ||
"api", | ||
"twitch-api", | ||
"v5", | ||
"new api" | ||
] | ||
} |
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
25406
18
547