glitch-javascript-sdk 1.6.4 → 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 +66 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Communities.d.ts +13 -0
- 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 +66 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/HashtagRoute.d.ts +7 -0
- package/dist/index.d.ts +42 -0
- package/package.json +1 -1
- package/src/api/Communities.ts +23 -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/CommunitiesRoute.ts +5 -0
- package/src/routes/HashtagRoute.ts +13 -0
- package/src/routes/TitlesRoute.ts +1 -0
package/dist/cjs/index.js
CHANGED
|
@@ -19818,6 +19818,10 @@ var CommunitiesRoute = /** @class */ (function () {
|
|
|
19818
19818
|
url: '/communities/{community_id}/newsletters/{newsletter_id}/reports/subscriber_trend',
|
|
19819
19819
|
method: HTTP_METHODS.GET
|
|
19820
19820
|
},
|
|
19821
|
+
exportNewsletterSubscribers: {
|
|
19822
|
+
url: '/communities/{community_id}/newsletters/{newsletter_id}/subscribers/export',
|
|
19823
|
+
method: HTTP_METHODS.POST
|
|
19824
|
+
},
|
|
19821
19825
|
// Campaigns
|
|
19822
19826
|
listCampaigns: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.GET },
|
|
19823
19827
|
createCampaign: { url: '/communities/{community_id}/newsletters/{newsletter_id}/campaigns', method: HTTP_METHODS.POST },
|
|
@@ -20563,6 +20567,19 @@ var Communities = /** @class */ (function () {
|
|
|
20563
20567
|
return Requests.processRoute(CommunitiesRoute.routes.newsletterSubscriberTrend, undefined, // no body data
|
|
20564
20568
|
{ community_id: community_id, newsletter_id: newsletter_id }, params);
|
|
20565
20569
|
};
|
|
20570
|
+
/**
|
|
20571
|
+
* Export subscribers for a specific newsletter.
|
|
20572
|
+
* The file is generated asynchronously on the server and
|
|
20573
|
+
* the user is emailed a link to download the file.
|
|
20574
|
+
*
|
|
20575
|
+
* @param community_id The ID of the community.
|
|
20576
|
+
* @param newsletter_id The ID of the newsletter.
|
|
20577
|
+
* @param data Export options (format: 'csv' or 'xlsx').
|
|
20578
|
+
* @returns Promise
|
|
20579
|
+
*/
|
|
20580
|
+
Communities.exportNewsletterSubscribers = function (community_id, newsletter_id, data, params) {
|
|
20581
|
+
return Requests.processRoute(CommunitiesRoute.routes.exportNewsletterSubscribers, data, { community_id: community_id, newsletter_id: newsletter_id }, params);
|
|
20582
|
+
};
|
|
20566
20583
|
return Communities;
|
|
20567
20584
|
}());
|
|
20568
20585
|
|
|
@@ -22789,6 +22806,7 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
22789
22806
|
createToken: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.POST },
|
|
22790
22807
|
listTokens: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.GET },
|
|
22791
22808
|
revokeToken: { url: '/titles/{title_id}/tokens/{token_id}', method: HTTP_METHODS.DELETE },
|
|
22809
|
+
search: { url: '/titles/search', method: HTTP_METHODS.GET },
|
|
22792
22810
|
};
|
|
22793
22811
|
return TitlesRoute;
|
|
22794
22812
|
}());
|
|
@@ -23026,6 +23044,19 @@ var Titles = /** @class */ (function () {
|
|
|
23026
23044
|
Titles.revokeTitleToken = function (title_id, token_id) {
|
|
23027
23045
|
return Requests.processRoute(TitlesRoute.routes.revokeToken, {}, { title_id: title_id, token_id: token_id });
|
|
23028
23046
|
};
|
|
23047
|
+
/**
|
|
23048
|
+
* Search for Titles using Meilisearch or fallback based on the query and filters.
|
|
23049
|
+
*
|
|
23050
|
+
* @see https://api.glitch.fun/api/documentation#/Titles/searchTitles
|
|
23051
|
+
*
|
|
23052
|
+
* @param params Object of query params:
|
|
23053
|
+
* - q?: string, filters?: string,
|
|
23054
|
+
* - sort_by?: string, sort_order?: 'asc'|'desc',
|
|
23055
|
+
* - page?: number, per_page?: number
|
|
23056
|
+
*/
|
|
23057
|
+
Titles.search = function (params) {
|
|
23058
|
+
return Requests.processRoute(TitlesRoute.routes.search, {}, undefined, params);
|
|
23059
|
+
};
|
|
23029
23060
|
return Titles;
|
|
23030
23061
|
}());
|
|
23031
23062
|
|
|
@@ -25269,6 +25300,40 @@ var SocialStats = /** @class */ (function () {
|
|
|
25269
25300
|
return SocialStats;
|
|
25270
25301
|
}());
|
|
25271
25302
|
|
|
25303
|
+
var HashtagRoute = /** @class */ (function () {
|
|
25304
|
+
function HashtagRoute() {
|
|
25305
|
+
}
|
|
25306
|
+
HashtagRoute.routes = {
|
|
25307
|
+
list: { url: '/hashtags', method: HTTP_METHODS.GET },
|
|
25308
|
+
top: { url: '/hashtags/top', method: HTTP_METHODS.GET },
|
|
25309
|
+
};
|
|
25310
|
+
return HashtagRoute;
|
|
25311
|
+
}());
|
|
25312
|
+
|
|
25313
|
+
var Hashtags = /** @class */ (function () {
|
|
25314
|
+
function Hashtags() {
|
|
25315
|
+
}
|
|
25316
|
+
/**
|
|
25317
|
+
* List all the hashtags
|
|
25318
|
+
*
|
|
25319
|
+
*
|
|
25320
|
+
* @returns A promise
|
|
25321
|
+
*/
|
|
25322
|
+
Hashtags.list = function (data, params) {
|
|
25323
|
+
return Requests.processRoute(HashtagRoute.routes.list, data, {}, params);
|
|
25324
|
+
};
|
|
25325
|
+
/**
|
|
25326
|
+
* Get the top hashtags for a title, campaign, or schedule.
|
|
25327
|
+
*
|
|
25328
|
+
* @param params - e.g. { title_id: '...', limit: 10, sort: 'sum_views', start_date: 'YYYY-MM-DD', end_date: 'YYYY-MM-DD' }
|
|
25329
|
+
* @returns AxiosPromise of an array of aggregated hashtags
|
|
25330
|
+
*/
|
|
25331
|
+
Hashtags.top = function (data, params) {
|
|
25332
|
+
return Requests.processRoute(HashtagRoute.routes.list, data, {}, params);
|
|
25333
|
+
};
|
|
25334
|
+
return Hashtags;
|
|
25335
|
+
}());
|
|
25336
|
+
|
|
25272
25337
|
var Parser = /** @class */ (function () {
|
|
25273
25338
|
function Parser() {
|
|
25274
25339
|
}
|
|
@@ -25674,6 +25739,7 @@ var Glitch = /** @class */ (function () {
|
|
|
25674
25739
|
Events: Events,
|
|
25675
25740
|
Games: Games,
|
|
25676
25741
|
GameShows: GameShows,
|
|
25742
|
+
Hashtags: Hashtags,
|
|
25677
25743
|
Feedback: Feedback,
|
|
25678
25744
|
Influencers: Influencers,
|
|
25679
25745
|
Teams: Teams,
|