glitch-javascript-sdk 1.8.6 → 1.8.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/index.d.ts CHANGED
@@ -910,6 +910,13 @@ declare class Ads {
910
910
  * @returns The synced AdGroup resource
911
911
  */
912
912
  static syncGroup<T>(campaign_id: string, group_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
913
+ static listRedditAdPosts<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
914
+ /** Create a Reddit ad-style social-media post */
915
+ static createRedditAdPost<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
916
+ /** Retrieve a single Reddit ad-style social-media post */
917
+ static viewRedditAdPost<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
918
+ /** Update a Reddit ad-style social-media post */
919
+ static updateRedditAdPost<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
913
920
  }
914
921
 
915
922
  declare class Communities {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.8.6",
3
+ "version": "1.8.7",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/api/Ads.ts CHANGED
@@ -601,6 +601,58 @@ class Ads {
601
601
  );
602
602
  }
603
603
 
604
+ public static listRedditAdPosts<T>(
605
+ params?: Record<string, any>
606
+ ): AxiosPromise<Response<T>> {
607
+ return Requests.processRoute(
608
+ AdsRoute.routes.getRedditAdPosts,
609
+ undefined,
610
+ undefined,
611
+ params
612
+ );
613
+ }
614
+
615
+ /** Create a Reddit ad-style social-media post */
616
+ public static createRedditAdPost<T>(
617
+ data?: object,
618
+ params?: Record<string, any>
619
+ ): AxiosPromise<Response<T>> {
620
+ return Requests.processRoute(
621
+ AdsRoute.routes.createRedditAdPost,
622
+ data,
623
+ {},
624
+ params
625
+ );
626
+ }
627
+
628
+ /** Retrieve a single Reddit ad-style social-media post */
629
+ public static viewRedditAdPost<T>(
630
+ post_id: string,
631
+ params?: Record<string, any>
632
+ ): AxiosPromise<Response<T>> {
633
+ return Requests.processRoute(
634
+ AdsRoute.routes.retrieveRedditAdPost,
635
+ {},
636
+ { post_id },
637
+ params
638
+ );
639
+ }
640
+
641
+ /** Update a Reddit ad-style social-media post */
642
+ public static updateRedditAdPost<T>(
643
+ post_id: string,
644
+ data?: object,
645
+ params?: Record<string, any>
646
+ ): AxiosPromise<Response<T>> {
647
+ return Requests.processRoute(
648
+ AdsRoute.routes.updateRedditAdPost,
649
+ data,
650
+ { post_id },
651
+ params
652
+ );
653
+ }
654
+
655
+
604
656
  }
605
657
 
606
658
  export default Ads;
@@ -175,6 +175,22 @@ class AdsRoute {
175
175
  url: "/ads/campaigns/{campaign_id}/groups/{group_id}/sync",
176
176
  method: HTTP_METHODS.POST,
177
177
  },
178
+ getRedditAdPosts: {
179
+ url: "/ads/posts/reddit",
180
+ method: HTTP_METHODS.GET,
181
+ },
182
+ createRedditAdPost: {
183
+ url: "/ads/posts/reddit",
184
+ method: HTTP_METHODS.POST,
185
+ },
186
+ retrieveRedditAdPost: {
187
+ url: "/ads/posts/reddit/{post_id}",
188
+ method: HTTP_METHODS.GET,
189
+ },
190
+ updateRedditAdPost: {
191
+ url: "/ads/posts/reddit/{post_id}",
192
+ method: HTTP_METHODS.PUT,
193
+ },
178
194
  };
179
195
  }
180
196