glitch-javascript-sdk 1.6.5 → 1.6.7

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 CHANGED
@@ -22621,6 +22621,7 @@ var SocialPostsRoute = /** @class */ (function () {
22621
22621
  reschedule: { url: '/socialposts/{post_id}/reschedule', method: HTTP_METHODS.POST },
22622
22622
  reports: { url: '/socialposts/{post_id}/reports', method: HTTP_METHODS.GET },
22623
22623
  updatePostImpressions: { url: '/socialposts/{post_id}/impressions', method: HTTP_METHODS.PUT },
22624
+ shortLinkReports: { url: '/socialposts/shortlinks/reports', method: HTTP_METHODS.GET },
22624
22625
  };
22625
22626
  return SocialPostsRoute;
22626
22627
  }());
@@ -22780,6 +22781,16 @@ var SocialPosts = /** @class */ (function () {
22780
22781
  SocialPosts.updatePostImpressions = function (post_id, data, params) {
22781
22782
  return Requests.processRoute(SocialPostsRoute.routes.updatePostImpressions, data, { post_id: post_id }, params);
22782
22783
  };
22784
+ /**
22785
+ * Get reports on all the the short links
22786
+ *
22787
+ * @see https://api.glitch.fun/api/documentation#/Post%20Route/resourcePostList
22788
+ *
22789
+ * @returns promise
22790
+ */
22791
+ SocialPosts.shortLinkReports = function (params) {
22792
+ return Requests.processRoute(SocialPostsRoute.routes.shortLinkReports, undefined, undefined, params);
22793
+ };
22783
22794
  return SocialPosts;
22784
22795
  }());
22785
22796
 
@@ -22806,6 +22817,7 @@ var TitlesRoute = /** @class */ (function () {
22806
22817
  createToken: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.POST },
22807
22818
  listTokens: { url: '/titles/{title_id}/tokens', method: HTTP_METHODS.GET },
22808
22819
  revokeToken: { url: '/titles/{title_id}/tokens/{token_id}', method: HTTP_METHODS.DELETE },
22820
+ search: { url: '/titles/search', method: HTTP_METHODS.GET },
22809
22821
  };
22810
22822
  return TitlesRoute;
22811
22823
  }());
@@ -23043,6 +23055,19 @@ var Titles = /** @class */ (function () {
23043
23055
  Titles.revokeTitleToken = function (title_id, token_id) {
23044
23056
  return Requests.processRoute(TitlesRoute.routes.revokeToken, {}, { title_id: title_id, token_id: token_id });
23045
23057
  };
23058
+ /**
23059
+ * Search for Titles using Meilisearch or fallback based on the query and filters.
23060
+ *
23061
+ * @see https://api.glitch.fun/api/documentation#/Titles/searchTitles
23062
+ *
23063
+ * @param params Object of query params:
23064
+ * - q?: string, filters?: string,
23065
+ * - sort_by?: string, sort_order?: 'asc'|'desc',
23066
+ * - page?: number, per_page?: number
23067
+ */
23068
+ Titles.search = function (params) {
23069
+ return Requests.processRoute(TitlesRoute.routes.search, {}, undefined, params);
23070
+ };
23046
23071
  return Titles;
23047
23072
  }());
23048
23073
 
@@ -25286,6 +25311,40 @@ var SocialStats = /** @class */ (function () {
25286
25311
  return SocialStats;
25287
25312
  }());
25288
25313
 
25314
+ var HashtagRoute = /** @class */ (function () {
25315
+ function HashtagRoute() {
25316
+ }
25317
+ HashtagRoute.routes = {
25318
+ list: { url: '/hashtags', method: HTTP_METHODS.GET },
25319
+ top: { url: '/hashtags/top', method: HTTP_METHODS.GET },
25320
+ };
25321
+ return HashtagRoute;
25322
+ }());
25323
+
25324
+ var Hashtags = /** @class */ (function () {
25325
+ function Hashtags() {
25326
+ }
25327
+ /**
25328
+ * List all the hashtags
25329
+ *
25330
+ *
25331
+ * @returns A promise
25332
+ */
25333
+ Hashtags.list = function (data, params) {
25334
+ return Requests.processRoute(HashtagRoute.routes.list, data, {}, params);
25335
+ };
25336
+ /**
25337
+ * Get the top hashtags for a title, campaign, or schedule.
25338
+ *
25339
+ * @param params - e.g. { title_id: '...', limit: 10, sort: 'sum_views', start_date: 'YYYY-MM-DD', end_date: 'YYYY-MM-DD' }
25340
+ * @returns AxiosPromise of an array of aggregated hashtags
25341
+ */
25342
+ Hashtags.top = function (data, params) {
25343
+ return Requests.processRoute(HashtagRoute.routes.top, data, {}, params);
25344
+ };
25345
+ return Hashtags;
25346
+ }());
25347
+
25289
25348
  var Parser = /** @class */ (function () {
25290
25349
  function Parser() {
25291
25350
  }
@@ -25691,6 +25750,7 @@ var Glitch = /** @class */ (function () {
25691
25750
  Events: Events,
25692
25751
  Games: Games,
25693
25752
  GameShows: GameShows,
25753
+ Hashtags: Hashtags,
25694
25754
  Feedback: Feedback,
25695
25755
  Influencers: Influencers,
25696
25756
  Teams: Teams,