glitch-javascript-sdk 1.8.0 → 1.8.1
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 +84 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Ads.d.ts +31 -0
- package/dist/esm/api/Scheduler.d.ts +7 -0
- package/dist/esm/index.js +84 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +38 -0
- package/package.json +1 -1
- package/src/api/Ads.ts +87 -0
- package/src/api/Scheduler.ts +10 -0
- package/src/routes/AdsRoute.ts +30 -0
- package/src/routes/SchedulerRoute.ts +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -862,6 +862,37 @@ declare class Ads {
|
|
|
862
862
|
* @returns A response object with data (funding instruments)
|
|
863
863
|
*/
|
|
864
864
|
static listCampaignFundingInstruments<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
865
|
+
/**
|
|
866
|
+
* GET /ads/reddit/targeting/carriers
|
|
867
|
+
*
|
|
868
|
+
* Example usage:
|
|
869
|
+
* Ads.listRedditCarriers({ scheduler_id: 'uuid-of-scheduler', 'page.size': 50 })
|
|
870
|
+
*/
|
|
871
|
+
static listRedditCarriers<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
872
|
+
/**
|
|
873
|
+
* GET /ads/reddit/targeting/communities?names=sub1,sub2
|
|
874
|
+
*/
|
|
875
|
+
static listRedditCommunities<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
876
|
+
/**
|
|
877
|
+
* GET /ads/reddit/targeting/communities/search?query=xyz
|
|
878
|
+
*/
|
|
879
|
+
static searchRedditCommunities<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
880
|
+
/**
|
|
881
|
+
* GET /ads/reddit/targeting/devices
|
|
882
|
+
*/
|
|
883
|
+
static listRedditDevices<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
884
|
+
/**
|
|
885
|
+
* GET /ads/reddit/targeting/geolocations
|
|
886
|
+
*/
|
|
887
|
+
static listRedditGeolocations<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
888
|
+
/**
|
|
889
|
+
* GET /ads/reddit/targeting/interests
|
|
890
|
+
*/
|
|
891
|
+
static listRedditInterests<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
892
|
+
/**
|
|
893
|
+
* GET /ads/reddit/targeting/third_party_audiences
|
|
894
|
+
*/
|
|
895
|
+
static listRedditThirdPartyAudiences<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
865
896
|
}
|
|
866
897
|
|
|
867
898
|
declare class Communities {
|
|
@@ -4605,6 +4636,13 @@ declare class Scheduler {
|
|
|
4605
4636
|
* @returns promise
|
|
4606
4637
|
*/
|
|
4607
4638
|
static clearRedditAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4639
|
+
/**
|
|
4640
|
+
* Clear Reddit Ads OAuth credentials from a promotion schedule.
|
|
4641
|
+
*
|
|
4642
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
4643
|
+
* @returns promise
|
|
4644
|
+
*/
|
|
4645
|
+
static clearRedditAdsAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
4608
4646
|
/**
|
|
4609
4647
|
* Clear YouTube OAuth credentials from a promotion schedule.
|
|
4610
4648
|
*
|
package/package.json
CHANGED
package/src/api/Ads.ts
CHANGED
|
@@ -474,6 +474,93 @@ class Ads {
|
|
|
474
474
|
);
|
|
475
475
|
}
|
|
476
476
|
|
|
477
|
+
/**
|
|
478
|
+
* GET /ads/reddit/targeting/carriers
|
|
479
|
+
*
|
|
480
|
+
* Example usage:
|
|
481
|
+
* Ads.listRedditCarriers({ scheduler_id: 'uuid-of-scheduler', 'page.size': 50 })
|
|
482
|
+
*/
|
|
483
|
+
public static listRedditCarriers<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
484
|
+
return Requests.processRoute(
|
|
485
|
+
AdsRoute.routes.getRedditCarriers,
|
|
486
|
+
undefined,
|
|
487
|
+
undefined,
|
|
488
|
+
params
|
|
489
|
+
);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* GET /ads/reddit/targeting/communities?names=sub1,sub2
|
|
494
|
+
*/
|
|
495
|
+
public static listRedditCommunities<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
496
|
+
return Requests.processRoute(
|
|
497
|
+
AdsRoute.routes.getRedditCommunities,
|
|
498
|
+
undefined,
|
|
499
|
+
undefined,
|
|
500
|
+
params
|
|
501
|
+
);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* GET /ads/reddit/targeting/communities/search?query=xyz
|
|
506
|
+
*/
|
|
507
|
+
public static searchRedditCommunities<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
508
|
+
return Requests.processRoute(
|
|
509
|
+
AdsRoute.routes.searchRedditCommunities,
|
|
510
|
+
undefined,
|
|
511
|
+
undefined,
|
|
512
|
+
params
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* GET /ads/reddit/targeting/devices
|
|
518
|
+
*/
|
|
519
|
+
public static listRedditDevices<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
520
|
+
return Requests.processRoute(
|
|
521
|
+
AdsRoute.routes.getRedditDevices,
|
|
522
|
+
undefined,
|
|
523
|
+
undefined,
|
|
524
|
+
params
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* GET /ads/reddit/targeting/geolocations
|
|
530
|
+
*/
|
|
531
|
+
public static listRedditGeolocations<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
532
|
+
return Requests.processRoute(
|
|
533
|
+
AdsRoute.routes.getRedditGeolocations,
|
|
534
|
+
undefined,
|
|
535
|
+
undefined,
|
|
536
|
+
params
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* GET /ads/reddit/targeting/interests
|
|
542
|
+
*/
|
|
543
|
+
public static listRedditInterests<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
544
|
+
return Requests.processRoute(
|
|
545
|
+
AdsRoute.routes.getRedditInterests,
|
|
546
|
+
undefined,
|
|
547
|
+
undefined,
|
|
548
|
+
params
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* GET /ads/reddit/targeting/third_party_audiences
|
|
554
|
+
*/
|
|
555
|
+
public static listRedditThirdPartyAudiences<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
556
|
+
return Requests.processRoute(
|
|
557
|
+
AdsRoute.routes.getRedditThirdPartyAudiences,
|
|
558
|
+
undefined,
|
|
559
|
+
undefined,
|
|
560
|
+
params
|
|
561
|
+
);
|
|
562
|
+
}
|
|
563
|
+
|
|
477
564
|
}
|
|
478
565
|
|
|
479
566
|
export default Ads;
|
package/src/api/Scheduler.ts
CHANGED
|
@@ -260,6 +260,16 @@ class Scheduler {
|
|
|
260
260
|
return Requests.processRoute(SchedulerRoute.routes.clearRedditAuth, {}, { scheduler_id }, params);
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
+
/**
|
|
264
|
+
* Clear Reddit Ads OAuth credentials from a promotion schedule.
|
|
265
|
+
*
|
|
266
|
+
* @param scheduler_id The ID of the promotion schedule.
|
|
267
|
+
* @returns promise
|
|
268
|
+
*/
|
|
269
|
+
public static clearRedditAdsAuth<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
270
|
+
return Requests.processRoute(SchedulerRoute.routes.clearRedditAdsAuth, {}, { scheduler_id }, params);
|
|
271
|
+
}
|
|
272
|
+
|
|
263
273
|
/**
|
|
264
274
|
* Clear YouTube OAuth credentials from a promotion schedule.
|
|
265
275
|
*
|
package/src/routes/AdsRoute.ts
CHANGED
|
@@ -136,6 +136,36 @@ class AdsRoute {
|
|
|
136
136
|
url: "/ads/campaigns/{campaign_id}/groups/{group_id}/triggers/{trigger_id}",
|
|
137
137
|
method: HTTP_METHODS.DELETE,
|
|
138
138
|
},
|
|
139
|
+
|
|
140
|
+
// REDDIT TARGETING routes
|
|
141
|
+
getRedditCarriers: {
|
|
142
|
+
url: "/ads/reddit/targeting/carriers",
|
|
143
|
+
method: HTTP_METHODS.GET,
|
|
144
|
+
},
|
|
145
|
+
getRedditCommunities: {
|
|
146
|
+
url: "/ads/reddit/targeting/communities",
|
|
147
|
+
method: HTTP_METHODS.GET,
|
|
148
|
+
},
|
|
149
|
+
searchRedditCommunities: {
|
|
150
|
+
url: "/ads/reddit/targeting/communities/search",
|
|
151
|
+
method: HTTP_METHODS.GET,
|
|
152
|
+
},
|
|
153
|
+
getRedditDevices: {
|
|
154
|
+
url: "/ads/reddit/targeting/devices",
|
|
155
|
+
method: HTTP_METHODS.GET,
|
|
156
|
+
},
|
|
157
|
+
getRedditGeolocations: {
|
|
158
|
+
url: "/ads/reddit/targeting/geolocations",
|
|
159
|
+
method: HTTP_METHODS.GET,
|
|
160
|
+
},
|
|
161
|
+
getRedditInterests: {
|
|
162
|
+
url: "/ads/reddit/targeting/interests",
|
|
163
|
+
method: HTTP_METHODS.GET,
|
|
164
|
+
},
|
|
165
|
+
getRedditThirdPartyAudiences: {
|
|
166
|
+
url: "/ads/reddit/targeting/third_party_audiences",
|
|
167
|
+
method: HTTP_METHODS.GET,
|
|
168
|
+
},
|
|
139
169
|
};
|
|
140
170
|
}
|
|
141
171
|
|
|
@@ -32,6 +32,7 @@ class SchedulerRoute {
|
|
|
32
32
|
clearTwitchAuth: { url: '/schedulers/{scheduler_id}/clearTwitchAuth', method: HTTP_METHODS.DELETE },
|
|
33
33
|
clearKickAuth: { url: '/schedulers/{scheduler_id}/clearKickAuth', method: HTTP_METHODS.DELETE },
|
|
34
34
|
clearRedditAuth: { url: '/schedulers/{scheduler_id}/clearRedditAuth', method: HTTP_METHODS.DELETE },
|
|
35
|
+
clearRedditAdsAuth: { url: '/schedulers/{scheduler_id}/clearRedditAdsAuth', method: HTTP_METHODS.DELETE },
|
|
35
36
|
clearYouTubeAuth: { url: '/schedulers/{scheduler_id}/clearYouTubeAuth', method: HTTP_METHODS.DELETE },
|
|
36
37
|
clearPatreonAuth: { url: '/schedulers/{scheduler_id}/clearPatreonAuth', method: HTTP_METHODS.DELETE },
|
|
37
38
|
clearPinterestAuth: { url: '/schedulers/{scheduler_id}/clearPinterestAuth', method: HTTP_METHODS.DELETE },
|