glitch-javascript-sdk 0.8.5 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +37 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Users.d.ts +20 -0
- package/dist/esm/api/Utility.d.ts +8 -0
- package/dist/esm/index.js +37 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +28 -0
- package/package.json +1 -1
- package/src/api/Users.ts +28 -0
- package/src/api/Utility.ts +11 -0
- package/src/routes/UserRoutes.ts +2 -0
- package/src/routes/UtilityRoutes.ts +1 -0
package/dist/esm/api/Users.d.ts
CHANGED
|
@@ -223,5 +223,25 @@ declare class Users {
|
|
|
223
223
|
* @returns promise
|
|
224
224
|
*/
|
|
225
225
|
static getFacebookGroups<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
226
|
+
/**
|
|
227
|
+
* Add a genre to a user.
|
|
228
|
+
*
|
|
229
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/updateUser
|
|
230
|
+
*
|
|
231
|
+
* @param data The genre information to be passed to update the genre information.
|
|
232
|
+
*
|
|
233
|
+
* @returns Promise
|
|
234
|
+
*/
|
|
235
|
+
static addGenre<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
236
|
+
/**
|
|
237
|
+
* Remove a genre from a user.
|
|
238
|
+
*
|
|
239
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/updateUser
|
|
240
|
+
*
|
|
241
|
+
* @param genre_id The id of the genre to remove.
|
|
242
|
+
*
|
|
243
|
+
* @returns Promise
|
|
244
|
+
*/
|
|
245
|
+
static removeGenre<T>(genre_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
226
246
|
}
|
|
227
247
|
export default Users;
|
|
@@ -9,5 +9,13 @@ declare class Utility {
|
|
|
9
9
|
* @returns promise
|
|
10
10
|
*/
|
|
11
11
|
static listSocialInteractions<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
12
|
+
/**
|
|
13
|
+
* Get all the genres available on the platform.
|
|
14
|
+
*
|
|
15
|
+
* @see https://api.glitch.fun/api/documentation#/Utility%20Route/getUtilGenres
|
|
16
|
+
*
|
|
17
|
+
* @returns promise
|
|
18
|
+
*/
|
|
19
|
+
static listGenres<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
12
20
|
}
|
|
13
21
|
export default Utility;
|
package/dist/esm/index.js
CHANGED
|
@@ -6878,6 +6878,8 @@ var UserRoutes = /** @class */ (function () {
|
|
|
6878
6878
|
aggregateMonthlyGivenTips: { url: '/users/aggregateMonthlyGivenTips', method: HTTP_METHODS.GET },
|
|
6879
6879
|
getYoutubeChannels: { url: '/users/getYoutubeChannels', method: HTTP_METHODS.GET },
|
|
6880
6880
|
getFacebookGroups: { url: '/users/getFacebookGroups', method: HTTP_METHODS.GET },
|
|
6881
|
+
addGenre: { url: '/users/addGenre', method: HTTP_METHODS.POST },
|
|
6882
|
+
removeGenre: { url: '/users/removeGenre/{genre_id}', method: HTTP_METHODS.DELETE },
|
|
6881
6883
|
};
|
|
6882
6884
|
return UserRoutes;
|
|
6883
6885
|
}());
|
|
@@ -7157,6 +7159,30 @@ var Users = /** @class */ (function () {
|
|
|
7157
7159
|
Users.getFacebookGroups = function (params) {
|
|
7158
7160
|
return Requests.processRoute(UserRoutes.routes.getFacebookGroups, undefined, undefined, params);
|
|
7159
7161
|
};
|
|
7162
|
+
/**
|
|
7163
|
+
* Add a genre to a user.
|
|
7164
|
+
*
|
|
7165
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/updateUser
|
|
7166
|
+
*
|
|
7167
|
+
* @param data The genre information to be passed to update the genre information.
|
|
7168
|
+
*
|
|
7169
|
+
* @returns Promise
|
|
7170
|
+
*/
|
|
7171
|
+
Users.addGenre = function (data, params) {
|
|
7172
|
+
return Requests.processRoute(UserRoutes.routes.addGenre, data, undefined, params);
|
|
7173
|
+
};
|
|
7174
|
+
/**
|
|
7175
|
+
* Remove a genre from a user.
|
|
7176
|
+
*
|
|
7177
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/updateUser
|
|
7178
|
+
*
|
|
7179
|
+
* @param genre_id The id of the genre to remove.
|
|
7180
|
+
*
|
|
7181
|
+
* @returns Promise
|
|
7182
|
+
*/
|
|
7183
|
+
Users.removeGenre = function (genre_id, params) {
|
|
7184
|
+
return Requests.processRoute(UserRoutes.routes.removeGenre, undefined, { genre_id: genre_id }, params);
|
|
7185
|
+
};
|
|
7160
7186
|
return Users;
|
|
7161
7187
|
}());
|
|
7162
7188
|
|
|
@@ -8360,6 +8386,7 @@ var UtilityRoutes = /** @class */ (function () {
|
|
|
8360
8386
|
}
|
|
8361
8387
|
UtilityRoutes.routes = {
|
|
8362
8388
|
social_interactions: { url: '/util/socialinteractions', method: HTTP_METHODS.GET },
|
|
8389
|
+
genres: { url: '/util/genres', method: HTTP_METHODS.GET },
|
|
8363
8390
|
};
|
|
8364
8391
|
return UtilityRoutes;
|
|
8365
8392
|
}());
|
|
@@ -8377,6 +8404,16 @@ var Utility = /** @class */ (function () {
|
|
|
8377
8404
|
Utility.listSocialInteractions = function (params) {
|
|
8378
8405
|
return Requests.processRoute(UtilityRoutes.routes.social_interactions, undefined, undefined, params);
|
|
8379
8406
|
};
|
|
8407
|
+
/**
|
|
8408
|
+
* Get all the genres available on the platform.
|
|
8409
|
+
*
|
|
8410
|
+
* @see https://api.glitch.fun/api/documentation#/Utility%20Route/getUtilGenres
|
|
8411
|
+
*
|
|
8412
|
+
* @returns promise
|
|
8413
|
+
*/
|
|
8414
|
+
Utility.listGenres = function (params) {
|
|
8415
|
+
return Requests.processRoute(UtilityRoutes.routes.genres, undefined, undefined, params);
|
|
8416
|
+
};
|
|
8380
8417
|
return Utility;
|
|
8381
8418
|
}());
|
|
8382
8419
|
|