glitch-javascript-sdk 0.5.9 → 0.6.0

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.
@@ -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;
@@ -159,6 +159,14 @@ declare class Users {
159
159
  * @returns promise
160
160
  */
161
161
  static clearYoutubeAuth<T>(): AxiosPromise<Response<T>>;
162
+ /**
163
+ * Clear StreamElements 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 clearStreamElementsAuth<T>(): AxiosPromise<Response<T>>;
162
170
  /**
163
171
  * Returns a list of tips received by the authenticated user for a given month and year
164
172
  *
@@ -198,6 +206,6 @@ declare class Users {
198
206
  *
199
207
  * @returns promise
200
208
  */
201
- static getYoutubeChannels<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
209
+ static getFacebookGroups<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
202
210
  }
203
211
  export default Users;
@@ -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 };
@@ -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
@@ -32336,6 +32336,7 @@ var UserRoutes = /** @class */ (function () {
32336
32336
  aggregateMonthlyReceivedTips: { url: '/users/aggregateMonthlyReceivedTips', method: HTTP_METHODS.GET },
32337
32337
  aggregateMonthlyGivenTips: { url: '/users/aggregateMonthlyGivenTips', method: HTTP_METHODS.GET },
32338
32338
  getYoutubeChannels: { url: '/users/getYoutubeChannels', method: HTTP_METHODS.GET },
32339
+ getFacebookGroups: { url: '/users/getFacebookGroups', method: HTTP_METHODS.GET },
32339
32340
  };
32340
32341
  return UserRoutes;
32341
32342
  }());
@@ -32535,6 +32536,16 @@ var Users = /** @class */ (function () {
32535
32536
  Users.clearYoutubeAuth = function () {
32536
32537
  return Requests.processRoute(UserRoutes.routes.clearYoutubeAuth, {});
32537
32538
  };
32539
+ /**
32540
+ * Clear StreamElements authentication information from the current user.
32541
+ *
32542
+ * @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
32543
+ *
32544
+ * @returns promise
32545
+ */
32546
+ Users.clearStreamElementsAuth = function () {
32547
+ return Requests.processRoute(UserRoutes.routes.clearStreamElementsAuth, {});
32548
+ };
32538
32549
  /**
32539
32550
  * Returns a list of tips received by the authenticated user for a given month and year
32540
32551
  *
@@ -32582,8 +32593,8 @@ var Users = /** @class */ (function () {
32582
32593
  *
32583
32594
  * @returns promise
32584
32595
  */
32585
- Users.getYoutubeChannels = function (params) {
32586
- return Requests.processRoute(UserRoutes.routes.getYoutubeChannels, undefined, undefined, params);
32596
+ Users.getFacebookGroups = function (params) {
32597
+ return Requests.processRoute(UserRoutes.routes.getFacebookGroups, undefined, undefined, params);
32587
32598
  };
32588
32599
  return Users;
32589
32600
  }());
@@ -33542,6 +33553,45 @@ var Posts = /** @class */ (function () {
33542
33553
  return Posts;
33543
33554
  }());
33544
33555
 
33556
+ var SocialRoute = /** @class */ (function () {
33557
+ function SocialRoute() {
33558
+ }
33559
+ SocialRoute.routes = {
33560
+ postVideoToTikTok: { url: '/social/postVideoToTikTok', method: HTTP_METHODS.POST },
33561
+ postVideoToFacebookGroup: { url: '/social/postVideoToFacebookGroup', method: HTTP_METHODS.POST },
33562
+ };
33563
+ return SocialRoute;
33564
+ }());
33565
+
33566
+ var Social = /** @class */ (function () {
33567
+ function Social() {
33568
+ }
33569
+ /**
33570
+ * Give a tip to another user
33571
+ *
33572
+ * @see https://api.glitch.fun/api/documentation#/Authentication%20Route/authLogin
33573
+ *
33574
+ * @returns A promise
33575
+ */
33576
+ Social.postVideoToTikTokFile = function (file, data, params) {
33577
+ var url = SocialRoute.routes.postVideoToTikTok.url;
33578
+ return Requests.uploadFile(url, 'video', file, data);
33579
+ };
33580
+ Social.postVideoToTikTokBlob = function (blob, data, params) {
33581
+ var url = SocialRoute.routes.postVideoToTikTok.url;
33582
+ return Requests.uploadBlob(url, 'video', blob, data);
33583
+ };
33584
+ Social.postVideoToFacebookGroupFile = function (file, data, params) {
33585
+ var url = SocialRoute.routes.postVideoToFacebookGroup.url;
33586
+ return Requests.uploadFile(url, 'video', file, data);
33587
+ };
33588
+ Social.postVideoToFacebookGroupBlob = function (blob, data, params) {
33589
+ var url = SocialRoute.routes.postVideoToFacebookGroup.url;
33590
+ return Requests.uploadBlob(url, 'video', blob, data);
33591
+ };
33592
+ return Social;
33593
+ }());
33594
+
33545
33595
  var TemplatesRoute = /** @class */ (function () {
33546
33596
  function TemplatesRoute() {
33547
33597
  }
@@ -34308,6 +34358,7 @@ var Glitch = /** @class */ (function () {
34308
34358
  Waitlists: Waitlists,
34309
34359
  Utility: Utility,
34310
34360
  Tips: Tips,
34361
+ Social: Social,
34311
34362
  TipPackages: TipPackages,
34312
34363
  TipEmojis: TipEmojis,
34313
34364
  TipPackagePurchases: TipPackagePurchases