glitch-javascript-sdk 0.5.9 → 0.6.1
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 +75 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Social.d.ts +16 -0
- package/dist/esm/api/Users.d.ts +25 -1
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +75 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/SocialRoute.d.ts +7 -0
- package/dist/index.d.ts +40 -1
- package/package.json +1 -1
- package/src/api/Social.ts +48 -0
- package/src/api/Users.ts +38 -2
- package/src/api/index.ts +2 -0
- package/src/index.ts +2 -1
- package/src/routes/SocialRoute.ts +13 -0
- package/src/routes/UserRoutes.ts +3 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Response from "../util/Response";
|
|
2
|
+
import { AxiosPromise } from "axios";
|
|
3
|
+
declare class Social {
|
|
4
|
+
/**
|
|
5
|
+
* Give a tip to another user
|
|
6
|
+
*
|
|
7
|
+
* @see https://api.glitch.fun/api/documentation#/Authentication%20Route/authLogin
|
|
8
|
+
*
|
|
9
|
+
* @returns A promise
|
|
10
|
+
*/
|
|
11
|
+
static postVideoToTikTokFile<T>(file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
12
|
+
static postVideoToTikTokBlob<T>(blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
13
|
+
static postVideoToFacebookGroupFile<T>(file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
14
|
+
static postVideoToFacebookGroupBlob<T>(blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
15
|
+
}
|
|
16
|
+
export default Social;
|
package/dist/esm/api/Users.d.ts
CHANGED
|
@@ -159,6 +159,30 @@ declare class Users {
|
|
|
159
159
|
* @returns promise
|
|
160
160
|
*/
|
|
161
161
|
static clearYoutubeAuth<T>(): AxiosPromise<Response<T>>;
|
|
162
|
+
/**
|
|
163
|
+
* Clear Reddit authentication information from the current user.
|
|
164
|
+
*
|
|
165
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
166
|
+
*
|
|
167
|
+
* @returns promise
|
|
168
|
+
*/
|
|
169
|
+
static clearRedditAuth<T>(): AxiosPromise<Response<T>>;
|
|
170
|
+
/**
|
|
171
|
+
* Clear Twitter authentication information from the current user.
|
|
172
|
+
*
|
|
173
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
174
|
+
*
|
|
175
|
+
* @returns promise
|
|
176
|
+
*/
|
|
177
|
+
static clearTwitterAuth<T>(): AxiosPromise<Response<T>>;
|
|
178
|
+
/**
|
|
179
|
+
* Clear StreamElements authentication information from the current user.
|
|
180
|
+
*
|
|
181
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
182
|
+
*
|
|
183
|
+
* @returns promise
|
|
184
|
+
*/
|
|
185
|
+
static clearStreamElementsAuth<T>(): AxiosPromise<Response<T>>;
|
|
162
186
|
/**
|
|
163
187
|
* Returns a list of tips received by the authenticated user for a given month and year
|
|
164
188
|
*
|
|
@@ -198,6 +222,6 @@ declare class Users {
|
|
|
198
222
|
*
|
|
199
223
|
* @returns promise
|
|
200
224
|
*/
|
|
201
|
-
static
|
|
225
|
+
static getFacebookGroups<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
202
226
|
}
|
|
203
227
|
export default Users;
|
package/dist/esm/api/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import Events from "./Events";
|
|
|
6
6
|
import Teams from "./Teams";
|
|
7
7
|
import Waitlists from "./Waitlist";
|
|
8
8
|
import Posts from "./Posts";
|
|
9
|
+
import Social from "./Social";
|
|
9
10
|
import Templates from "./Templates";
|
|
10
11
|
import Utility from "./Utility";
|
|
11
12
|
import Tips from "./Tips";
|
|
@@ -20,6 +21,7 @@ export { Events };
|
|
|
20
21
|
export { Teams };
|
|
21
22
|
export { Waitlists };
|
|
22
23
|
export { Posts };
|
|
24
|
+
export { Social };
|
|
23
25
|
export { Templates };
|
|
24
26
|
export { Utility };
|
|
25
27
|
export { Tips };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Config } from "./config";
|
|
2
2
|
import Auth from "./api/Auth";
|
|
3
3
|
import Competitions from "./api/Competitions";
|
|
4
|
-
import { Communities } from "./api";
|
|
4
|
+
import { Communities, Social } from "./api";
|
|
5
5
|
import { Users } from "./api";
|
|
6
6
|
import { Events } from "./api";
|
|
7
7
|
import { Teams } from "./api";
|
|
@@ -43,6 +43,7 @@ declare class Glitch {
|
|
|
43
43
|
Waitlists: typeof Waitlists;
|
|
44
44
|
Utility: typeof Utility;
|
|
45
45
|
Tips: typeof Tips;
|
|
46
|
+
Social: typeof Social;
|
|
46
47
|
TipPackages: typeof TipPackages;
|
|
47
48
|
TipEmojis: typeof TipEmojis;
|
|
48
49
|
TipPackagePurchases: typeof TipPackagePurchases;
|
package/dist/esm/index.js
CHANGED
|
@@ -32330,12 +32330,15 @@ var UserRoutes = /** @class */ (function () {
|
|
|
32330
32330
|
clearStripeAuth: { url: '/users/clearStripeAuth', method: HTTP_METHODS.DELETE },
|
|
32331
32331
|
clearTikTokAuth: { url: '/users/clearTikTokAuth', method: HTTP_METHODS.DELETE },
|
|
32332
32332
|
clearYoutubeAuth: { url: '/users/clearYoutubeAuth', method: HTTP_METHODS.DELETE },
|
|
32333
|
+
clearRedditAuth: { url: '/users/clearRedditAuth', method: HTTP_METHODS.DELETE },
|
|
32334
|
+
clearTwitterAuth: { url: '/users/clearTwitterAuth', method: HTTP_METHODS.DELETE },
|
|
32333
32335
|
clearStreamElementsAuth: { url: '/users/clearStreamElementsAuth', method: HTTP_METHODS.DELETE },
|
|
32334
32336
|
getTipsReceivedForMonth: { url: '/users/getTipsReceivedForMonth', method: HTTP_METHODS.GET },
|
|
32335
32337
|
getTipsGivenForMonth: { url: '/users/getTipsGivenForMonth', method: HTTP_METHODS.GET },
|
|
32336
32338
|
aggregateMonthlyReceivedTips: { url: '/users/aggregateMonthlyReceivedTips', method: HTTP_METHODS.GET },
|
|
32337
32339
|
aggregateMonthlyGivenTips: { url: '/users/aggregateMonthlyGivenTips', method: HTTP_METHODS.GET },
|
|
32338
32340
|
getYoutubeChannels: { url: '/users/getYoutubeChannels', method: HTTP_METHODS.GET },
|
|
32341
|
+
getFacebookGroups: { url: '/users/getFacebookGroups', method: HTTP_METHODS.GET },
|
|
32339
32342
|
};
|
|
32340
32343
|
return UserRoutes;
|
|
32341
32344
|
}());
|
|
@@ -32535,6 +32538,36 @@ var Users = /** @class */ (function () {
|
|
|
32535
32538
|
Users.clearYoutubeAuth = function () {
|
|
32536
32539
|
return Requests.processRoute(UserRoutes.routes.clearYoutubeAuth, {});
|
|
32537
32540
|
};
|
|
32541
|
+
/**
|
|
32542
|
+
* Clear Reddit authentication information from the current user.
|
|
32543
|
+
*
|
|
32544
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
32545
|
+
*
|
|
32546
|
+
* @returns promise
|
|
32547
|
+
*/
|
|
32548
|
+
Users.clearRedditAuth = function () {
|
|
32549
|
+
return Requests.processRoute(UserRoutes.routes.clearRedditAuth, {});
|
|
32550
|
+
};
|
|
32551
|
+
/**
|
|
32552
|
+
* Clear Twitter authentication information from the current user.
|
|
32553
|
+
*
|
|
32554
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
32555
|
+
*
|
|
32556
|
+
* @returns promise
|
|
32557
|
+
*/
|
|
32558
|
+
Users.clearTwitterAuth = function () {
|
|
32559
|
+
return Requests.processRoute(UserRoutes.routes.clearTwitterAuth, {});
|
|
32560
|
+
};
|
|
32561
|
+
/**
|
|
32562
|
+
* Clear StreamElements authentication information from the current user.
|
|
32563
|
+
*
|
|
32564
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
32565
|
+
*
|
|
32566
|
+
* @returns promise
|
|
32567
|
+
*/
|
|
32568
|
+
Users.clearStreamElementsAuth = function () {
|
|
32569
|
+
return Requests.processRoute(UserRoutes.routes.clearStreamElementsAuth, {});
|
|
32570
|
+
};
|
|
32538
32571
|
/**
|
|
32539
32572
|
* Returns a list of tips received by the authenticated user for a given month and year
|
|
32540
32573
|
*
|
|
@@ -32582,8 +32615,8 @@ var Users = /** @class */ (function () {
|
|
|
32582
32615
|
*
|
|
32583
32616
|
* @returns promise
|
|
32584
32617
|
*/
|
|
32585
|
-
Users.
|
|
32586
|
-
return Requests.processRoute(UserRoutes.routes.
|
|
32618
|
+
Users.getFacebookGroups = function (params) {
|
|
32619
|
+
return Requests.processRoute(UserRoutes.routes.getFacebookGroups, undefined, undefined, params);
|
|
32587
32620
|
};
|
|
32588
32621
|
return Users;
|
|
32589
32622
|
}());
|
|
@@ -33542,6 +33575,45 @@ var Posts = /** @class */ (function () {
|
|
|
33542
33575
|
return Posts;
|
|
33543
33576
|
}());
|
|
33544
33577
|
|
|
33578
|
+
var SocialRoute = /** @class */ (function () {
|
|
33579
|
+
function SocialRoute() {
|
|
33580
|
+
}
|
|
33581
|
+
SocialRoute.routes = {
|
|
33582
|
+
postVideoToTikTok: { url: '/social/postVideoToTikTok', method: HTTP_METHODS.POST },
|
|
33583
|
+
postVideoToFacebookGroup: { url: '/social/postVideoToFacebookGroup', method: HTTP_METHODS.POST },
|
|
33584
|
+
};
|
|
33585
|
+
return SocialRoute;
|
|
33586
|
+
}());
|
|
33587
|
+
|
|
33588
|
+
var Social = /** @class */ (function () {
|
|
33589
|
+
function Social() {
|
|
33590
|
+
}
|
|
33591
|
+
/**
|
|
33592
|
+
* Give a tip to another user
|
|
33593
|
+
*
|
|
33594
|
+
* @see https://api.glitch.fun/api/documentation#/Authentication%20Route/authLogin
|
|
33595
|
+
*
|
|
33596
|
+
* @returns A promise
|
|
33597
|
+
*/
|
|
33598
|
+
Social.postVideoToTikTokFile = function (file, data, params) {
|
|
33599
|
+
var url = SocialRoute.routes.postVideoToTikTok.url;
|
|
33600
|
+
return Requests.uploadFile(url, 'video', file, data);
|
|
33601
|
+
};
|
|
33602
|
+
Social.postVideoToTikTokBlob = function (blob, data, params) {
|
|
33603
|
+
var url = SocialRoute.routes.postVideoToTikTok.url;
|
|
33604
|
+
return Requests.uploadBlob(url, 'video', blob, data);
|
|
33605
|
+
};
|
|
33606
|
+
Social.postVideoToFacebookGroupFile = function (file, data, params) {
|
|
33607
|
+
var url = SocialRoute.routes.postVideoToFacebookGroup.url;
|
|
33608
|
+
return Requests.uploadFile(url, 'video', file, data);
|
|
33609
|
+
};
|
|
33610
|
+
Social.postVideoToFacebookGroupBlob = function (blob, data, params) {
|
|
33611
|
+
var url = SocialRoute.routes.postVideoToFacebookGroup.url;
|
|
33612
|
+
return Requests.uploadBlob(url, 'video', blob, data);
|
|
33613
|
+
};
|
|
33614
|
+
return Social;
|
|
33615
|
+
}());
|
|
33616
|
+
|
|
33545
33617
|
var TemplatesRoute = /** @class */ (function () {
|
|
33546
33618
|
function TemplatesRoute() {
|
|
33547
33619
|
}
|
|
@@ -34308,6 +34380,7 @@ var Glitch = /** @class */ (function () {
|
|
|
34308
34380
|
Waitlists: Waitlists,
|
|
34309
34381
|
Utility: Utility,
|
|
34310
34382
|
Tips: Tips,
|
|
34383
|
+
Social: Social,
|
|
34311
34384
|
TipPackages: TipPackages,
|
|
34312
34385
|
TipEmojis: TipEmojis,
|
|
34313
34386
|
TipPackagePurchases: TipPackagePurchases
|