glitch-javascript-sdk 1.2.5 → 1.2.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 +40 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Publications.d.ts +23 -0
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +40 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/PublicationsRoutes.d.ts +7 -0
- package/dist/index.d.ts +22 -0
- package/package.json +1 -1
- package/src/api/Publications.ts +38 -0
- package/src/api/index.ts +3 -1
- package/src/index.ts +3 -1
- package/src/routes/PublicationsRoutes.ts +13 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Response from "../util/Response";
|
|
2
|
+
import { AxiosPromise } from "axios";
|
|
3
|
+
declare class Publications {
|
|
4
|
+
/**
|
|
5
|
+
* Get a list of all publictions, podcasts and blogs.
|
|
6
|
+
*
|
|
7
|
+
* @see https://api.glitch.fun/api/documentation#/Publications/getPublications
|
|
8
|
+
*
|
|
9
|
+
* @returns promise
|
|
10
|
+
*/
|
|
11
|
+
static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
12
|
+
/**
|
|
13
|
+
* Download the list of publictions, podcasts and blogs.
|
|
14
|
+
*
|
|
15
|
+
* @see https://api.glitch.fun/api/documentation#/Publications/downloadPublications
|
|
16
|
+
*
|
|
17
|
+
* @param data The data to be passed when creating a team.
|
|
18
|
+
*
|
|
19
|
+
* @returns Promise
|
|
20
|
+
*/
|
|
21
|
+
static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
22
|
+
}
|
|
23
|
+
export default Publications;
|
package/dist/esm/api/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import Messages from "./Messages";
|
|
|
21
21
|
import Feedback from "./Feedback";
|
|
22
22
|
import Influencers from "./Influencers";
|
|
23
23
|
import Games from "./Games";
|
|
24
|
+
import Publications from "./Publications";
|
|
24
25
|
export { Auth };
|
|
25
26
|
export { Competitions };
|
|
26
27
|
export { Communities };
|
|
@@ -44,3 +45,4 @@ export { Messages };
|
|
|
44
45
|
export { Feedback };
|
|
45
46
|
export { Influencers };
|
|
46
47
|
export { Games };
|
|
48
|
+
export { Publications };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { Messages } from "./api";
|
|
|
21
21
|
import { Feedback } from "./api";
|
|
22
22
|
import { Influencers } from "./api";
|
|
23
23
|
import { Games } from "./api";
|
|
24
|
+
import { Publications } from "./api";
|
|
24
25
|
import Requests from "./util/Requests";
|
|
25
26
|
import Parser from "./util/Parser";
|
|
26
27
|
import Session from "./util/Session";
|
|
@@ -63,6 +64,7 @@ declare class Glitch {
|
|
|
63
64
|
TipPackages: typeof TipPackages;
|
|
64
65
|
TipEmojis: typeof TipEmojis;
|
|
65
66
|
TipPackagePurchases: typeof TipPackagePurchases;
|
|
67
|
+
Publications: typeof Publications;
|
|
66
68
|
};
|
|
67
69
|
static util: {
|
|
68
70
|
Requests: typeof Requests;
|
package/dist/esm/index.js
CHANGED
|
@@ -10404,6 +10404,44 @@ var Games = /** @class */ (function () {
|
|
|
10404
10404
|
return Games;
|
|
10405
10405
|
}());
|
|
10406
10406
|
|
|
10407
|
+
var PublicationsRoutes = /** @class */ (function () {
|
|
10408
|
+
function PublicationsRoutes() {
|
|
10409
|
+
}
|
|
10410
|
+
PublicationsRoutes.routes = {
|
|
10411
|
+
list: { url: '/publications', method: HTTP_METHODS.GET },
|
|
10412
|
+
download: { url: '/publications/download', method: HTTP_METHODS.POST },
|
|
10413
|
+
};
|
|
10414
|
+
return PublicationsRoutes;
|
|
10415
|
+
}());
|
|
10416
|
+
|
|
10417
|
+
var Publications = /** @class */ (function () {
|
|
10418
|
+
function Publications() {
|
|
10419
|
+
}
|
|
10420
|
+
/**
|
|
10421
|
+
* Get a list of all publictions, podcasts and blogs.
|
|
10422
|
+
*
|
|
10423
|
+
* @see https://api.glitch.fun/api/documentation#/Publications/getPublications
|
|
10424
|
+
*
|
|
10425
|
+
* @returns promise
|
|
10426
|
+
*/
|
|
10427
|
+
Publications.list = function (params) {
|
|
10428
|
+
return Requests.processRoute(PublicationsRoutes.routes.list, undefined, undefined, params);
|
|
10429
|
+
};
|
|
10430
|
+
/**
|
|
10431
|
+
* Download the list of publictions, podcasts and blogs.
|
|
10432
|
+
*
|
|
10433
|
+
* @see https://api.glitch.fun/api/documentation#/Publications/downloadPublications
|
|
10434
|
+
*
|
|
10435
|
+
* @param data The data to be passed when creating a team.
|
|
10436
|
+
*
|
|
10437
|
+
* @returns Promise
|
|
10438
|
+
*/
|
|
10439
|
+
Publications.create = function (data, params) {
|
|
10440
|
+
return Requests.processRoute(PublicationsRoutes.routes.download, data, undefined, params);
|
|
10441
|
+
};
|
|
10442
|
+
return Publications;
|
|
10443
|
+
}());
|
|
10444
|
+
|
|
10407
10445
|
var Parser = /** @class */ (function () {
|
|
10408
10446
|
function Parser() {
|
|
10409
10447
|
}
|
|
@@ -10823,7 +10861,8 @@ var Glitch = /** @class */ (function () {
|
|
|
10823
10861
|
Subscriptions: Subscriptions,
|
|
10824
10862
|
TipPackages: TipPackages,
|
|
10825
10863
|
TipEmojis: TipEmojis,
|
|
10826
|
-
TipPackagePurchases: TipPackagePurchases
|
|
10864
|
+
TipPackagePurchases: TipPackagePurchases,
|
|
10865
|
+
Publications: Publications
|
|
10827
10866
|
};
|
|
10828
10867
|
Glitch.util = {
|
|
10829
10868
|
Requests: Requests,
|