anilink-api-wrapper 1.17.2 → 1.17.4

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.
@@ -2,8 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MediaListCollectionQuerySchema = void 0;
4
4
  const FuzzyDate_1 = require("../../FuzzyDate");
5
+ const Media_1 = require("./Media");
5
6
  exports.MediaListCollectionQuerySchema = `
6
- query ($userId: Int, $userName: String, $type: MediaType, $status: MediaListStatus, $notes: String, $startedAt: FuzzyDateInt, $completedAt: FuzzyDateInt, $forceSingleCompletedList: Boolean, $chunk: Int, $perChunk: Int, $status_in: [MediaListStatus], $status_not_in: [MediaListStatus], $status_not: MediaListStatus, $notes_like: String, $startedAt_greater: FuzzyDateInt, $startedAt_lesser: FuzzyDateInt, $startedAt_like: String, $completedAt_greater: FuzzyDateInt, $completedAt_lesser: FuzzyDateInt, $completedAt_like: String, $sort: [MediaListSort], $scoreFormat: ScoreFormat, $asArray: Boolean) {
7
+ query ($userId: Int, $userName: String, $type: MediaType, $status: MediaListStatus, $notes: String, $startedAt: FuzzyDateInt, $completedAt: FuzzyDateInt, $forceSingleCompletedList: Boolean, $chunk: Int, $perChunk: Int, $status_in: [MediaListStatus], $status_not_in: [MediaListStatus], $status_not: MediaListStatus, $notes_like: String, $startedAt_greater: FuzzyDateInt, $startedAt_lesser: FuzzyDateInt, $startedAt_like: String, $completedAt_greater: FuzzyDateInt, $completedAt_lesser: FuzzyDateInt, $completedAt_like: String, $sort: [MediaListSort], $scoreFormat: ScoreFormat, $asArray: Boolean, $asHtml: Boolean) {
7
8
  MediaListCollection (userId: $userId, userName: $userName, type: $type, status: $status, notes: $notes, startedAt: $startedAt, completedAt: $completedAt, forceSingleCompletedList: $forceSingleCompletedList, chunk: $chunk, perChunk: $perChunk, status_in: $status_in, status_not_in: $status_not_in, status_not: $status_not, notes_like: $notes_like, startedAt_greater: $startedAt_greater, startedAt_lesser: $startedAt_lesser, startedAt_like: $startedAt_like, completedAt_greater: $completedAt_greater, completedAt_lesser: $completedAt_lesser, completedAt_like: $completedAt_like, sort: $sort) {
8
9
  lists {
9
10
  entries {
@@ -29,6 +30,9 @@ exports.MediaListCollectionQuerySchema = `
29
30
  }
30
31
  updatedAt
31
32
  createdAt
33
+ media {
34
+ ${Media_1.MediaSchema}
35
+ }
32
36
  }
33
37
  name
34
38
  isCustomList
@@ -32,22 +32,7 @@ const sendRequest = (url, method, data, token) => __awaiter(void 0, void 0, void
32
32
  return response.data;
33
33
  }
34
34
  catch (error) {
35
- console.log('error', error);
36
- if (error.response) {
37
- // The request was made and the server responded with a status code
38
- // that falls out of the range of 2xx
39
- throw error.response;
40
- }
41
- else if (error.request) {
42
- // The request was made but no response was received
43
- // `error.request` is an instance of XMLHttpRequest in the browser and an instance of
44
- // http.ClientRequest in node.js
45
- throw error.request;
46
- }
47
- else {
48
- // Something happened in setting up the request that triggered an Error
49
- throw error.message;
50
- }
35
+ throw error;
51
36
  }
52
37
  });
53
38
  exports.sendRequest = sendRequest;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anilink-api-wrapper",
3
- "version": "1.17.2",
3
+ "version": "1.17.4",
4
4
  "description": "Anilist API Wrapper",
5
5
  "main": "dist/AniLink.js",
6
6
  "scripts": {