simple-helix-api
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -14,5 +14,4 @@ "use strict"; | ||
broadcaster_id, | ||
moderator_id: moderator_id || broadcaster_id, | ||
...data | ||
}); | ||
moderator_id: moderator_id || broadcaster_id | ||
}, { data }); | ||
} | ||
@@ -19,0 +18,0 @@ async unban(broadcaster_id, user_id, moderator_id) { |
@@ -11,3 +11,3 @@ "use strict"; | ||
} | ||
async getByID(id) { | ||
async getById(id) { | ||
return await this.getRequest("users", { id }); | ||
@@ -20,3 +20,3 @@ } | ||
return Number(user) | ||
? await this.getByID(user) | ||
? await this.getById(user) | ||
: await this.getByLogin(user); | ||
@@ -23,0 +23,0 @@ } |
{ | ||
"name": "simple-helix-api", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "The Simple Helix API allows developers to easily develop applications for Twitch", | ||
@@ -23,3 +23,3 @@ "main": "./dist/index.js", | ||
"eslint": "^8.33.0", | ||
"jest": "^29.4.1", | ||
"jest": "^29.4.2", | ||
"ts-jest": "^29.0.5", | ||
@@ -26,0 +26,0 @@ "typescript": "^4.9.5" |
@@ -108,6 +108,4 @@ # About | ||
Some requests requires moderator ID. Moderator ID can be equal to the user ID. | ||
```javascript | ||
await Helix.chat.updateSettings(user_id, moderator_id, { | ||
await Helix.chat.updateSettings(user_id, { | ||
follower_mode: true, | ||
@@ -122,3 +120,3 @@ follower_mode_duration: 10 | ||
const user = await Helix.users.get("anyToxicPerson"); | ||
await Helix.moderation.ban(user_id, user_id, { | ||
await Helix.moderation.ban(user_id, { | ||
user_id: user.id, | ||
@@ -125,0 +123,0 @@ reason: "Friendship is Magic" |
@@ -7,3 +7,3 @@ import { RawAxiosRequestHeaders } from "axios"; | ||
constructor(headers: RawAxiosRequestHeaders); | ||
getByID(id: string): Promise<TGetUserResponse>; | ||
getById(id: string): Promise<TGetUserResponse>; | ||
getByLogin(login: string): Promise<TGetUserResponse>; | ||
@@ -10,0 +10,0 @@ get(user: string): Promise<TGetUserResponse>; |
107801
2820
144