glitch-javascript-sdk 1.4.8 → 1.4.9
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 +34 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Users.d.ts +25 -0
- package/dist/esm/index.js +34 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +25 -0
- package/package.json +1 -1
- package/src/api/Users.ts +67 -33
- package/src/routes/UserRoutes.ts +44 -40
package/dist/esm/api/Users.d.ts
CHANGED
|
@@ -333,5 +333,30 @@ declare class Users {
|
|
|
333
333
|
* @returns promise
|
|
334
334
|
*/
|
|
335
335
|
static getInstagramAccounts<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
336
|
+
/**
|
|
337
|
+
* Gets the Facebook Pages associated with the user.
|
|
338
|
+
*
|
|
339
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/getFacebookPages
|
|
340
|
+
*
|
|
341
|
+
* @returns Promise resolving to the list of Facebook Pages
|
|
342
|
+
*/
|
|
343
|
+
static getFacebookPages<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
344
|
+
/**
|
|
345
|
+
* Gets the subreddits the user is subscribed to.
|
|
346
|
+
*
|
|
347
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubreddits
|
|
348
|
+
*
|
|
349
|
+
* @returns Promise resolving to the list of subreddits
|
|
350
|
+
*/
|
|
351
|
+
static getSubreddits<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
352
|
+
/**
|
|
353
|
+
* Gets the flairs for a specific subreddit.
|
|
354
|
+
*
|
|
355
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubredditFlairs
|
|
356
|
+
*
|
|
357
|
+
* @param subreddit The name of the subreddit to get flairs for.
|
|
358
|
+
* @returns Promise resolving to the list of flairs
|
|
359
|
+
*/
|
|
360
|
+
static getSubredditFlairs<T>(subreddit: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
336
361
|
}
|
|
337
362
|
export default Users;
|
package/dist/esm/index.js
CHANGED
|
@@ -7376,6 +7376,9 @@ var UserRoutes = /** @class */ (function () {
|
|
|
7376
7376
|
getPayouts: { url: '/users/payouts', method: HTTP_METHODS.GET },
|
|
7377
7377
|
verifyAccount: { url: '/users/verify', method: HTTP_METHODS.POST },
|
|
7378
7378
|
getInstagramAccounts: { url: '/users/instagramAccounts', method: HTTP_METHODS.GET },
|
|
7379
|
+
getFacebookPages: { url: "/users/facebookPages", method: HTTP_METHODS.GET },
|
|
7380
|
+
getSubreddits: { url: "/users/reddit/subreddits", method: HTTP_METHODS.GET },
|
|
7381
|
+
getSubredditFlairs: { url: "/users/reddit/redditflairs/{subreddit}", method: HTTP_METHODS.GET },
|
|
7379
7382
|
};
|
|
7380
7383
|
return UserRoutes;
|
|
7381
7384
|
}());
|
|
@@ -7787,6 +7790,37 @@ var Users = /** @class */ (function () {
|
|
|
7787
7790
|
Users.getInstagramAccounts = function (params) {
|
|
7788
7791
|
return Requests.processRoute(UserRoutes.routes.getInstagramAccounts, undefined, undefined, params);
|
|
7789
7792
|
};
|
|
7793
|
+
/**
|
|
7794
|
+
* Gets the Facebook Pages associated with the user.
|
|
7795
|
+
*
|
|
7796
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/getFacebookPages
|
|
7797
|
+
*
|
|
7798
|
+
* @returns Promise resolving to the list of Facebook Pages
|
|
7799
|
+
*/
|
|
7800
|
+
Users.getFacebookPages = function (params) {
|
|
7801
|
+
return Requests.processRoute(UserRoutes.routes.getFacebookPages, undefined, undefined, params);
|
|
7802
|
+
};
|
|
7803
|
+
/**
|
|
7804
|
+
* Gets the subreddits the user is subscribed to.
|
|
7805
|
+
*
|
|
7806
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubreddits
|
|
7807
|
+
*
|
|
7808
|
+
* @returns Promise resolving to the list of subreddits
|
|
7809
|
+
*/
|
|
7810
|
+
Users.getSubreddits = function (params) {
|
|
7811
|
+
return Requests.processRoute(UserRoutes.routes.getSubreddits, undefined, undefined, params);
|
|
7812
|
+
};
|
|
7813
|
+
/**
|
|
7814
|
+
* Gets the flairs for a specific subreddit.
|
|
7815
|
+
*
|
|
7816
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/getSubredditFlairs
|
|
7817
|
+
*
|
|
7818
|
+
* @param subreddit The name of the subreddit to get flairs for.
|
|
7819
|
+
* @returns Promise resolving to the list of flairs
|
|
7820
|
+
*/
|
|
7821
|
+
Users.getSubredditFlairs = function (subreddit, params) {
|
|
7822
|
+
return Requests.processRoute(UserRoutes.routes.getSubredditFlairs, undefined, { subreddit: subreddit }, params);
|
|
7823
|
+
};
|
|
7790
7824
|
return Users;
|
|
7791
7825
|
}());
|
|
7792
7826
|
|