@ichos/sdk 1.0.9 → 1.0.10
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/Client.d.ts +0 -3
- package/dist/Client.d.ts.map +1 -1
- package/dist/Client.js +0 -5
- package/dist/Client.js.map +1 -1
- package/dist/api/errors/ForbiddenError.d.ts +1 -1
- package/dist/api/errors/ForbiddenError.d.ts.map +1 -1
- package/dist/api/errors/ForbiddenError.js.map +1 -1
- package/dist/api/errors/TooManyRequestsError.d.ts +7 -0
- package/dist/api/errors/TooManyRequestsError.d.ts.map +1 -0
- package/dist/api/errors/TooManyRequestsError.js +18 -0
- package/dist/api/errors/TooManyRequestsError.js.map +1 -0
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/errors/index.d.ts.map +1 -1
- package/dist/api/errors/index.js +1 -0
- package/dist/api/errors/index.js.map +1 -1
- package/dist/api/resources/ads/client/Client.d.ts +12 -0
- package/dist/api/resources/ads/client/Client.d.ts.map +1 -1
- package/dist/api/resources/ads/client/Client.js +36 -0
- package/dist/api/resources/ads/client/Client.js.map +1 -1
- package/dist/api/resources/audio/client/Client.d.ts +7 -0
- package/dist/api/resources/audio/client/Client.d.ts.map +1 -1
- package/dist/api/resources/audio/client/Client.js +21 -0
- package/dist/api/resources/audio/client/Client.js.map +1 -1
- package/dist/api/resources/episodes/client/Client.d.ts +13 -19
- package/dist/api/resources/episodes/client/Client.d.ts.map +1 -1
- package/dist/api/resources/episodes/client/Client.js +37 -60
- package/dist/api/resources/episodes/client/Client.js.map +1 -1
- package/dist/api/resources/episodes/client/requests/EpisodeCreate.d.ts +0 -10
- package/dist/api/resources/episodes/client/requests/EpisodeCreate.d.ts.map +1 -1
- package/dist/api/resources/episodes/client/requests/EpisodeCreate.js +0 -6
- package/dist/api/resources/episodes/client/requests/EpisodeCreate.js.map +1 -1
- package/dist/api/resources/episodes/client/requests/EpisodeUpdate.d.ts +1 -10
- package/dist/api/resources/episodes/client/requests/EpisodeUpdate.d.ts.map +1 -1
- package/dist/api/resources/episodes/client/requests/EpisodeUpdate.js +0 -6
- package/dist/api/resources/episodes/client/requests/EpisodeUpdate.js.map +1 -1
- package/dist/api/resources/episodes/client/requests/index.d.ts +0 -1
- package/dist/api/resources/episodes/client/requests/index.d.ts.map +1 -1
- package/dist/api/resources/index.d.ts +0 -2
- package/dist/api/resources/index.d.ts.map +1 -1
- package/dist/api/resources/index.js +0 -2
- package/dist/api/resources/index.js.map +1 -1
- package/dist/api/resources/organizations/client/Client.d.ts +3 -0
- package/dist/api/resources/organizations/client/Client.d.ts.map +1 -1
- package/dist/api/resources/organizations/client/Client.js +9 -0
- package/dist/api/resources/organizations/client/Client.js.map +1 -1
- package/dist/api/resources/podcasts/client/Client.d.ts +34 -19
- package/dist/api/resources/podcasts/client/Client.d.ts.map +1 -1
- package/dist/api/resources/podcasts/client/Client.js +100 -59
- package/dist/api/resources/podcasts/client/Client.js.map +1 -1
- package/dist/api/resources/podcasts/client/requests/GetAverageMonthlyListenersRequest.d.ts.map +1 -0
- package/dist/api/resources/podcasts/client/requests/GetAverageMonthlyListenersRequest.js.map +1 -0
- package/dist/api/resources/podcasts/client/requests/PodcastCreate.d.ts +1 -0
- package/dist/api/resources/podcasts/client/requests/PodcastCreate.d.ts.map +1 -1
- package/dist/api/resources/podcasts/client/requests/PodcastCreate.js.map +1 -1
- package/dist/api/resources/podcasts/client/requests/PodcastUpdate.d.ts +1 -0
- package/dist/api/resources/podcasts/client/requests/PodcastUpdate.d.ts.map +1 -1
- package/dist/api/resources/podcasts/client/requests/PodcastUpdate.js.map +1 -1
- package/dist/api/resources/podcasts/client/requests/index.d.ts +1 -1
- package/dist/api/resources/podcasts/client/requests/index.d.ts.map +1 -1
- package/dist/api/resources/segments/client/Client.js.map +1 -1
- package/dist/api/resources/users/client/Client.d.ts +5 -0
- package/dist/api/resources/users/client/Client.d.ts.map +1 -1
- package/dist/api/resources/users/client/Client.js +15 -0
- package/dist/api/resources/users/client/Client.js.map +1 -1
- package/dist/api/resources/webhooks/client/Client.d.ts +4 -0
- package/dist/api/resources/webhooks/client/Client.d.ts.map +1 -1
- package/dist/api/resources/webhooks/client/Client.js +12 -0
- package/dist/api/resources/webhooks/client/Client.js.map +1 -1
- package/dist/api/types/EpisodeCreateResponse.d.ts +1 -1
- package/dist/api/types/EpisodeCreateResponse.d.ts.map +1 -1
- package/dist/api/types/{EpisodeCreatedResponseData.d.ts → EpisodeCreateResponseData.d.ts} +6 -6
- package/dist/api/types/EpisodeCreateResponseData.d.ts.map +1 -0
- package/dist/api/types/{EpisodeCreatedResponseData.js → EpisodeCreateResponseData.js} +7 -7
- package/dist/api/types/EpisodeCreateResponseData.js.map +1 -0
- package/dist/api/types/ForbiddenErrorBody.d.ts +6 -0
- package/dist/api/types/ForbiddenErrorBody.d.ts.map +1 -0
- package/dist/api/types/{StringOrNullResponse.js → ForbiddenErrorBody.js} +1 -1
- package/dist/api/types/ForbiddenErrorBody.js.map +1 -0
- package/dist/api/types/ForbiddenErrorResponse.d.ts +7 -0
- package/dist/api/types/ForbiddenErrorResponse.d.ts.map +1 -0
- package/dist/api/{resources/episodes/client/requests/GetEpisodeCoverRequest.js → types/ForbiddenErrorResponse.js} +1 -1
- package/dist/api/types/ForbiddenErrorResponse.js.map +1 -0
- package/dist/api/types/InternalServerErrorBody.d.ts +0 -3
- package/dist/api/types/InternalServerErrorBody.d.ts.map +1 -1
- package/dist/api/types/NotFoundErrorBody.d.ts +0 -3
- package/dist/api/types/NotFoundErrorBody.d.ts.map +1 -1
- package/dist/api/types/PodcastCreateResponse.d.ts +7 -0
- package/dist/api/types/PodcastCreateResponse.d.ts.map +1 -0
- package/dist/api/types/{RetrieveCoverResponse.js → PodcastCreateResponse.js} +1 -1
- package/dist/api/types/PodcastCreateResponse.js.map +1 -0
- package/dist/api/types/PodcastCreateResponseData.d.ts +79 -0
- package/dist/api/types/PodcastCreateResponseData.d.ts.map +1 -0
- package/dist/api/types/PodcastCreateResponseData.js +22 -0
- package/dist/api/types/PodcastCreateResponseData.js.map +1 -0
- package/dist/api/types/TooManyRequestsErrorBody.d.ts +7 -0
- package/dist/api/types/TooManyRequestsErrorBody.d.ts.map +1 -0
- package/dist/api/{resources/podcasts/client/requests/GetPodcastCoverRequest.js → types/TooManyRequestsErrorBody.js} +1 -1
- package/dist/api/types/TooManyRequestsErrorBody.js.map +1 -0
- package/dist/api/types/TooManyRequestsErrorResponse.d.ts +7 -0
- package/dist/api/types/TooManyRequestsErrorResponse.d.ts.map +1 -0
- package/dist/api/types/TooManyRequestsErrorResponse.js +3 -0
- package/dist/api/types/TooManyRequestsErrorResponse.js.map +1 -0
- package/dist/api/types/UnauthorizedErrorBody.d.ts +0 -3
- package/dist/api/types/UnauthorizedErrorBody.d.ts.map +1 -1
- package/dist/api/types/ValidationError.d.ts +8 -0
- package/dist/api/types/ValidationError.d.ts.map +1 -0
- package/dist/api/types/{UnauthenticatedError.js → ValidationError.js} +1 -1
- package/dist/api/types/ValidationError.js.map +1 -0
- package/dist/api/types/ValidationErrorResponse.d.ts +1 -1
- package/dist/api/types/ValidationErrorResponse.d.ts.map +1 -1
- package/dist/api/types/ValidationIssue.d.ts +1 -0
- package/dist/api/types/ValidationIssue.d.ts.map +1 -1
- package/dist/api/types/ValidationIssue.js +1 -0
- package/dist/api/types/ValidationIssue.js.map +1 -1
- package/dist/api/types/index.d.ts +8 -5
- package/dist/api/types/index.d.ts.map +1 -1
- package/dist/api/types/index.js +8 -5
- package/dist/api/types/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Client.ts +0 -6
- package/src/api/errors/ForbiddenError.ts +1 -1
- package/src/api/errors/TooManyRequestsError.ts +22 -0
- package/src/api/errors/index.ts +1 -0
- package/src/api/resources/ads/client/Client.ts +84 -12
- package/src/api/resources/audio/client/Client.ts +42 -0
- package/src/api/resources/episodes/client/Client.ts +85 -107
- package/src/api/resources/episodes/client/requests/EpisodeCreate.ts +0 -10
- package/src/api/resources/episodes/client/requests/EpisodeUpdate.ts +1 -10
- package/src/api/resources/episodes/client/requests/index.ts +0 -1
- package/src/api/resources/index.ts +0 -2
- package/src/api/resources/organizations/client/Client.ts +21 -3
- package/src/api/resources/podcasts/client/Client.ts +190 -110
- package/src/api/resources/podcasts/client/requests/PodcastCreate.ts +1 -0
- package/src/api/resources/podcasts/client/requests/PodcastUpdate.ts +1 -0
- package/src/api/resources/podcasts/client/requests/index.ts +1 -1
- package/src/api/resources/segments/client/Client.ts +6 -6
- package/src/api/resources/users/client/Client.ts +35 -5
- package/src/api/resources/webhooks/client/Client.ts +28 -4
- package/src/api/types/EpisodeCreateResponse.ts +1 -1
- package/src/api/types/{EpisodeCreatedResponseData.ts → EpisodeCreateResponseData.ts} +5 -5
- package/src/api/types/{UnauthenticatedError.ts → ForbiddenErrorBody.ts} +1 -4
- package/src/api/types/{UnauthenticatedErrorResponse.ts → ForbiddenErrorResponse.ts} +2 -2
- package/src/api/types/InternalServerErrorBody.ts +0 -3
- package/src/api/types/NotFoundErrorBody.ts +0 -3
- package/src/api/types/{StringOrNullResponse.ts → PodcastCreateResponse.ts} +2 -2
- package/src/api/types/PodcastCreateResponseData.ts +82 -0
- package/src/api/types/TooManyRequestsErrorBody.ts +8 -0
- package/src/api/types/TooManyRequestsErrorResponse.ts +9 -0
- package/src/api/types/UnauthorizedErrorBody.ts +0 -3
- package/src/api/types/ValidationError.ts +10 -0
- package/src/api/types/ValidationErrorResponse.ts +1 -1
- package/src/api/types/ValidationIssue.ts +1 -0
- package/src/api/types/index.ts +8 -5
- package/dist/api/resources/analytics/client/Client.d.ts +0 -29
- package/dist/api/resources/analytics/client/Client.d.ts.map +0 -1
- package/dist/api/resources/analytics/client/Client.js +0 -69
- package/dist/api/resources/analytics/client/Client.js.map +0 -1
- package/dist/api/resources/analytics/client/index.d.ts +0 -2
- package/dist/api/resources/analytics/client/index.d.ts.map +0 -1
- package/dist/api/resources/analytics/client/index.js +0 -2
- package/dist/api/resources/analytics/client/index.js.map +0 -1
- package/dist/api/resources/analytics/client/requests/GetAverageMonthlyListenersRequest.d.ts.map +0 -1
- package/dist/api/resources/analytics/client/requests/GetAverageMonthlyListenersRequest.js.map +0 -1
- package/dist/api/resources/analytics/client/requests/index.d.ts +0 -2
- package/dist/api/resources/analytics/client/requests/index.d.ts.map +0 -1
- package/dist/api/resources/analytics/client/requests/index.js +0 -2
- package/dist/api/resources/analytics/client/requests/index.js.map +0 -1
- package/dist/api/resources/analytics/index.d.ts +0 -2
- package/dist/api/resources/analytics/index.d.ts.map +0 -1
- package/dist/api/resources/analytics/index.js +0 -2
- package/dist/api/resources/analytics/index.js.map +0 -1
- package/dist/api/resources/episodes/client/requests/GetEpisodeCoverRequest.d.ts +0 -11
- package/dist/api/resources/episodes/client/requests/GetEpisodeCoverRequest.d.ts.map +0 -1
- package/dist/api/resources/episodes/client/requests/GetEpisodeCoverRequest.js.map +0 -1
- package/dist/api/resources/podcasts/client/requests/GetPodcastCoverRequest.d.ts +0 -11
- package/dist/api/resources/podcasts/client/requests/GetPodcastCoverRequest.d.ts.map +0 -1
- package/dist/api/resources/podcasts/client/requests/GetPodcastCoverRequest.js.map +0 -1
- package/dist/api/types/EpisodeCreatedResponseData.d.ts.map +0 -1
- package/dist/api/types/EpisodeCreatedResponseData.js.map +0 -1
- package/dist/api/types/RetrieveCoverResponse.d.ts +0 -12
- package/dist/api/types/RetrieveCoverResponse.d.ts.map +0 -1
- package/dist/api/types/RetrieveCoverResponse.js.map +0 -1
- package/dist/api/types/StringOrNullResponse.d.ts +0 -7
- package/dist/api/types/StringOrNullResponse.d.ts.map +0 -1
- package/dist/api/types/StringOrNullResponse.js.map +0 -1
- package/dist/api/types/UnauthenticatedError.d.ts +0 -9
- package/dist/api/types/UnauthenticatedError.d.ts.map +0 -1
- package/dist/api/types/UnauthenticatedError.js.map +0 -1
- package/dist/api/types/UnauthenticatedErrorResponse.d.ts +0 -7
- package/dist/api/types/UnauthenticatedErrorResponse.d.ts.map +0 -1
- package/dist/api/types/UnauthenticatedErrorResponse.js +0 -3
- package/dist/api/types/UnauthenticatedErrorResponse.js.map +0 -1
- package/src/api/resources/analytics/client/Client.ts +0 -110
- package/src/api/resources/analytics/client/index.ts +0 -1
- package/src/api/resources/analytics/client/requests/index.ts +0 -1
- package/src/api/resources/analytics/index.ts +0 -1
- package/src/api/resources/episodes/client/requests/GetEpisodeCoverRequest.ts +0 -12
- package/src/api/resources/podcasts/client/requests/GetPodcastCoverRequest.ts +0 -12
- package/src/api/types/RetrieveCoverResponse.ts +0 -15
- /package/dist/api/resources/{analytics → podcasts}/client/requests/GetAverageMonthlyListenersRequest.d.ts +0 -0
- /package/dist/api/resources/{analytics → podcasts}/client/requests/GetAverageMonthlyListenersRequest.js +0 -0
- /package/src/api/resources/{analytics → podcasts}/client/requests/GetAverageMonthlyListenersRequest.ts +0 -0
|
@@ -29,6 +29,7 @@ export class PodcastsClient {
|
|
|
29
29
|
*
|
|
30
30
|
* @throws {@link Ichos.UnauthorizedError}
|
|
31
31
|
* @throws {@link Ichos.ForbiddenError}
|
|
32
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
32
33
|
* @throws {@link Ichos.InternalServerError}
|
|
33
34
|
*
|
|
34
35
|
* @example
|
|
@@ -79,7 +80,12 @@ export class PodcastsClient {
|
|
|
79
80
|
);
|
|
80
81
|
case 403:
|
|
81
82
|
throw new Ichos.ForbiddenError(
|
|
82
|
-
_response.error.body as Ichos.
|
|
83
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
84
|
+
_response.rawResponse,
|
|
85
|
+
);
|
|
86
|
+
case 429:
|
|
87
|
+
throw new Ichos.TooManyRequestsError(
|
|
88
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
83
89
|
_response.rawResponse,
|
|
84
90
|
);
|
|
85
91
|
case 500:
|
|
@@ -108,6 +114,7 @@ export class PodcastsClient {
|
|
|
108
114
|
* @throws {@link Ichos.UnauthorizedError}
|
|
109
115
|
* @throws {@link Ichos.ForbiddenError}
|
|
110
116
|
* @throws {@link Ichos.NotFoundError}
|
|
117
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
111
118
|
* @throws {@link Ichos.InternalServerError}
|
|
112
119
|
*
|
|
113
120
|
* @example
|
|
@@ -119,14 +126,14 @@ export class PodcastsClient {
|
|
|
119
126
|
public createPodcast(
|
|
120
127
|
request: Ichos.PodcastCreate,
|
|
121
128
|
requestOptions?: PodcastsClient.RequestOptions,
|
|
122
|
-
): core.HttpResponsePromise<Ichos.
|
|
129
|
+
): core.HttpResponsePromise<Ichos.PodcastCreateResponse> {
|
|
123
130
|
return core.HttpResponsePromise.fromPromise(this.__createPodcast(request, requestOptions));
|
|
124
131
|
}
|
|
125
132
|
|
|
126
133
|
private async __createPodcast(
|
|
127
134
|
request: Ichos.PodcastCreate,
|
|
128
135
|
requestOptions?: PodcastsClient.RequestOptions,
|
|
129
|
-
): Promise<core.WithRawResponse<Ichos.
|
|
136
|
+
): Promise<core.WithRawResponse<Ichos.PodcastCreateResponse>> {
|
|
130
137
|
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
|
|
131
138
|
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
|
132
139
|
_authRequest.headers,
|
|
@@ -154,7 +161,7 @@ export class PodcastsClient {
|
|
|
154
161
|
logging: this._options.logging,
|
|
155
162
|
});
|
|
156
163
|
if (_response.ok) {
|
|
157
|
-
return { data: _response.body as Ichos.
|
|
164
|
+
return { data: _response.body as Ichos.PodcastCreateResponse, rawResponse: _response.rawResponse };
|
|
158
165
|
}
|
|
159
166
|
|
|
160
167
|
if (_response.error.reason === "status-code") {
|
|
@@ -166,7 +173,7 @@ export class PodcastsClient {
|
|
|
166
173
|
);
|
|
167
174
|
case 403:
|
|
168
175
|
throw new Ichos.ForbiddenError(
|
|
169
|
-
_response.error.body as Ichos.
|
|
176
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
170
177
|
_response.rawResponse,
|
|
171
178
|
);
|
|
172
179
|
case 404:
|
|
@@ -174,6 +181,11 @@ export class PodcastsClient {
|
|
|
174
181
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
175
182
|
_response.rawResponse,
|
|
176
183
|
);
|
|
184
|
+
case 429:
|
|
185
|
+
throw new Ichos.TooManyRequestsError(
|
|
186
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
187
|
+
_response.rawResponse,
|
|
188
|
+
);
|
|
177
189
|
case 500:
|
|
178
190
|
throw new Ichos.InternalServerError(
|
|
179
191
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -199,6 +211,7 @@ export class PodcastsClient {
|
|
|
199
211
|
*
|
|
200
212
|
* @throws {@link Ichos.UnauthorizedError}
|
|
201
213
|
* @throws {@link Ichos.ForbiddenError}
|
|
214
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
202
215
|
* @throws {@link Ichos.InternalServerError}
|
|
203
216
|
*
|
|
204
217
|
* @example
|
|
@@ -281,7 +294,12 @@ export class PodcastsClient {
|
|
|
281
294
|
);
|
|
282
295
|
case 403:
|
|
283
296
|
throw new Ichos.ForbiddenError(
|
|
284
|
-
_response.error.body as Ichos.
|
|
297
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
298
|
+
_response.rawResponse,
|
|
299
|
+
);
|
|
300
|
+
case 429:
|
|
301
|
+
throw new Ichos.TooManyRequestsError(
|
|
302
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
285
303
|
_response.rawResponse,
|
|
286
304
|
);
|
|
287
305
|
case 500:
|
|
@@ -310,6 +328,7 @@ export class PodcastsClient {
|
|
|
310
328
|
* @throws {@link Ichos.UnauthorizedError}
|
|
311
329
|
* @throws {@link Ichos.ForbiddenError}
|
|
312
330
|
* @throws {@link Ichos.NotFoundError}
|
|
331
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
313
332
|
* @throws {@link Ichos.InternalServerError}
|
|
314
333
|
*
|
|
315
334
|
* @example
|
|
@@ -367,7 +386,7 @@ export class PodcastsClient {
|
|
|
367
386
|
);
|
|
368
387
|
case 403:
|
|
369
388
|
throw new Ichos.ForbiddenError(
|
|
370
|
-
_response.error.body as Ichos.
|
|
389
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
371
390
|
_response.rawResponse,
|
|
372
391
|
);
|
|
373
392
|
case 404:
|
|
@@ -375,6 +394,11 @@ export class PodcastsClient {
|
|
|
375
394
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
376
395
|
_response.rawResponse,
|
|
377
396
|
);
|
|
397
|
+
case 429:
|
|
398
|
+
throw new Ichos.TooManyRequestsError(
|
|
399
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
400
|
+
_response.rawResponse,
|
|
401
|
+
);
|
|
378
402
|
case 500:
|
|
379
403
|
throw new Ichos.InternalServerError(
|
|
380
404
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -401,6 +425,7 @@ export class PodcastsClient {
|
|
|
401
425
|
* @throws {@link Ichos.UnauthorizedError}
|
|
402
426
|
* @throws {@link Ichos.ForbiddenError}
|
|
403
427
|
* @throws {@link Ichos.NotFoundError}
|
|
428
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
404
429
|
* @throws {@link Ichos.InternalServerError}
|
|
405
430
|
*
|
|
406
431
|
* @example
|
|
@@ -456,7 +481,7 @@ export class PodcastsClient {
|
|
|
456
481
|
);
|
|
457
482
|
case 403:
|
|
458
483
|
throw new Ichos.ForbiddenError(
|
|
459
|
-
_response.error.body as Ichos.
|
|
484
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
460
485
|
_response.rawResponse,
|
|
461
486
|
);
|
|
462
487
|
case 404:
|
|
@@ -464,6 +489,11 @@ export class PodcastsClient {
|
|
|
464
489
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
465
490
|
_response.rawResponse,
|
|
466
491
|
);
|
|
492
|
+
case 429:
|
|
493
|
+
throw new Ichos.TooManyRequestsError(
|
|
494
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
495
|
+
_response.rawResponse,
|
|
496
|
+
);
|
|
467
497
|
case 500:
|
|
468
498
|
throw new Ichos.InternalServerError(
|
|
469
499
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -495,6 +525,7 @@ export class PodcastsClient {
|
|
|
495
525
|
* @throws {@link Ichos.UnauthorizedError}
|
|
496
526
|
* @throws {@link Ichos.ForbiddenError}
|
|
497
527
|
* @throws {@link Ichos.NotFoundError}
|
|
528
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
498
529
|
* @throws {@link Ichos.InternalServerError}
|
|
499
530
|
*
|
|
500
531
|
* @example
|
|
@@ -554,7 +585,7 @@ export class PodcastsClient {
|
|
|
554
585
|
);
|
|
555
586
|
case 403:
|
|
556
587
|
throw new Ichos.ForbiddenError(
|
|
557
|
-
_response.error.body as Ichos.
|
|
588
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
558
589
|
_response.rawResponse,
|
|
559
590
|
);
|
|
560
591
|
case 404:
|
|
@@ -562,98 +593,9 @@ export class PodcastsClient {
|
|
|
562
593
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
563
594
|
_response.rawResponse,
|
|
564
595
|
);
|
|
565
|
-
case
|
|
566
|
-
throw new Ichos.
|
|
567
|
-
_response.error.body as Ichos.
|
|
568
|
-
_response.rawResponse,
|
|
569
|
-
);
|
|
570
|
-
default:
|
|
571
|
-
throw new errors.IchosError({
|
|
572
|
-
statusCode: _response.error.statusCode,
|
|
573
|
-
body: _response.error.body,
|
|
574
|
-
rawResponse: _response.rawResponse,
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
return handleNonStatusCodeError(
|
|
580
|
-
_response.error,
|
|
581
|
-
_response.rawResponse,
|
|
582
|
-
"POST",
|
|
583
|
-
"/v1/podcasts/{podcastId}/cover/pull",
|
|
584
|
-
);
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
/**
|
|
588
|
-
* Retrieve the current cover image URL for a podcast.
|
|
589
|
-
*
|
|
590
|
-
* @param {Ichos.GetPodcastCoverRequest} request
|
|
591
|
-
* @param {PodcastsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
592
|
-
*
|
|
593
|
-
* @throws {@link Ichos.UnauthorizedError}
|
|
594
|
-
* @throws {@link Ichos.ForbiddenError}
|
|
595
|
-
* @throws {@link Ichos.NotFoundError}
|
|
596
|
-
* @throws {@link Ichos.InternalServerError}
|
|
597
|
-
*
|
|
598
|
-
* @example
|
|
599
|
-
* await client.podcasts.getPodcastCover({
|
|
600
|
-
* podcastId: "podcastId"
|
|
601
|
-
* })
|
|
602
|
-
*/
|
|
603
|
-
public getPodcastCover(
|
|
604
|
-
request: Ichos.GetPodcastCoverRequest,
|
|
605
|
-
requestOptions?: PodcastsClient.RequestOptions,
|
|
606
|
-
): core.HttpResponsePromise<Ichos.StringOrNullResponse> {
|
|
607
|
-
return core.HttpResponsePromise.fromPromise(this.__getPodcastCover(request, requestOptions));
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
private async __getPodcastCover(
|
|
611
|
-
request: Ichos.GetPodcastCoverRequest,
|
|
612
|
-
requestOptions?: PodcastsClient.RequestOptions,
|
|
613
|
-
): Promise<core.WithRawResponse<Ichos.StringOrNullResponse>> {
|
|
614
|
-
const { podcastId } = request;
|
|
615
|
-
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
|
|
616
|
-
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
|
617
|
-
_authRequest.headers,
|
|
618
|
-
this._options?.headers,
|
|
619
|
-
mergeOnlyDefinedHeaders({ "x-virtual-user": requestOptions?.virtualUser ?? this._options?.virtualUser }),
|
|
620
|
-
requestOptions?.headers,
|
|
621
|
-
);
|
|
622
|
-
const _response = await core.fetcher({
|
|
623
|
-
url: core.url.join(
|
|
624
|
-
(await core.Supplier.get(this._options.baseUrl)) ??
|
|
625
|
-
(await core.Supplier.get(this._options.environment)) ??
|
|
626
|
-
environments.IchosEnvironment.Default,
|
|
627
|
-
`v1/podcasts/${core.url.encodePathParam(podcastId)}/cover`,
|
|
628
|
-
),
|
|
629
|
-
method: "GET",
|
|
630
|
-
headers: _headers,
|
|
631
|
-
queryParameters: requestOptions?.queryParams,
|
|
632
|
-
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
633
|
-
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
634
|
-
abortSignal: requestOptions?.abortSignal,
|
|
635
|
-
fetchFn: this._options?.fetch,
|
|
636
|
-
logging: this._options.logging,
|
|
637
|
-
});
|
|
638
|
-
if (_response.ok) {
|
|
639
|
-
return { data: _response.body as Ichos.StringOrNullResponse, rawResponse: _response.rawResponse };
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
if (_response.error.reason === "status-code") {
|
|
643
|
-
switch (_response.error.statusCode) {
|
|
644
|
-
case 401:
|
|
645
|
-
throw new Ichos.UnauthorizedError(
|
|
646
|
-
_response.error.body as Ichos.UnauthorizedErrorResponse,
|
|
647
|
-
_response.rawResponse,
|
|
648
|
-
);
|
|
649
|
-
case 403:
|
|
650
|
-
throw new Ichos.ForbiddenError(
|
|
651
|
-
_response.error.body as Ichos.UnauthenticatedErrorResponse,
|
|
652
|
-
_response.rawResponse,
|
|
653
|
-
);
|
|
654
|
-
case 404:
|
|
655
|
-
throw new Ichos.NotFoundError(
|
|
656
|
-
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
596
|
+
case 429:
|
|
597
|
+
throw new Ichos.TooManyRequestsError(
|
|
598
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
657
599
|
_response.rawResponse,
|
|
658
600
|
);
|
|
659
601
|
case 500:
|
|
@@ -673,8 +615,8 @@ export class PodcastsClient {
|
|
|
673
615
|
return handleNonStatusCodeError(
|
|
674
616
|
_response.error,
|
|
675
617
|
_response.rawResponse,
|
|
676
|
-
"
|
|
677
|
-
"/v1/podcasts/{podcastId}/cover",
|
|
618
|
+
"POST",
|
|
619
|
+
"/v1/podcasts/{podcastId}/cover/pull",
|
|
678
620
|
);
|
|
679
621
|
}
|
|
680
622
|
|
|
@@ -687,6 +629,7 @@ export class PodcastsClient {
|
|
|
687
629
|
* @throws {@link Ichos.UnauthorizedError}
|
|
688
630
|
* @throws {@link Ichos.ForbiddenError}
|
|
689
631
|
* @throws {@link Ichos.NotFoundError}
|
|
632
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
690
633
|
* @throws {@link Ichos.InternalServerError}
|
|
691
634
|
*
|
|
692
635
|
* @example
|
|
@@ -742,7 +685,7 @@ export class PodcastsClient {
|
|
|
742
685
|
);
|
|
743
686
|
case 403:
|
|
744
687
|
throw new Ichos.ForbiddenError(
|
|
745
|
-
_response.error.body as Ichos.
|
|
688
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
746
689
|
_response.rawResponse,
|
|
747
690
|
);
|
|
748
691
|
case 404:
|
|
@@ -750,6 +693,11 @@ export class PodcastsClient {
|
|
|
750
693
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
751
694
|
_response.rawResponse,
|
|
752
695
|
);
|
|
696
|
+
case 429:
|
|
697
|
+
throw new Ichos.TooManyRequestsError(
|
|
698
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
699
|
+
_response.rawResponse,
|
|
700
|
+
);
|
|
753
701
|
case 500:
|
|
754
702
|
throw new Ichos.InternalServerError(
|
|
755
703
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -776,6 +724,7 @@ export class PodcastsClient {
|
|
|
776
724
|
* @throws {@link Ichos.UnauthorizedError}
|
|
777
725
|
* @throws {@link Ichos.ForbiddenError}
|
|
778
726
|
* @throws {@link Ichos.NotFoundError}
|
|
727
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
779
728
|
* @throws {@link Ichos.InternalServerError}
|
|
780
729
|
*
|
|
781
730
|
* @example
|
|
@@ -831,7 +780,7 @@ export class PodcastsClient {
|
|
|
831
780
|
);
|
|
832
781
|
case 403:
|
|
833
782
|
throw new Ichos.ForbiddenError(
|
|
834
|
-
_response.error.body as Ichos.
|
|
783
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
835
784
|
_response.rawResponse,
|
|
836
785
|
);
|
|
837
786
|
case 404:
|
|
@@ -839,6 +788,11 @@ export class PodcastsClient {
|
|
|
839
788
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
840
789
|
_response.rawResponse,
|
|
841
790
|
);
|
|
791
|
+
case 429:
|
|
792
|
+
throw new Ichos.TooManyRequestsError(
|
|
793
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
794
|
+
_response.rawResponse,
|
|
795
|
+
);
|
|
842
796
|
case 500:
|
|
843
797
|
throw new Ichos.InternalServerError(
|
|
844
798
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -865,6 +819,7 @@ export class PodcastsClient {
|
|
|
865
819
|
* @throws {@link Ichos.UnauthorizedError}
|
|
866
820
|
* @throws {@link Ichos.ForbiddenError}
|
|
867
821
|
* @throws {@link Ichos.NotFoundError}
|
|
822
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
868
823
|
* @throws {@link Ichos.InternalServerError}
|
|
869
824
|
*
|
|
870
825
|
* @example
|
|
@@ -923,7 +878,7 @@ export class PodcastsClient {
|
|
|
923
878
|
);
|
|
924
879
|
case 403:
|
|
925
880
|
throw new Ichos.ForbiddenError(
|
|
926
|
-
_response.error.body as Ichos.
|
|
881
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
927
882
|
_response.rawResponse,
|
|
928
883
|
);
|
|
929
884
|
case 404:
|
|
@@ -931,6 +886,11 @@ export class PodcastsClient {
|
|
|
931
886
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
932
887
|
_response.rawResponse,
|
|
933
888
|
);
|
|
889
|
+
case 429:
|
|
890
|
+
throw new Ichos.TooManyRequestsError(
|
|
891
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
892
|
+
_response.rawResponse,
|
|
893
|
+
);
|
|
934
894
|
case 500:
|
|
935
895
|
throw new Ichos.InternalServerError(
|
|
936
896
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -958,6 +918,7 @@ export class PodcastsClient {
|
|
|
958
918
|
* @throws {@link Ichos.UnauthorizedError}
|
|
959
919
|
* @throws {@link Ichos.ForbiddenError}
|
|
960
920
|
* @throws {@link Ichos.NotFoundError}
|
|
921
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
961
922
|
* @throws {@link Ichos.InternalServerError}
|
|
962
923
|
*
|
|
963
924
|
* @example
|
|
@@ -1013,7 +974,7 @@ export class PodcastsClient {
|
|
|
1013
974
|
);
|
|
1014
975
|
case 403:
|
|
1015
976
|
throw new Ichos.ForbiddenError(
|
|
1016
|
-
_response.error.body as Ichos.
|
|
977
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
1017
978
|
_response.rawResponse,
|
|
1018
979
|
);
|
|
1019
980
|
case 404:
|
|
@@ -1021,6 +982,11 @@ export class PodcastsClient {
|
|
|
1021
982
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
1022
983
|
_response.rawResponse,
|
|
1023
984
|
);
|
|
985
|
+
case 429:
|
|
986
|
+
throw new Ichos.TooManyRequestsError(
|
|
987
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
988
|
+
_response.rawResponse,
|
|
989
|
+
);
|
|
1024
990
|
case 500:
|
|
1025
991
|
throw new Ichos.InternalServerError(
|
|
1026
992
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -1047,6 +1013,7 @@ export class PodcastsClient {
|
|
|
1047
1013
|
* @throws {@link Ichos.UnauthorizedError}
|
|
1048
1014
|
* @throws {@link Ichos.ForbiddenError}
|
|
1049
1015
|
* @throws {@link Ichos.NotFoundError}
|
|
1016
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
1050
1017
|
* @throws {@link Ichos.InternalServerError}
|
|
1051
1018
|
*
|
|
1052
1019
|
* @example
|
|
@@ -1102,7 +1069,7 @@ export class PodcastsClient {
|
|
|
1102
1069
|
);
|
|
1103
1070
|
case 403:
|
|
1104
1071
|
throw new Ichos.ForbiddenError(
|
|
1105
|
-
_response.error.body as Ichos.
|
|
1072
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
1106
1073
|
_response.rawResponse,
|
|
1107
1074
|
);
|
|
1108
1075
|
case 404:
|
|
@@ -1110,6 +1077,11 @@ export class PodcastsClient {
|
|
|
1110
1077
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
1111
1078
|
_response.rawResponse,
|
|
1112
1079
|
);
|
|
1080
|
+
case 429:
|
|
1081
|
+
throw new Ichos.TooManyRequestsError(
|
|
1082
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
1083
|
+
_response.rawResponse,
|
|
1084
|
+
);
|
|
1113
1085
|
case 500:
|
|
1114
1086
|
throw new Ichos.InternalServerError(
|
|
1115
1087
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -1141,6 +1113,7 @@ export class PodcastsClient {
|
|
|
1141
1113
|
* @throws {@link Ichos.UnauthorizedError}
|
|
1142
1114
|
* @throws {@link Ichos.ForbiddenError}
|
|
1143
1115
|
* @throws {@link Ichos.NotFoundError}
|
|
1116
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
1144
1117
|
* @throws {@link Ichos.InternalServerError}
|
|
1145
1118
|
*
|
|
1146
1119
|
* @example
|
|
@@ -1196,7 +1169,7 @@ export class PodcastsClient {
|
|
|
1196
1169
|
);
|
|
1197
1170
|
case 403:
|
|
1198
1171
|
throw new Ichos.ForbiddenError(
|
|
1199
|
-
_response.error.body as Ichos.
|
|
1172
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
1200
1173
|
_response.rawResponse,
|
|
1201
1174
|
);
|
|
1202
1175
|
case 404:
|
|
@@ -1204,6 +1177,11 @@ export class PodcastsClient {
|
|
|
1204
1177
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
1205
1178
|
_response.rawResponse,
|
|
1206
1179
|
);
|
|
1180
|
+
case 429:
|
|
1181
|
+
throw new Ichos.TooManyRequestsError(
|
|
1182
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
1183
|
+
_response.rawResponse,
|
|
1184
|
+
);
|
|
1207
1185
|
case 500:
|
|
1208
1186
|
throw new Ichos.InternalServerError(
|
|
1209
1187
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -1235,6 +1213,7 @@ export class PodcastsClient {
|
|
|
1235
1213
|
* @throws {@link Ichos.UnauthorizedError}
|
|
1236
1214
|
* @throws {@link Ichos.ForbiddenError}
|
|
1237
1215
|
* @throws {@link Ichos.NotFoundError}
|
|
1216
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
1238
1217
|
* @throws {@link Ichos.InternalServerError}
|
|
1239
1218
|
*
|
|
1240
1219
|
* @example
|
|
@@ -1290,7 +1269,7 @@ export class PodcastsClient {
|
|
|
1290
1269
|
);
|
|
1291
1270
|
case 403:
|
|
1292
1271
|
throw new Ichos.ForbiddenError(
|
|
1293
|
-
_response.error.body as Ichos.
|
|
1272
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
1294
1273
|
_response.rawResponse,
|
|
1295
1274
|
);
|
|
1296
1275
|
case 404:
|
|
@@ -1298,6 +1277,11 @@ export class PodcastsClient {
|
|
|
1298
1277
|
_response.error.body as Ichos.NotFoundErrorResponse,
|
|
1299
1278
|
_response.rawResponse,
|
|
1300
1279
|
);
|
|
1280
|
+
case 429:
|
|
1281
|
+
throw new Ichos.TooManyRequestsError(
|
|
1282
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
1283
|
+
_response.rawResponse,
|
|
1284
|
+
);
|
|
1301
1285
|
case 500:
|
|
1302
1286
|
throw new Ichos.InternalServerError(
|
|
1303
1287
|
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
@@ -1319,4 +1303,100 @@ export class PodcastsClient {
|
|
|
1319
1303
|
"/v1/podcasts/{podcastId}/analytics/listens",
|
|
1320
1304
|
);
|
|
1321
1305
|
}
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* Get the average monthly listeners for a podcast, calculated from the unique listeners in the report.
|
|
1309
|
+
* If the report spans less than 30 days, or only contains data for a single month,
|
|
1310
|
+
* this will return the total unique listeners in the report.
|
|
1311
|
+
*
|
|
1312
|
+
* @param {Ichos.GetAverageMonthlyListenersRequest} request
|
|
1313
|
+
* @param {PodcastsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1314
|
+
*
|
|
1315
|
+
* @throws {@link Ichos.UnauthorizedError}
|
|
1316
|
+
* @throws {@link Ichos.ForbiddenError}
|
|
1317
|
+
* @throws {@link Ichos.TooManyRequestsError}
|
|
1318
|
+
* @throws {@link Ichos.InternalServerError}
|
|
1319
|
+
*
|
|
1320
|
+
* @example
|
|
1321
|
+
* await client.podcasts.getAverageMonthlyListeners({
|
|
1322
|
+
* podcastId: "podcastId"
|
|
1323
|
+
* })
|
|
1324
|
+
*/
|
|
1325
|
+
public getAverageMonthlyListeners(
|
|
1326
|
+
request: Ichos.GetAverageMonthlyListenersRequest,
|
|
1327
|
+
requestOptions?: PodcastsClient.RequestOptions,
|
|
1328
|
+
): core.HttpResponsePromise<Ichos.MonthlyListenersResponse> {
|
|
1329
|
+
return core.HttpResponsePromise.fromPromise(this.__getAverageMonthlyListeners(request, requestOptions));
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
private async __getAverageMonthlyListeners(
|
|
1333
|
+
request: Ichos.GetAverageMonthlyListenersRequest,
|
|
1334
|
+
requestOptions?: PodcastsClient.RequestOptions,
|
|
1335
|
+
): Promise<core.WithRawResponse<Ichos.MonthlyListenersResponse>> {
|
|
1336
|
+
const { podcastId } = request;
|
|
1337
|
+
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
|
|
1338
|
+
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
|
1339
|
+
_authRequest.headers,
|
|
1340
|
+
this._options?.headers,
|
|
1341
|
+
mergeOnlyDefinedHeaders({ "x-virtual-user": requestOptions?.virtualUser ?? this._options?.virtualUser }),
|
|
1342
|
+
requestOptions?.headers,
|
|
1343
|
+
);
|
|
1344
|
+
const _response = await core.fetcher({
|
|
1345
|
+
url: core.url.join(
|
|
1346
|
+
(await core.Supplier.get(this._options.baseUrl)) ??
|
|
1347
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
1348
|
+
environments.IchosEnvironment.Default,
|
|
1349
|
+
`v1/analytics/${core.url.encodePathParam(podcastId)}/monthly-listeners`,
|
|
1350
|
+
),
|
|
1351
|
+
method: "GET",
|
|
1352
|
+
headers: _headers,
|
|
1353
|
+
queryParameters: requestOptions?.queryParams,
|
|
1354
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
1355
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
1356
|
+
abortSignal: requestOptions?.abortSignal,
|
|
1357
|
+
fetchFn: this._options?.fetch,
|
|
1358
|
+
logging: this._options.logging,
|
|
1359
|
+
});
|
|
1360
|
+
if (_response.ok) {
|
|
1361
|
+
return { data: _response.body as Ichos.MonthlyListenersResponse, rawResponse: _response.rawResponse };
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
if (_response.error.reason === "status-code") {
|
|
1365
|
+
switch (_response.error.statusCode) {
|
|
1366
|
+
case 401:
|
|
1367
|
+
throw new Ichos.UnauthorizedError(
|
|
1368
|
+
_response.error.body as Ichos.UnauthorizedErrorResponse,
|
|
1369
|
+
_response.rawResponse,
|
|
1370
|
+
);
|
|
1371
|
+
case 403:
|
|
1372
|
+
throw new Ichos.ForbiddenError(
|
|
1373
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
1374
|
+
_response.rawResponse,
|
|
1375
|
+
);
|
|
1376
|
+
case 429:
|
|
1377
|
+
throw new Ichos.TooManyRequestsError(
|
|
1378
|
+
_response.error.body as Ichos.TooManyRequestsErrorResponse,
|
|
1379
|
+
_response.rawResponse,
|
|
1380
|
+
);
|
|
1381
|
+
case 500:
|
|
1382
|
+
throw new Ichos.InternalServerError(
|
|
1383
|
+
_response.error.body as Ichos.InternalServerErrorResponse,
|
|
1384
|
+
_response.rawResponse,
|
|
1385
|
+
);
|
|
1386
|
+
default:
|
|
1387
|
+
throw new errors.IchosError({
|
|
1388
|
+
statusCode: _response.error.statusCode,
|
|
1389
|
+
body: _response.error.body,
|
|
1390
|
+
rawResponse: _response.rawResponse,
|
|
1391
|
+
});
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
return handleNonStatusCodeError(
|
|
1396
|
+
_response.error,
|
|
1397
|
+
_response.rawResponse,
|
|
1398
|
+
"GET",
|
|
1399
|
+
"/v1/analytics/{podcastId}/monthly-listeners",
|
|
1400
|
+
);
|
|
1401
|
+
}
|
|
1322
1402
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { DeletePodcastRequest } from "./DeletePodcastRequest.js";
|
|
2
2
|
export type { GeneratePodcastCoverUploadUrlRequest } from "./GeneratePodcastCoverUploadUrlRequest.js";
|
|
3
|
-
export type {
|
|
3
|
+
export type { GetAverageMonthlyListenersRequest } from "./GetAverageMonthlyListenersRequest.js";
|
|
4
4
|
export type { GetPodcastListenersReportRequest } from "./GetPodcastListenersReportRequest.js";
|
|
5
5
|
export type { GetPodcastRequest } from "./GetPodcastRequest.js";
|
|
6
6
|
export type { GetPodcastRssRequest } from "./GetPodcastRssRequest.js";
|
|
@@ -80,7 +80,7 @@ export class SegmentsClient {
|
|
|
80
80
|
);
|
|
81
81
|
case 403:
|
|
82
82
|
throw new Ichos.ForbiddenError(
|
|
83
|
-
_response.error.body as Ichos.
|
|
83
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
84
84
|
_response.rawResponse,
|
|
85
85
|
);
|
|
86
86
|
case 404:
|
|
@@ -172,7 +172,7 @@ export class SegmentsClient {
|
|
|
172
172
|
);
|
|
173
173
|
case 403:
|
|
174
174
|
throw new Ichos.ForbiddenError(
|
|
175
|
-
_response.error.body as Ichos.
|
|
175
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
176
176
|
_response.rawResponse,
|
|
177
177
|
);
|
|
178
178
|
case 500:
|
|
@@ -259,7 +259,7 @@ export class SegmentsClient {
|
|
|
259
259
|
);
|
|
260
260
|
case 403:
|
|
261
261
|
throw new Ichos.ForbiddenError(
|
|
262
|
-
_response.error.body as Ichos.
|
|
262
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
263
263
|
_response.rawResponse,
|
|
264
264
|
);
|
|
265
265
|
case 500:
|
|
@@ -348,7 +348,7 @@ export class SegmentsClient {
|
|
|
348
348
|
);
|
|
349
349
|
case 403:
|
|
350
350
|
throw new Ichos.ForbiddenError(
|
|
351
|
-
_response.error.body as Ichos.
|
|
351
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
352
352
|
_response.rawResponse,
|
|
353
353
|
);
|
|
354
354
|
case 404:
|
|
@@ -448,7 +448,7 @@ export class SegmentsClient {
|
|
|
448
448
|
);
|
|
449
449
|
case 403:
|
|
450
450
|
throw new Ichos.ForbiddenError(
|
|
451
|
-
_response.error.body as Ichos.
|
|
451
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
452
452
|
_response.rawResponse,
|
|
453
453
|
);
|
|
454
454
|
case 404:
|
|
@@ -540,7 +540,7 @@ export class SegmentsClient {
|
|
|
540
540
|
);
|
|
541
541
|
case 403:
|
|
542
542
|
throw new Ichos.ForbiddenError(
|
|
543
|
-
_response.error.body as Ichos.
|
|
543
|
+
_response.error.body as Ichos.ForbiddenErrorResponse,
|
|
544
544
|
_response.rawResponse,
|
|
545
545
|
);
|
|
546
546
|
case 404:
|