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/cjs/index.js
CHANGED
|
@@ -20062,6 +20062,8 @@ var UserRoutes = /** @class */ (function () {
|
|
|
20062
20062
|
aggregateMonthlyGivenTips: { url: '/users/aggregateMonthlyGivenTips', method: HTTP_METHODS.GET },
|
|
20063
20063
|
getYoutubeChannels: { url: '/users/getYoutubeChannels', method: HTTP_METHODS.GET },
|
|
20064
20064
|
getFacebookGroups: { url: '/users/getFacebookGroups', method: HTTP_METHODS.GET },
|
|
20065
|
+
addGenre: { url: '/users/addGenre', method: HTTP_METHODS.POST },
|
|
20066
|
+
removeGenre: { url: '/users/removeGenre/{genre_id}', method: HTTP_METHODS.DELETE },
|
|
20065
20067
|
};
|
|
20066
20068
|
return UserRoutes;
|
|
20067
20069
|
}());
|
|
@@ -20341,6 +20343,30 @@ var Users = /** @class */ (function () {
|
|
|
20341
20343
|
Users.getFacebookGroups = function (params) {
|
|
20342
20344
|
return Requests.processRoute(UserRoutes.routes.getFacebookGroups, undefined, undefined, params);
|
|
20343
20345
|
};
|
|
20346
|
+
/**
|
|
20347
|
+
* Add a genre to a user.
|
|
20348
|
+
*
|
|
20349
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/updateUser
|
|
20350
|
+
*
|
|
20351
|
+
* @param data The genre information to be passed to update the genre information.
|
|
20352
|
+
*
|
|
20353
|
+
* @returns Promise
|
|
20354
|
+
*/
|
|
20355
|
+
Users.addGenre = function (data, params) {
|
|
20356
|
+
return Requests.processRoute(UserRoutes.routes.addGenre, data, undefined, params);
|
|
20357
|
+
};
|
|
20358
|
+
/**
|
|
20359
|
+
* Remove a genre from a user.
|
|
20360
|
+
*
|
|
20361
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/updateUser
|
|
20362
|
+
*
|
|
20363
|
+
* @param genre_id The id of the genre to remove.
|
|
20364
|
+
*
|
|
20365
|
+
* @returns Promise
|
|
20366
|
+
*/
|
|
20367
|
+
Users.removeGenre = function (genre_id, params) {
|
|
20368
|
+
return Requests.processRoute(UserRoutes.routes.removeGenre, undefined, { genre_id: genre_id }, params);
|
|
20369
|
+
};
|
|
20344
20370
|
return Users;
|
|
20345
20371
|
}());
|
|
20346
20372
|
|
|
@@ -21544,6 +21570,7 @@ var UtilityRoutes = /** @class */ (function () {
|
|
|
21544
21570
|
}
|
|
21545
21571
|
UtilityRoutes.routes = {
|
|
21546
21572
|
social_interactions: { url: '/util/socialinteractions', method: HTTP_METHODS.GET },
|
|
21573
|
+
genres: { url: '/util/genres', method: HTTP_METHODS.GET },
|
|
21547
21574
|
};
|
|
21548
21575
|
return UtilityRoutes;
|
|
21549
21576
|
}());
|
|
@@ -21561,6 +21588,16 @@ var Utility = /** @class */ (function () {
|
|
|
21561
21588
|
Utility.listSocialInteractions = function (params) {
|
|
21562
21589
|
return Requests.processRoute(UtilityRoutes.routes.social_interactions, undefined, undefined, params);
|
|
21563
21590
|
};
|
|
21591
|
+
/**
|
|
21592
|
+
* Get all the genres available on the platform.
|
|
21593
|
+
*
|
|
21594
|
+
* @see https://api.glitch.fun/api/documentation#/Utility%20Route/getUtilGenres
|
|
21595
|
+
*
|
|
21596
|
+
* @returns promise
|
|
21597
|
+
*/
|
|
21598
|
+
Utility.listGenres = function (params) {
|
|
21599
|
+
return Requests.processRoute(UtilityRoutes.routes.genres, undefined, undefined, params);
|
|
21600
|
+
};
|
|
21564
21601
|
return Utility;
|
|
21565
21602
|
}());
|
|
21566
21603
|
|