glitch-javascript-sdk 1.6.5 → 1.6.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 +49 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Hashtags.d.ts +19 -0
- package/dist/esm/api/Titles.d.ts +11 -0
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +49 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/HashtagRoute.d.ts +7 -0
- package/dist/index.d.ts +29 -0
- package/package.json +1 -1
- package/src/api/Hashtags.ts +31 -0
- package/src/api/Titles.ts +53 -39
- package/src/api/index.ts +3 -1
- package/src/index.ts +2 -0
- package/src/routes/HashtagRoute.ts +13 -0
- package/src/routes/TitlesRoute.ts +1 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Response from "../util/Response";
|
|
2
|
+
import { AxiosPromise } from "axios";
|
|
3
|
+
declare class Hashtags {
|
|
4
|
+
/**
|
|
5
|
+
* List all the hashtags
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* @returns A promise
|
|
9
|
+
*/
|
|
10
|
+
static list<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
11
|
+
/**
|
|
12
|
+
* Get the top hashtags for a title, campaign, or schedule.
|
|
13
|
+
*
|
|
14
|
+
* @param params - e.g. { title_id: '...', limit: 10, sort: 'sum_views', start_date: 'YYYY-MM-DD', end_date: 'YYYY-MM-DD' }
|
|
15
|
+
* @returns AxiosPromise of an array of aggregated hashtags
|
|
16
|
+
*/
|
|
17
|
+
static top<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
18
|
+
}
|
|
19
|
+
export default Hashtags;
|
package/dist/esm/api/Titles.d.ts
CHANGED
|
@@ -188,5 +188,16 @@ declare class Titles {
|
|
|
188
188
|
* Revoke a specific token by ID.
|
|
189
189
|
*/
|
|
190
190
|
static revokeTitleToken<T>(title_id: string, token_id: string): AxiosPromise<Response<T>>;
|
|
191
|
+
/**
|
|
192
|
+
* Search for Titles using Meilisearch or fallback based on the query and filters.
|
|
193
|
+
*
|
|
194
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/searchTitles
|
|
195
|
+
*
|
|
196
|
+
* @param params Object of query params:
|
|
197
|
+
* - q?: string, filters?: string,
|
|
198
|
+
* - sort_by?: string, sort_order?: 'asc'|'desc',
|
|
199
|
+
* - page?: number, per_page?: number
|
|
200
|
+
*/
|
|
201
|
+
static search<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
191
202
|
}
|
|
192
203
|
export default Titles;
|
package/dist/esm/api/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ import Media from "./Media";
|
|
|
29
29
|
import Scheduler from "./Scheduler";
|
|
30
30
|
import Funnel from "./Funnel";
|
|
31
31
|
import SocialStats from "./SocialStats";
|
|
32
|
+
import Hashtags from "./Hashtags";
|
|
32
33
|
export { Auth };
|
|
33
34
|
export { Competitions };
|
|
34
35
|
export { Communities };
|
|
@@ -60,3 +61,4 @@ export { Media };
|
|
|
60
61
|
export { Scheduler };
|
|
61
62
|
export { Funnel };
|
|
62
63
|
export { SocialStats };
|
|
64
|
+
export { Hashtags };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ import { Media } from "./api";
|
|
|
29
29
|
import { Scheduler } from "./api";
|
|
30
30
|
import { Funnel } from "./api";
|
|
31
31
|
import { SocialStats } from "./api";
|
|
32
|
+
import { Hashtags } from "./api";
|
|
32
33
|
import Requests from "./util/Requests";
|
|
33
34
|
import Parser from "./util/Parser";
|
|
34
35
|
import Session from "./util/Session";
|
|
@@ -56,6 +57,7 @@ declare class Glitch {
|
|
|
56
57
|
Events: typeof Events;
|
|
57
58
|
Games: typeof Games;
|
|
58
59
|
GameShows: typeof GameShows;
|
|
60
|
+
Hashtags: typeof Hashtags;
|
|
59
61
|
Feedback: typeof Feedback;
|
|
60
62
|
Influencers: typeof Influencers;
|
|
61
63
|
Teams: typeof Teams;
|
package/dist/esm/index.js
CHANGED
|
@@ -9622,6 +9622,7 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
9622
9622
|
createToken: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.POST },
|
|
9623
9623
|
listTokens: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.GET },
|
|
9624
9624
|
revokeToken: { url: '/titles/{title_id}/tokens/{token_id}', method: HTTP_METHODS.DELETE },
|
|
9625
|
+
search: { url: '/titles/search', method: HTTP_METHODS.GET },
|
|
9625
9626
|
};
|
|
9626
9627
|
return TitlesRoute;
|
|
9627
9628
|
}());
|
|
@@ -9859,6 +9860,19 @@ var Titles = /** @class */ (function () {
|
|
|
9859
9860
|
Titles.revokeTitleToken = function (title_id, token_id) {
|
|
9860
9861
|
return Requests.processRoute(TitlesRoute.routes.revokeToken, {}, { title_id: title_id, token_id: token_id });
|
|
9861
9862
|
};
|
|
9863
|
+
/**
|
|
9864
|
+
* Search for Titles using Meilisearch or fallback based on the query and filters.
|
|
9865
|
+
*
|
|
9866
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/searchTitles
|
|
9867
|
+
*
|
|
9868
|
+
* @param params Object of query params:
|
|
9869
|
+
* - q?: string, filters?: string,
|
|
9870
|
+
* - sort_by?: string, sort_order?: 'asc'|'desc',
|
|
9871
|
+
* - page?: number, per_page?: number
|
|
9872
|
+
*/
|
|
9873
|
+
Titles.search = function (params) {
|
|
9874
|
+
return Requests.processRoute(TitlesRoute.routes.search, {}, undefined, params);
|
|
9875
|
+
};
|
|
9862
9876
|
return Titles;
|
|
9863
9877
|
}());
|
|
9864
9878
|
|
|
@@ -12102,6 +12116,40 @@ var SocialStats = /** @class */ (function () {
|
|
|
12102
12116
|
return SocialStats;
|
|
12103
12117
|
}());
|
|
12104
12118
|
|
|
12119
|
+
var HashtagRoute = /** @class */ (function () {
|
|
12120
|
+
function HashtagRoute() {
|
|
12121
|
+
}
|
|
12122
|
+
HashtagRoute.routes = {
|
|
12123
|
+
list: { url: '/hashtags', method: HTTP_METHODS.GET },
|
|
12124
|
+
top: { url: '/hashtags/top', method: HTTP_METHODS.GET },
|
|
12125
|
+
};
|
|
12126
|
+
return HashtagRoute;
|
|
12127
|
+
}());
|
|
12128
|
+
|
|
12129
|
+
var Hashtags = /** @class */ (function () {
|
|
12130
|
+
function Hashtags() {
|
|
12131
|
+
}
|
|
12132
|
+
/**
|
|
12133
|
+
* List all the hashtags
|
|
12134
|
+
*
|
|
12135
|
+
*
|
|
12136
|
+
* @returns A promise
|
|
12137
|
+
*/
|
|
12138
|
+
Hashtags.list = function (data, params) {
|
|
12139
|
+
return Requests.processRoute(HashtagRoute.routes.list, data, {}, params);
|
|
12140
|
+
};
|
|
12141
|
+
/**
|
|
12142
|
+
* Get the top hashtags for a title, campaign, or schedule.
|
|
12143
|
+
*
|
|
12144
|
+
* @param params - e.g. { title_id: '...', limit: 10, sort: 'sum_views', start_date: 'YYYY-MM-DD', end_date: 'YYYY-MM-DD' }
|
|
12145
|
+
* @returns AxiosPromise of an array of aggregated hashtags
|
|
12146
|
+
*/
|
|
12147
|
+
Hashtags.top = function (data, params) {
|
|
12148
|
+
return Requests.processRoute(HashtagRoute.routes.list, data, {}, params);
|
|
12149
|
+
};
|
|
12150
|
+
return Hashtags;
|
|
12151
|
+
}());
|
|
12152
|
+
|
|
12105
12153
|
var Parser = /** @class */ (function () {
|
|
12106
12154
|
function Parser() {
|
|
12107
12155
|
}
|
|
@@ -12507,6 +12555,7 @@ var Glitch = /** @class */ (function () {
|
|
|
12507
12555
|
Events: Events,
|
|
12508
12556
|
Games: Games,
|
|
12509
12557
|
GameShows: GameShows,
|
|
12558
|
+
Hashtags: Hashtags,
|
|
12510
12559
|
Feedback: Feedback,
|
|
12511
12560
|
Influencers: Influencers,
|
|
12512
12561
|
Teams: Teams,
|