comic-vine-sdk 1.1.0 → 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 +85 -28
- package/dist/cjs/resources/base-resource.d.ts +5 -2
- package/dist/cjs/resources/base-resource.js +44 -1
- package/dist/cjs/resources/base-resource.js.map +1 -1
- package/dist/mjs/resources/base-resource.d.ts +5 -2
- package/dist/mjs/resources/base-resource.js +29 -1
- package/dist/mjs/resources/base-resource.js.map +1 -1
- package/package.json +2 -6
package/README.md
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
# Comic Vine SDK
|
|
2
2
|
|
|
3
|
-
The Comic Vine SDK provides convenient access to the [Comic Vine API][comic-vine-api] from
|
|
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
|
|
|
7
7
|
- [Installation](#installation)
|
|
8
|
-
- [Browser Support](#browser-support)
|
|
9
8
|
- [Roadmap](#roadmap)
|
|
10
9
|
- [Comic Vine Resources](#comic-vine-resources)
|
|
11
10
|
- [Usage/Examples](#usageexamples)
|
|
12
11
|
- [Initialization](#initialization)
|
|
12
|
+
- [Options](#options)
|
|
13
13
|
- [Fetch a single resource](#fetch-a-single-resource)
|
|
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
|
|
|
@@ -27,18 +28,12 @@ npm install comic-vine-sdk
|
|
|
27
28
|
yarn add comic-vine-sdk
|
|
28
29
|
```
|
|
29
30
|
|
|
30
|
-
## Browser support
|
|
31
|
-
|
|
32
|
-
This package does not currently work in a web browser, the Comic Vine API does not allow [cross-origin](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) requests. The recommended approach would be to use it server side, however, in a future update an option to set the baseUrl will be added. 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.
|
|
33
|
-
|
|
34
31
|
## TypeScript Typings
|
|
35
32
|
|
|
36
33
|
There's a good change you may find an issue with the typings in the API response objects. They were generated using sample data from the API, if you find a problem [open an issue](https://github.com/AllyMurray/comic-vine/issues/new) detailing the problem along with the request details so I can add that request to the sample dataset. While you wait for it to be fixed add `// @ts-expect-error` above the line causing the problem. This will allow you to compile in the meantime but will flag when the problem has been fixed.
|
|
37
34
|
|
|
38
35
|
## Roadmap
|
|
39
36
|
|
|
40
|
-
- Add option to set baseUrl when initializing the library
|
|
41
|
-
|
|
42
37
|
- Automatic Pagination
|
|
43
38
|
|
|
44
39
|
- Expandable responses
|
|
@@ -109,6 +104,44 @@ const comicVine = new ComicVine('your-api-key-here');
|
|
|
109
104
|
})();
|
|
110
105
|
```
|
|
111
106
|
|
|
107
|
+
### Options
|
|
108
|
+
|
|
109
|
+
The second parameter of the constructor accepts options to configure the library
|
|
110
|
+
|
|
111
|
+
```js
|
|
112
|
+
new ComicVine('your-api-key-here', options);
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### `baseUrl`
|
|
116
|
+
|
|
117
|
+
**Type: <code>string | undefined</code>**
|
|
118
|
+
|
|
119
|
+
**Default: https://comicvine.gamespot.com/api/**
|
|
120
|
+
|
|
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.
|
|
124
|
+
|
|
125
|
+
```js
|
|
126
|
+
import ComicVine from 'comic-vine-sdk';
|
|
127
|
+
|
|
128
|
+
// This is just an example, to try it out you would
|
|
129
|
+
// have to visit (https://cors-anywhere.herokuapp.com)
|
|
130
|
+
// to request temporary access.
|
|
131
|
+
const comicVine = new ComicVine('your-api-key-here', {
|
|
132
|
+
baseUrl: 'https://cors-anywhere.herokuapp.com/https://www.comicvine.com/api/',
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
(async () => {
|
|
136
|
+
try {
|
|
137
|
+
const publisher = await comicVine.publisher.retrieve(1859);
|
|
138
|
+
console.log(publisher.name);
|
|
139
|
+
} catch (error) {
|
|
140
|
+
console.error(error);
|
|
141
|
+
}
|
|
142
|
+
})();
|
|
143
|
+
```
|
|
144
|
+
|
|
112
145
|
### Fetch a single resource
|
|
113
146
|
|
|
114
147
|
All resources have a retrieve method, the following example retrieves a publisher
|
|
@@ -178,9 +211,39 @@ const comicVine = new ComicVine('your-api-key-here');
|
|
|
178
211
|
|
|
179
212
|
### Pagination
|
|
180
213
|
|
|
181
|
-
The Comic Vine API
|
|
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.
|
|
182
245
|
|
|
183
|
-
|
|
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.
|
|
184
247
|
|
|
185
248
|
```js
|
|
186
249
|
import ComicVine from 'comic-vine-sdk';
|
|
@@ -188,24 +251,18 @@ const comicVine = new ComicVine('your-api-key-here');
|
|
|
188
251
|
|
|
189
252
|
(async () => {
|
|
190
253
|
try {
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
hasMoreResults = volumes.length < page.numberOfTotalResults;
|
|
204
|
-
} while (hasMoreResults);
|
|
205
|
-
|
|
206
|
-
console.log(`Number of requests made to Comic Vine: ${pageNumber}`); // 2
|
|
207
|
-
console.log(`Total volumes: ${volumes.length}`); // 35
|
|
208
|
-
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);
|
|
209
266
|
} catch (error) {
|
|
210
267
|
console.error(error);
|
|
211
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,
|
|
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
|
-
|
|
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":"
|
|
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;IAEa,SAAS,CACrB,OAA8D;;YAM9D,MAAM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AM,QAAQ,CAAA,CAAC;yBAChB;wBAED,cAAc;4BACZ,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC,oBAAoB,CAAC;wBAEnE,IAAI,cAAc,EAAE;4BAClB,QAAQ,GAAG,cAAM,SAAS,CAAC;gCACzB,KAAK;gCACL,MAAM,EAAE,QAAQ,CAAC,mBAAmB,GAAG,IAAI,EAAE;6BAC9C,CAAC,CAAA,CAAC;yBACJ;qBACF,QAAQ,cAAc,EAAE;;aAC1B;SACF,CAAC;QAEF,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,CAC5C,gBAAgB,EAChB,aAAa,CACd,CAAC;QAEF,OAAO,wBAAwB,CAAC;IAClC,CAAC;CACF;AAnFD,oCAmFC"}
|
|
@@ -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,
|
|
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
|
|
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,UAAs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;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.
|
|
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
|
},
|