Skip to content

Commit 63e25e2

Browse files
committed
Update 2.0.1
1 parent 707fbc3 commit 63e25e2

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

lib/oauth.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,25 @@ class chzzkToken {
1111
}
1212
}
1313

14+
/**
15+
* @typedef {Object} chzzkChannel
16+
* @property {string} channelID
17+
* @property {string} name
18+
* @property {string} follower
19+
* @property {string} imageURL
20+
*/
21+
22+
/**
23+
* @typedef {Object} chzzkTokenData
24+
* @property {string} access
25+
* @property {string} refresh
26+
* @property {string} expireIn
27+
*/
28+
29+
/**
30+
* @param {string} code
31+
* @returns {Promise<chzzkTokenData>}
32+
*/
1433
async function get (code) {
1534
return new Promise(async (resolve, reject) => {
1635
let options = {
@@ -34,6 +53,10 @@ async function get (code) {
3453
});
3554
}
3655

56+
/**
57+
* @param {string} refreshToken
58+
* @returns {Promise<chzzkTokenData>}
59+
*/
3760
async function refresh (refreshToken) {
3861
return new Promise(async (resolve, reject) => {
3962
let options = {
@@ -56,6 +79,10 @@ async function refresh (refreshToken) {
5679
});
5780
}
5881

82+
/**
83+
* @param {string} accessToken
84+
* @returns {Promise<chzzkChannel>}
85+
*/
5986
async function resolve (accessToken) {
6087
return new Promise(async (resolve, reject) => {
6188

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "buzzk",
33
"displayName": "BUZZK",
4-
"version": "2.0.0",
4+
"version": "2.0.1",
55
"description": "뿌지직 (BUZZK) - 치지직(CHZZK) 챗봇을 더욱 쉽게 개발할 수 있도록 돕는 비공식 라이브러리.",
66
"main": "lib/index.js",
77
"type": "commonjs",

0 commit comments

Comments
 (0)