simple-helix-api
Advanced tools
Comparing version 1.1.2 to 1.1.3
19
index.js
@@ -70,2 +70,3 @@ const fetch = require("node-fetch"); | ||
const headers = { ...this.headers }; | ||
headers["Content-Type"] = "application/json"; | ||
headers.Authorization = this.auth.OAuth; | ||
@@ -272,3 +273,3 @@ return headers; | ||
method: "PUT", | ||
json: { | ||
body: JSON.stringify({ | ||
channel: { | ||
@@ -278,3 +279,3 @@ status: title, | ||
} | ||
}, | ||
}), | ||
headers: this.oauth() | ||
@@ -284,3 +285,3 @@ }).catch(this.handleError); | ||
return { | ||
success: response.status == title && response.game == game | ||
success: response.status === title && response.game === game | ||
}; | ||
@@ -350,6 +351,6 @@ } | ||
method: "PUT", | ||
json: { | ||
body: JSON.stringify({ | ||
user_id: user_id, | ||
description | ||
}, | ||
}), | ||
headers: this.oauth() | ||
@@ -379,6 +380,6 @@ }).catch(this.handleError); | ||
method: "GET", | ||
json: { | ||
body: JSON.stringify({ | ||
user_id, | ||
video_id | ||
}, | ||
}), | ||
headers: this.oauth() | ||
@@ -411,6 +412,6 @@ }).catch(this.handleError); | ||
method: "POST", | ||
json: { | ||
body: JSON.stringify({ | ||
broadcaster_id: user_id, | ||
length | ||
}, | ||
}), | ||
headers: this.headers | ||
@@ -417,0 +418,0 @@ }).catch(this.handleError); |
{ | ||
"name": "simple-helix-api", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "The Simple Helix API allows developers to easily develop applications for Twitch", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
23337
353