comic-vine-sdk 1.1.1 → 1.2.0

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Comic Vine SDK
2
2
 
3
- The Comic Vine SDK provides convenient access to the [Comic Vine API][comic-vine-api] from server side applications written in JavaScript/TypeScript. The API provides full access to the structured-wiki content.
3
+ The Comic Vine SDK provides convenient access to the [Comic Vine API][comic-vine-api] from applications written in JavaScript/TypeScript. The API provides full access to the structured-wiki content.
4
4
 
5
5
  ## Table of Contents
6
6
 
@@ -14,6 +14,7 @@ The Comic Vine SDK provides convenient access to the [Comic Vine API][comic-vine
14
14
  - [Fetch a resource list](#fetch-a-resource-list)
15
15
  - [Limit the fields in the response payload](#limit-the-fields-in-the-response-payload)
16
16
  - [Pagination](#pagination)
17
+ - [Auto Pagination](#auto-pagination)
17
18
  - [Run Locally](#run-locally)
18
19
  - [Authors](#authors)
19
20
 
@@ -117,7 +118,9 @@ new ComicVine('your-api-key-here', options);
117
118
 
118
119
  **Default: https://comicvine.gamespot.com/api/**
119
120
 
120
- If using the package in node then leave this as the default value. The Comic Vine API does not allow [cross-origin](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) requests. This option could be used to proxy the request assuming you have some safe way for the web client to fetch your api key, you don't want to send the api key to the browser in your JS bundle.
121
+ If using this package in node this should not need set, the default value will work.
122
+
123
+ If using the package in a web browser then The Comic Vine API does not allow [cross-origin](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) requests. This option could be used to proxy the request assuming you have some safe way for the web client to fetch your api key, you don't want to send the api key to the browser in your JS bundle.
121
124
 
122
125
  ```js
123
126
  import ComicVine from 'comic-vine-sdk';
@@ -208,9 +211,39 @@ const comicVine = new ComicVine('your-api-key-here');
208
211
 
209
212
  ### Pagination
210
213
 
211
- The Comic Vine API supports pagination, this library currently just exposes the properties returned by the API. In a future version this will be updated to make pagination easier to use.
214
+ The Comic Vine API provides offset based pagination, this is done by providing a `limit` and `offset` in the request. The `limit` is the number of items to be returned in one page and the offset is the number of items to skip.
215
+
216
+ To fetch a page with 50 results and then move to hte next page:
217
+
218
+ ```js
219
+ import ComicVine from 'comic-vine-sdk';
220
+ const comicVine = new ComicVine('your-api-key-here');
221
+
222
+ (async () => {
223
+ try {
224
+ const limit: 50;
225
+ const filter: { name: 'The Boys' },
226
+
227
+ // Retrieve the first 50 issues of The Boys (Page 1)
228
+ const issuesPage1 = await comicVine.issue.list({ limit, filter });
229
+ console.log(`Total issues: ${issuesPage1.data.length}`);
230
+ console.log(issuesPage1.data.map(issue => issue.name).join(', '));
231
+
232
+ // Retrieve the next 50 issues of The Boys (Page 2)
233
+ const issuesPage2 = await comicVine.issue.list({ limit, filter, offset: 50 });
234
+ console.log(`Total issues: ${issuesPage2.data.length}`);
235
+ console.log(issuesPage2.data.map(issue => issue.name).join(', '));
236
+ } catch (error) {
237
+ console.error(error);
238
+ }
239
+ })();
240
+ ```
241
+
242
+ #### Auto Pagination
243
+
244
+ This feature allows calling any list method on a resource with `for await...of` rather than having to track the offset for making subsequent requests.
212
245
 
213
- The following example fetches all volumes of the Boys with 20 items per page, it will continue making requests until all results are retrieved.
246
+ It will make the first request and return an item from that response on each iteration, when there are no more items to return it will automatically fetch the next page from the API. This will continue until all pages have been retrieved.
214
247
 
215
248
  ```js
216
249
  import ComicVine from 'comic-vine-sdk';
@@ -218,24 +251,18 @@ const comicVine = new ComicVine('your-api-key-here');
218
251
 
219
252
  (async () => {
220
253
  try {
221
- const limit = 20;
222
- const volumes = [];
223
- let hasMoreResults = true;
224
- let pageNumber = 0;
225
- do {
226
- pageNumber++;
227
- const page = await comicVine.volume.list({
228
- filter: { name: 'The Boys' },
229
- limit,
230
- offset: limit * pageNumber - limit,
231
- });
232
- volumes.push(...page.data);
233
- hasMoreResults = volumes.length < page.numberOfTotalResults;
234
- } while (hasMoreResults);
235
-
236
- console.log(`Number of requests made to Comic Vine: ${pageNumber}`); // 2
237
- console.log(`Total volumes: ${volumes.length}`); // 35
238
- console.log(volumes); // An array of volume objects
254
+ const listOptions = {
255
+ filter: { name: 'The Boys' },
256
+ limit,
257
+ };
258
+
259
+ let issueNames = [];
260
+ for await (const issue of comicVine.issue.list(listOptions)) {
261
+ issueName.push(issue.name);
262
+ }
263
+
264
+ console.log(`Total issues: ${issueNames.length}`);
265
+ console.log(issueNames);
239
266
  } catch (error) {
240
267
  console.error(error);
241
268
  }
@@ -6,11 +6,14 @@ export declare abstract class BaseResource<Resource, ResourceListItem> {
6
6
  protected abstract resourceType: ResourceType;
7
7
  constructor(httpClient: HttpClient, urlBuilder: UrlBuilder);
8
8
  retrieve<FieldKey extends keyof Resource>(id: number, options?: RetrieveOptions<FieldKey>): Promise<Resource | Pick<Resource, FieldKey>>;
9
+ private fetchPage;
9
10
  list<FieldKey extends keyof ResourceListItem>(options?: ListOptions<FieldKey, PickFilters<ResourceListItem>>): Promise<{
10
11
  limit: number;
11
12
  numberOfPageResults: number;
12
13
  numberOfTotalResults: number;
13
14
  offset: number;
14
- data: (ResourceListItem | Pick<ResourceListItem, FieldKey>)[];
15
- }>;
15
+ data: (ResourceListItem | Pick<ResourceListItem, keyof ResourceListItem>)[];
16
+ }> & {
17
+ [Symbol.asyncIterator](): AsyncGenerator<Awaited<ResourceListItem> | Awaited<Pick<ResourceListItem, keyof ResourceListItem>>, void, unknown>;
18
+ };
16
19
  }
@@ -8,6 +8,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
12
+ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
13
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
14
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
15
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
16
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
17
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
18
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
19
+ function fulfill(value) { resume("next", value); }
20
+ function reject(value) { resume("throw", value); }
21
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
22
+ };
11
23
  Object.defineProperty(exports, "__esModule", { value: true });
12
24
  exports.BaseResource = void 0;
13
25
  class BaseResource {
@@ -23,7 +35,7 @@ class BaseResource {
23
35
  return response.results;
24
36
  });
25
37
  }
26
- list(options) {
38
+ fetchPage(options) {
27
39
  return __awaiter(this, void 0, void 0, function* () {
28
40
  const url = this.urlBuilder.list(this.resourceType, options);
29
41
  const fieldList = options === null || options === void 0 ? void 0 : options.fieldList;
@@ -37,6 +49,37 @@ class BaseResource {
37
49
  };
38
50
  });
39
51
  }
52
+ list(options) {
53
+ const fetchPage = (options) => this.fetchPage.call(this, options);
54
+ const fetchPagePromise = fetchPage(options);
55
+ const asyncIterator = {
56
+ [Symbol.asyncIterator]() {
57
+ var _a;
58
+ return __asyncGenerator(this, arguments, function* _b() {
59
+ const defaultPageSize = 100;
60
+ const limit = (_a = options === null || options === void 0 ? void 0 : options.limit) !== null && _a !== void 0 ? _a : defaultPageSize;
61
+ let page = (options === null || options === void 0 ? void 0 : options.offset) ? options.offset / limit + 1 : 1;
62
+ let hasMoreResults = true;
63
+ let response = yield __await(fetchPagePromise);
64
+ do {
65
+ for (const resource of response.data) {
66
+ yield yield __await(resource);
67
+ }
68
+ hasMoreResults =
69
+ response.limit + response.offset < response.numberOfTotalResults;
70
+ if (hasMoreResults) {
71
+ response = yield __await(fetchPage({
72
+ limit,
73
+ offset: response.numberOfPageResults * page++,
74
+ }));
75
+ }
76
+ } while (hasMoreResults);
77
+ });
78
+ },
79
+ };
80
+ const promiseWithAsyncIterator = Object.assign(fetchPagePromise, asyncIterator);
81
+ return promiseWithAsyncIterator;
82
+ }
40
83
  }
41
84
  exports.BaseResource = BaseResource;
42
85
  //# sourceMappingURL=base-resource.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-resource.js","sourceRoot":"","sources":["../../../src/resources/base-resource.ts"],"names":[],"mappings":";;;;;;;;;;;;AASA,MAAsB,YAAY;IAGhC,YAAoB,UAAsB,EAAU,UAAsB;QAAtD,eAAU,GAAV,UAAU,CAAY;QAAU,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAExE,QAAQ,CACZ,EAAU,EACV,OAAmC;;YAInC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;YACrE,MAAM,SAAS,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAC;YACrC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CACxC,GAAG,CACJ,CAAC;YAEF,OAAO,QAAQ,CAAC,OAAO,CAAC;QAC1B,CAAC;KAAA;IAEK,IAAI,CACR,OAA8D;;YAM9D,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;YAC7D,MAAM,SAAS,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAC;YACrC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CACxC,GAAG,CACJ,CAAC;YAEF,OAAO;gBACL,KAAK,EAAE,QAAQ,CAAC,KAAK;gBACrB,mBAAmB,EAAE,QAAQ,CAAC,mBAAmB;gBACjD,oBAAoB,EAAE,QAAQ,CAAC,oBAAoB;gBACnD,MAAM,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mFC"}
@@ -6,11 +6,14 @@ export declare abstract class BaseResource<Resource, ResourceListItem> {
6
6
  protected abstract resourceType: ResourceType;
7
7
  constructor(httpClient: HttpClient, urlBuilder: UrlBuilder);
8
8
  retrieve<FieldKey extends keyof Resource>(id: number, options?: RetrieveOptions<FieldKey>): Promise<Resource | Pick<Resource, FieldKey>>;
9
+ private fetchPage;
9
10
  list<FieldKey extends keyof ResourceListItem>(options?: ListOptions<FieldKey, PickFilters<ResourceListItem>>): Promise<{
10
11
  limit: number;
11
12
  numberOfPageResults: number;
12
13
  numberOfTotalResults: number;
13
14
  offset: number;
14
- data: (ResourceListItem | Pick<ResourceListItem, FieldKey>)[];
15
- }>;
15
+ data: (ResourceListItem | Pick<ResourceListItem, keyof ResourceListItem>)[];
16
+ }> & {
17
+ [Symbol.asyncIterator](): AsyncGenerator<Awaited<ResourceListItem> | Awaited<Pick<ResourceListItem, keyof ResourceListItem>>, void, unknown>;
18
+ };
16
19
  }
@@ -11,7 +11,7 @@ export class BaseResource {
11
11
  const response = await this.httpClient.get(url);
12
12
  return response.results;
13
13
  }
14
- async list(options) {
14
+ async fetchPage(options) {
15
15
  const url = this.urlBuilder.list(this.resourceType, options);
16
16
  const fieldList = options?.fieldList;
17
17
  const response = await this.httpClient.get(url);
@@ -23,5 +23,33 @@ export class BaseResource {
23
23
  data: response.results,
24
24
  };
25
25
  }
26
+ list(options) {
27
+ const fetchPage = (options) => this.fetchPage.call(this, options);
28
+ const fetchPagePromise = fetchPage(options);
29
+ const asyncIterator = {
30
+ async *[Symbol.asyncIterator]() {
31
+ const defaultPageSize = 100;
32
+ const limit = options?.limit ?? defaultPageSize;
33
+ let page = options?.offset ? options.offset / limit + 1 : 1;
34
+ let hasMoreResults = true;
35
+ let response = await fetchPagePromise;
36
+ do {
37
+ for (const resource of response.data) {
38
+ yield resource;
39
+ }
40
+ hasMoreResults =
41
+ response.limit + response.offset < response.numberOfTotalResults;
42
+ if (hasMoreResults) {
43
+ response = await fetchPage({
44
+ limit,
45
+ offset: response.numberOfPageResults * page++,
46
+ });
47
+ }
48
+ } while (hasMoreResults);
49
+ },
50
+ };
51
+ const promiseWithAsyncIterator = Object.assign(fetchPagePromise, asyncIterator);
52
+ return promiseWithAsyncIterator;
53
+ }
26
54
  }
27
55
  //# sourceMappingURL=base-resource.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-resource.js","sourceRoot":"","sources":["../../../src/resources/base-resource.ts"],"names":[],"mappings":"AASA,MAAM,OAAgB,YAAY;IAGZ;IAAgC;IAApD,YAAoB,UAAsB,EAAU,UAAsB;QAAtD,eAAU,GAAV,UAAU,CAAY;QAAU,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAE9E,KAAK,CAAC,QAAQ,CACZ,EAAU,EACV,OAAmC;QAInC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;QACrE,MAAM,SAAS,GAAG,OAAO,EAAE,SAAS,CAAC;QACrC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CACxC,GAAG,CACJ,CAAC;QAEF,OAAO,QAAQ,CAAC,OAAO,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,IAAI,CACR,OAA8D;QAM9D,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QAC7D,MAAM,SAAS,GAAG,OAAO,EAAE,SAAS,CAAC;QACrC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CACxC,GAAG,CACJ,CAAC;QAEF,OAAO;YACL,KAAK,EAAE,QAAQ,CAAC,KAAK;YACrB,mBAAmB,EAAE,QAAQ,CAAC,mBAAmB;YACjD,oBAAoB,EAAE,QAAQ,CAAC,oBAAoB;YACnD,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,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AAS,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrC,MAAM,gBAAgB,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;QAE5C,MAAM,aAAa,GAAG;YACpB,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;gBAC3B,MAAM,eAAe,GAAG,GAAG,CAAC;gBAC5B,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,IAAI,eAAe,CAAC;gBAChD,IAAI,IAAI,GAAG,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC5D,IAAI,cAAc,GAAG,IAAI,CAAC;gBAC1B,IAAI,QAAQ,GAAG,MAAM,gBAAgB,CAAC;gBAEtC,GAAG;oBACD,KAAK,MAAM,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE;wBACpC,MAAM,QAAQ,CAAC;qBAChB;oBAED,cAAc;wBACZ,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC,oBAAoB,CAAC;oBAEnE,IAAI,cAAc,EAAE;wBAClB,QAAQ,GAAG,MAAM,SAAS,CAAC;4BACzB,KAAK;4BACL,MAAM,EAAE,QAAQ,CAAC,mBAAmB,GAAG,IAAI,EAAE;yBAC9C,CAAC,CAAC;qBACJ;iBACF,QAAQ,cAAc,EAAE;YAC3B,CAAC;SACF,CAAC;QAEF,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,CAC5C,gBAAgB,EAChB,aAAa,CACd,CAAC;QAEF,OAAO,wBAAwB,CAAC;IAClC,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comic-vine-sdk",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "A JS/TS client for the Comic Vine API",
5
5
  "keywords": [
6
6
  "comic",
@@ -49,6 +49,7 @@
49
49
  "zod": "3.19.1"
50
50
  },
51
51
  "devDependencies": {
52
+ "@semantic-release/changelog": "6.0.2",
52
53
  "@types/clone-deep": "4.0.1",
53
54
  "@types/jest": "29.1.1",
54
55
  "@types/node": "16.11.59",
@@ -76,11 +77,6 @@
76
77
  "*.{ts,json,md}": "npm run format",
77
78
  "*.ts": "npm run lint"
78
79
  },
79
- "release": {
80
- "branches": [
81
- "main"
82
- ]
83
- },
84
80
  "publishConfig": {
85
81
  "access": "public"
86
82
  },