glitch-javascript-sdk 2.3.1 → 2.3.3

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/index.d.ts CHANGED
@@ -3603,6 +3603,13 @@ declare class SocialPosts {
3603
3603
  * @returns A promise
3604
3604
  */
3605
3605
  static getSocialPostAttributionReport<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
3606
+ /**
3607
+ * Get a summary of clicks for each short link in a post.
3608
+ *
3609
+ * @param post_id The ID of the social media post.
3610
+ * @returns A promise
3611
+ */
3612
+ static getLinkSummary<T>(post_id: string): AxiosPromise<Response<T>>;
3606
3613
  }
3607
3614
 
3608
3615
  declare class Titles {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "2.3.1",
3
+ "version": "2.3.3",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -318,6 +318,16 @@ class SocialPosts {
318
318
  return Requests.processRoute(SocialPostsRoute.routes.getSocialPostAttributionReport, undefined, undefined, params);
319
319
  }
320
320
 
321
+ /**
322
+ * Get a summary of clicks for each short link in a post.
323
+ *
324
+ * @param post_id The ID of the social media post.
325
+ * @returns A promise
326
+ */
327
+ public static getLinkSummary<T>(post_id: string): AxiosPromise<Response<T>> {
328
+ return Requests.processRoute(SocialPostsRoute.routes.getLinkSummary, undefined, { post_id });
329
+ }
330
+
321
331
  }
322
332
 
323
333
  export default SocialPosts;
@@ -22,6 +22,7 @@ class ShortLinksRoute {
22
22
  clickHeatmap: { url: '/shortlinks/reports/click-heatmap', method: HTTP_METHODS.GET },
23
23
  botAnalysis: { url: '/shortlinks/reports/bot-analysis', method: HTTP_METHODS.GET },
24
24
  attributionReport: { url: '/shortlinks/reports/attribution', method: HTTP_METHODS.GET },
25
+ getLinkSummary: { url: '/socialposts/{post_id}/link-summary', method: HTTP_METHODS.GET },
25
26
 
26
27
  // Social Media Post Reports
27
28
  socialPostDeepDive: { url: '/shortlinks/reports/social-post-deep-dive', method: HTTP_METHODS.GET },