UNPKG

33 kBMarkdownView Raw
1<h1 align="center">MalScraper</h1>
2
3<p align="center">
4 <a href="http://forthebadge.com/" target="_blank">
5 <img src="http://forthebadge.com/images/badges/built-with-love.svg"/>
6 </a>
7</p>
8
9<p align="center">
10 <a href="https://standardjs.com/" target="_blank">
11 <img src="https://cdn.rawgit.com/feross/standard/master/badge.svg" />
12 </a>
13</p>
14
15<p align="center">
16 <a href="https://travis-ci.org/Kylart/MalScraper" target="_blank">
17 <img src="https://travis-ci.org/Kylart/MalScraper.svg?branch=master" alt="Build Status">
18 </a>
19 <a href="https://codecov.io/gh/Kylart/MalScraper" target="_blank">
20 <img src="https://codecov.io/gh/Kylart/MalScraper/branch/master/graph/badge.svg" alt="Codecov" />
21 </a>
22 <a href="https://opensource.org/licenses/MIT" target="_blank">
23 <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License">
24 </a>
25</p>
26
27At the moment, _MalScraper_ allows one to:
28* Gather information about all the anime being released in a season.
29* Gather anime-related news (include light-novels, manga, films...). 160 news available.
30* Make an anime search (in 2 different ways!).
31* Get different information for this anime.
32* Get only the best result for an anime search.
33* Get a list of an anime's episodes.
34* Access the full official MyAnimeList API (includes search, add, update and delete from your user watch lists).
35
36_MalScraper_ is being developed mainly for [_KawAnime_](https://github.com/Kylart/KawAnime) but anyone can use it for
37 its own purpose.
38
39Any contribution is welcomed.
40
41Tables of content:
42* [Installation](https://github.com/Kylart/MalScraper/blob/master/README.md#installation)
43* [Use](https://github.com/Kylart/MalScraper/blob/master/README.md#use)
44* [Methods](https://github.com/Kylart/MalScraper/blob/master/README.md#methods)
45- * [search.search()](https://github.com/Kylart/MalScraper/blob/master/README.md#searchsearch)
46- * [getInfoFromName()](https://github.com/Kylart/MalScraper/blob/master/README.md#getinfofromname)
47- * [getInfoFromURL()](https://github.com/Kylart/MalScraper/blob/master/README.md#getinfofromurl)
48- * [getResultsFromSearch()](https://github.com/Kylart/MalScraper/blob/master/README.md#getresultsfromsearch)
49- * [getWatchListFromUser()](https://github.com/Kylart/MalScraper/blob/master/README.md#getwatchlistfromuser)
50- * [getSeason()](https://github.com/Kylart/MalScraper/blob/master/README.md#getseason)
51- * [getNewsNoDetails()](https://github.com/Kylart/MalScraper/blob/master/README.md#getnewsnodetails)
52- * [getEpisodesList()](https://github.com/Kylart/MalScraper/blob/master/README.md#getepisodeslist)
53- * [Official API Constructor](https://github.com/Kylart/MalScraper/blob/master/README.md#official-api-constructor)
54- - * [checkCredentials()](https://github.com/Kylart/MalScraper/blob/master/README.md#checkcredentials)
55- - * [search()](https://github.com/Kylart/MalScraper/blob/master/README.md#search)
56- - * [actOnList()](https://github.com/Kylart/MalScraper/blob/master/README.md#actonlist)
57* [Data models](https://github.com/Kylart/MalScraper/blob/master/README.md#data-models)
58- * [Anime data model](https://github.com/Kylart/MalScraper/blob/master/README.md#anime-data-model)
59- * [Character data model](https://github.com/Kylart/MalScraper/blob/master/README.md#character-data-model)
60- * [Staff data model](https://github.com/Kylart/MalScraper/blob/master/README.md#staff-data-model)
61- * [Search result data model](https://github.com/Kylart/MalScraper/blob/master/README.md#search-result-data-model)
62- * [Seasonal release data model](https://github.com/Kylart/MalScraper/blob/master/README.md#seasonal-release-data-model)
63- * [Seasonal anime release data model](https://github.com/Kylart/MalScraper/blob/master/README.md#seasonal-anime-release-data-model)
64- * [News data model](https://github.com/Kylart/MalScraper/blob/master/README.md#news-data-model)
65* [Contributing](https://github.com/Kylart/MalScraper/blob/master/README.md#contributing)
66* [License](https://github.com/Kylart/MalScraper/blob/master/README.md#license)
67
68## Installation
69```npm install --save mal-scraper```
70
71## Use
72```javascript
73const malScraper = require('mal-scraper')
74```
75
76## Methods
77
78### search.search()
79| Parameter | Type | Description |
80| --- | --- | --- |
81| type | string | type of search (manga or anime) |
82| opts | object | options for search (all keys are optional) |
83
84Usage example:
85```js
86const malScraper = require('mal-scraper')
87const search = malScraper.search
88
89const type = 'anime'
90
91// Helpers for types, genres and list you might need for your research
92console.log(search.helpers)
93
94search.search(type, {
95 // All optionnals, but all values must be in their relative search.helpers.availableValues.
96 maxResults: 100, // how many results at most (default: 50)
97 has: 250, // If you already have results and just want what follows it, you can say it here. Allows pagination!
98
99 term: 'Sakura', // search term
100 type: 0, // 0-> none, else go check search.helpers.availableValues.type
101 status: 0, // 0 -> none, else go check https://github.com/Kylart/MalScraper/blob/master/README.md#series-statuses-references or search.helpers.availableValues.status
102 score: 0, // 0-> none, else go check search.helpers.availableValues.score
103 producer: 0, // go check search.helpers.availableValue.p.<type>.value
104 rating: 0, // 0-> none, else go check search.helpers.availableValues.r
105 startDate: {
106 day: 12,
107 month: 2,
108 year: 1990
109 },
110 endDate: {
111 day: 12,
112 month: 2,
113 year: 2015
114 },
115 genreType: 0, // 0 for include genre list, 1 for exclude genre list
116 genres: [1] // go check search.helpers.availableValues.genres.<type>.value
117})
118 .then(console.log)
119 .catch(console.error)
120```
121
122Returns: A [Anime search model](https://github.com/Kylart/MalScraper/blob/master/README.md#anime-search-model) object
123
124### getInfoFromName()
125
126| Parameter | Type | Description |
127| --- | --- | --- |
128| Name | string | The name of the anime to search, the best match corresponding to that name will be returned |
129
130Usage example:
131
132```js
133const malScraper = require('mal-scraper')
134
135const name = 'Sakura Trick'
136
137malScraper.getInfoFromName(name)
138 .then((data) => console.log(data))
139 .catch((err) => console.log(err))
140```
141
142Returns: A [Anime data model](https://github.com/Kylart/MalScraper/blob/master/README.md#anime-data-model) object
143
144### getInfoFromURL()
145
146This method is faster than `getInfoFromName()` as it only make one HTTP request
147
148| Parameter | Type | Description |
149| --- | --- | --- |
150| URL | string | The URL to the anime |
151
152Usage example:
153
154```js
155const malScraper = require('mal-scraper')
156
157const url = 'https://myanimelist.net/anime/20047/Sakura_Trick'
158
159malScraper.getInfoFromURL(url)
160 .then((data) => console.log(data))
161 .catch((err) => console.log(err))
162```
163
164Returns: A [Anime data model](https://github.com/Kylart/MalScraper/blob/master/README.md#anime-data-model) object (same as `getInfoFromName()`)
165
166### getResultsFromSearch()
167
168| Parameter | Type | Description |
169| --- | --- | --- |
170| query | string | The search query |
171
172Usage example:
173
174```js
175const malScraper = require('mal-scraper')
176
177const query = 'sakura'
178
179malScraper.getResultsFromSearch(query)
180 .then((data) => console.log(data))
181 .catch((err) => console.log(err))
182```
183
184Returns: An array of a maximum length of 10 containing [Search result data model](https://github.com/Kylart/MalScraper/blob/master/README.md#search-result-data-model) objects
185
186### getSeason()
187
188This method get the list of anime, OVAs, movies and ONAs released (or planned to be released) during the season of the specified year
189
190| Parameter | Optional | Type | Description |
191| --- | --- |--- | --- |
192| year | No | number | The year |
193| season | No | string | The season, must be either `spring`, `summer`, `fall` or `winter` |
194| type | Yes | string | The type, must be either `TV`, `TVNew`, `TVCon`, `ONAs`, `OVAs`, `Specials` or `Movies` |
195
196Usage example:
197
198```javascript
199const malScraper = require('mal-scraper')
200
201const year = 2017
202const season = 'fall'
203
204malScraper.getSeason(year, season)
205 // `data` is an object containing the following keys: 'TV', 'TVNew', 'TVCon', 'OVAs', 'ONAs', 'Movies' and 'Specials'
206 .then((data) => console.log(data))
207 .catch((err) => console.log(err))
208```
209
210Returns: A [Seasonal release data model](https://github.com/Kylart/MalScraper/blob/master/README.md#seasonal-release-data-model) object
211
212With type parameter:
213
214<b>Please note:</b> 'TVNew' represents the 'New' anime for this season, whilst 'TVCon' represents the 'Continuing' anime in this season. 'TV' is simply an aggregate for both of these.
215```javascript
216const malScraper = require('mal-scraper')
217
218const year = 2017
219const season = 'fall'
220const type = 'TV' // Optional type parameter, if not specified will default to returning an object with all of possible type keys
221
222malScraper.getSeason(year, season, type)
223 // `data` is an array containing all the 'Seasonal anime release data objects' for the given type
224 .then((data) => console.log(data))
225 .catch((err) => console.log(err))
226```
227
228Returns: A [Seasonal anime release data model](https://github.com/Kylart/MalScraper/blob/master/README.md#seasonal-anime-release-data-model) object
229
230### getWatchListFromUser()
231
232#### From v2.6.0
233
234| Parameter | Type | Description |
235| --- | --- | --- |
236| username | string | The name of the user |
237| after | number | Useful to paginate. Is the number of results you want to start from. By default, MAL returns 300 entries only. |
238| type | string | Optional, can be either `anime` or `manga` |
239
240Usage example:
241
242```javascript
243const malScraper = require('mal-scraper')
244
245const username = 'Kylart'
246const after = 25
247const type = 'anime' // can be either `anime` or `manga`
248
249// Get you an object containing all the entries with status, score... from this user's watch list
250malScraper.getWatchListFromUser(username, after, type)
251 .then((data) => console.log(data))
252 .catch((err) => console.log(err))
253```
254
255Returns: A [User watch list data model](https://github.com/Kylart/MalScraper/blob/master/README.md#user-watch-list-data-model) object
256
257#### v2.5.2 and before
258| Parameter | Type | Description |
259| --- | --- | --- |
260| username | string | The name of the user |
261| type | string | Optional, can be either `anime` or `manga` |
262
263Usage example:
264
265```javascript
266const malScraper = require('mal-scraper')
267
268const username = 'Kylart'
269const type = 'anime' // can be either `anime` or `manga`
270
271// Get you an object containing all the entries with status, score... from this user's watch list
272malScraper.getWatchListFromUser(username, type)
273 .then((data) => console.log(data))
274 .catch((err) => console.log(err))
275```
276
277Returns: A [User watch list data model](https://github.com/Kylart/MalScraper/blob/master/README.md#user-watch-list-data-model) object
278
279### getNewsNoDetails()
280
281| Parameter | Type | Description |
282| --- | --- | --- |
283| nbNews | number | The count of news you want to get, default is 160. Note that there is 20 news per page, so if you set it to 60 for example, it will result in 3 requests. You should be aware of that, as MyAnimeList will most likely rate-limit you if more than 35-40~ requests are done in a few seconds |
284
285Usage example:
286
287```javascript
288const malScraper = require('mal-scraper')
289
290const nbNews = 120
291
292malScraper.getNewsNoDetails(nbNews)
293 .then((data) => console.log(data))
294 .catch((err) => console.log(err))
295```
296
297Returns: An array of [News data model](https://github.com/Kylart/MalScraper/blob/master/README.md#news-data-model) objects
298
299### getEpisodesList()
300
301| Parameter | Type | Description |
302| --- | --- | --- |
303| anime | object OR string | If an object, it must have the `name` and `id` property. If you only have the name and not the id, you may call the method with the name as a string, this will be slower but the id will be automatically fetched on the way |
304| anime.name | string | The name of the anime |
305| anime.id | number | The unique identifier of this anime |
306
307Usage example:
308
309```javascript
310const malScraper = require('mal-scraper')
311
312malScraper.getEpisodesList({
313 name: 'Sakura Trick',
314 id: 20047
315})
316 .then((data) => console.log(data))
317 .catch((err) => console.log(err))
318
319//Alternatively, if you only have the name and not the id, you can let the method fetch the id on the way at the cost of being slower
320
321const name = "Sakura Trick"
322
323malScraper.getEpisodesList(name)
324 .then((data) => console.log(data))
325 .catch((err) => console.log(err))
326```
327
328Returns: An array of [Anime episodes data model](https://github.com/Kylart/MalScraper/blob/master/README.md#anime-episodes-data-model) objects
329
330### Official API constructor
331> This requires a valid MyAnimeList account
332
333_MalScraper_ also provide a full coverage of MyAnimeList's official API. The official API methods are available once you initialized the `officialApi` constructor
334
335| Parameter | Type | Description |
336| --- | --- | --- |
337| credentials | object | Object of a MAL account credentials |
338| credentials.username | string | The username of the account to use for the official API |
339| credentials.password | string | The password of the account to use for the official API |
340
341Usage example:
342
343```javascript
344const malScraper = require('mal-scraper')
345
346const api = new malScraper.officialApi({
347 username: 'my_super_username',
348 password: 'my_super_secret_password'
349})
350```
351
352#### checkCredentials()
353
354This method allows you to check if the credentials given in the constructor are valid
355
356Usage example:
357
358```js
359const malScraper = require('mal-scraper')
360
361const api = new malScraper.officialApi({
362 username: 'my_super_username',
363 password: 'my_super_secret_password'
364})
365
366api.checkCredentials()
367 .then((data) => console.log(data))
368 .catch((err) => console.log(err))
369```
370
371Returns: A string `"Invalid credentials"` if the credentials are invalid, otherwise, the raw XML document with the id and the username of the account
372
373#### search()
374
375| Parameter | Type | Description |
376| --- | --- | --- |
377| type | string | The type, can be either `manga` or `anime`. Default is `anime` |
378| name | string | The name of the manga/anime to search |
379
380```js
381const malScraper = require('mal-scraper')
382
383const api = new malScraper.officialApi({
384 username: 'my_super_username',
385 password: 'my_super_secret_password'
386})
387
388const name = 'Sakura Trick'
389const type = 'manga'
390
391// type can be either 'anime' or 'manga'
392api.search(type, name)
393 .then((data) => console.log(data))
394 .catch((err) => console.log(err))
395```
396
397Returns: An array of [anime search results data model](https://github.com/Kylart/MalScraper/blob/master/README.md#anime-search-results-data-model) or [manga search results data model](https://github.com/Kylart/MalScraper/blob/master/README.md#manga-search-results-data-model) objects
398
399#### actOnList()
400
401This method allows you to act on the account given in the constructor anime list
402
403| Parameter | Type | Description |
404| --- | --- | --- |
405| action | object | An object which should contain the type of the manga/anime and the action to do |
406| action.support | string | The type of the manga/anime to act on. Can be either `anime` or `manga` |
407| action.action | string | The action to do, can be either `add`, `update` or `delete` |
408| id | number | The unique identifier of the manga/anime |
409| name | string | The name of the manga/anime to search |
410| details | object | An object that can contain all the properties described [here](https://myanimelist.net/modules.php?go=api#animevalues) |
411| details.episodes | number | Anime only - Number of episodes you watched |
412| details.status | number OR string | Whether you completed, dropped... the anime/manga, see the [statuses references](https://github.com/Kylart/MalScraper/blob/master/README.md#statuses-references) |
413| details.score | number | The score you would give to this anime/manga, must be a whole number between 0 and 10 |
414| details.times_rewatched | number | Anime only - Number of times you re-watched the anime |
415| details.date_start | string | mmddyyyy date format of when you finished the anime/manga |
416| details.date_finish | string | mmddyyyy date format of when you finished the anime/manga |
417| details.tags | string | Tags separated by commas that you think correspond to this anime/manga |
418| details.volumes | number | Manga only - Number of volumes you read |
419| details.times_reread | number | Manga only - Number of times you re-read this manga |
420
421```js
422const malScraper = require('mal-scraper')
423
424const api = new malScraper.officialApi({
425 username: 'my_super_username',
426 password: 'my_super_secret_password'
427})
428
429const id = 20047
430
431api.actOnList({
432 support: 'anime',
433 action: 'add'
434}, id, {
435 status: 1,
436 score: 10
437})
438```
439
440## Data models
441
442### Anime data model
443
444> You should treat all properties as possibly undefined/empty, the only guaranteed properties are `title`, `type` and `id`
445
446| Property | Type | Description |
447| --- | --- | --- |
448| title | string | The title of the anime |
449| synopsis | string | The synopsis of the anime |
450| picture | string | The URL of the cover picture of the anime |
451| characters | array | An array of [Character data model](https://github.com/Kylart/MalScraper/blob/master/README.md#character-data-model) objects |
452| staff | array | An array of [Staff data model](https://github.com/Kylart/MalScraper/blob/master/README.md#staff-data-model) objects |
453| trailer | string | URL to the embedded video |
454| englishTitle | string | The english title of the anime |
455| synonyms | string | A list of synonyms of the anime title (other languages names, related ovas/movies/animes) separated by commas, like "Sakura Trick, Sakura Trap" |
456| type | string | The type of the anime, can be either `TV`, `OVA`, `Movie` or `Special` |
457| episodes | string | The number of aired episodes |
458| status | string | The status of the anime (whether it is airing, finished...) |
459| aired | string | The date from which the airing started to the one from which it ended, this property will be empty if one of the two dates is unknown |
460| premiered | string | The date of when the anime has been premiered |
461| broadcast | string | When the anime is broadcasted |
462| producers | array | An array of the anime producers |
463| studios | array | An array of the anime producers |
464| source | string | On what the anime is based on (e.g: based on a manga...) |
465| genres | array | An array of the anime genres (Action, Slice of Life...) |
466| duration | string | Average duration of an episode (or total duration if movie...) |
467| rating | string | The rating of the anime (e.g: R18+..), see the [List of possible ratings](https://github.com/Kylart/MalScraper/blob/master/README.md#list-of-possible-ratings) |
468| score | string | The average score |
469| scoreStats | string | By how many users this anime has been scored, like "scored by 255,693 users" |
470| ranked | string | The rank of the anime |
471| popularity | string | The popularity of the anime |
472| members | string | How many users are members of the anime (have it on their list) |
473| favorites | string | Count of how many users have this anime as favorite |
474| id | number | The unique identifier of the anime |
475| url | string | the URL to the page |
476
477#### List of possible ratings
478
479Anime ratings can be either:
480
481* `G - All Ages`
482* `PG - Children`
483* `PG-13 - Teens 13 or older`
484* `R - 17+ (violence & profanity)`
485* `R+ - Mild Nudity`
486* `Rx - Hentai`
487
488#### Anime search model
489| Property | Type | Description |
490| --- | --- | --- |
491| thumbnail | string | Full url for anime thumbnail |
492| url | string | Full url for anime page |
493| video | string | full url of anime trailer video if any |
494| shortDescription | string | Short description of the anime (or manga) |
495| title | string | Anime title |
496| type | string | Anime type |
497| nbEps | string | Anime number of episodes |
498| score | string | Anime score |
499| startDate | string | Anime start date |
500| endDate | string | Anime end date |
501| members | string | Anime number of members |
502| rating | string | Anime rating |
503
504#### Staff data model
505
506| Property | Type | Description |
507| --- | --- | --- |
508| link | string | Link to the MAL profile of this person |
509| picture | string | Link to a picture of the person at the best possible size |
510| name | string | Their name and surname, like `Surname, Name` |
511| role | string | The role this person has/had in this anime (Director, Sound Director...) |
512
513#### Character data model
514
515| Property | Type | Description |
516| --- | --- | --- |
517| link | string | Link to the MAL profile of this character |
518| picture | string | Link to a picture of the character at the best possible size |
519| name | string | Their name and surname, like `Surname, Name` |
520| role | string | The role this person has/had in this anime (Main, Supporting...) |
521| seiyuu | object | An object containing additional data about who dubbed this character |
522| seiyuu.link | string | Link to the MAL profile of who dubbed this character |
523| seiyuu.picture | string | Link to a picture of the seiyuu at the best possible size |
524| seiyuu.name | string | Their name and surname, like `Surname, Name` |
525
526### Search result data model
527
528| Property | Type | Description |
529| --- | --- | --- |
530| id | number | The unique identifier of this result |
531| type | string | The type of the result (e.g: anime...) |
532| name | string | The title of the anime |
533| url | string | The URL to the anime |
534| image_url | string | URL of the image |
535| thumbnail_url | string | URL of the thumbnail image |
536| es_score | number | A number representing the accuracy of the result, where 1 is a perfect match and 0 a totally irrelevant one |
537| payload | object | An object containing additional data about the anime |
538| payload.media_type | string | The type of the anime, can be either `TV`, `Movie`, `OVA` or `Special` |
539| payload.start_year | number | The year the airing of the anime started |
540| payload.aired | string | The date from which the airing started to the one from which it ended |
541| payload.score | string | The average score given to this anime |
542| payload.status | string | The current status of the anime (whether it is still airing, finished...) |
543
544### Seasonal release data model
545
546**Note: If nothing is found for the given date, the current year/season releases list will be returned**
547
548| Property | Type | Description |
549| --- | --- | --- |
550| TV | array | An array of [Seasonal anime release data model](https://github.com/Kylart/MalScraper/blob/master/README.md#seasonal-anime-release-data-model) objects |
551| TVNew | array | An array of [Seasonal anime release data model](https://github.com/Kylart/MalScraper/blob/master/README.md#seasonal-anime-release-data-model) objects |
552| TVCon | array | An array of [Seasonal anime release data model](https://github.com/Kylart/MalScraper/blob/master/README.md#seasonal-anime-release-data-model) objects |
553| OVAs | array | An array of [Seasonal anime release data model](https://github.com/Kylart/MalScraper/blob/master/README.md#seasonal-anime-release-data-model) objects |
554| ONAs | array | An array of [Seasonal anime release data model](https://github.com/Kylart/MalScraper/blob/master/README.md#seasonal-anime-release-data-model) objects |
555| Movies | array | An array of [Seasonal anime release data model](https://github.com/Kylart/MalScraper/blob/master/README.md#seasonal-anime-release-data-model) objects |
556| Specials | array | An array of [Seasonal anime release data model](https://github.com/Kylart/MalScraper/blob/master/README.md#seasonal-anime-release-data-model) objects |
557
558#### Seasonal anime release data model
559
560| Property | Type | Description |
561| --- | --- | --- |
562| picture | string | Link to the picture of the anime |
563| synopsis | string | The synopsis of the anime |
564| licensor | string | The licensor |
565| title | string | The name of the anime |
566| link | string | The direct link to the anime page |
567| genres | array | An array of strings which are the genres of this anime |
568| producers | array | An array of strings which are the producers of this anime |
569| fromType | string | From what this anime is based on/an adaptation of (Light novel, manga...) |
570| nbEp | string | The number of aired episodes this anime has |
571| releaseDate | string | When this anime has been released |
572| score | string | The average score users have given to this anime |
573
574### User watch list data model
575
576#### v2.6.0
577An array of [User anime entry data model](https://github.com/Kylart/MalScraper/blob/master/README.md#user-anime-entry-data-model) objects or [User manga entry data model](https://github.com/Kylart/MalScraper/blob/master/README.md#user-manga-entry-data-model)
578
579#### v2.5.2 and before
580| Property | Type | Description |
581| --- | --- | --- |
582| stats | object | A [User stats data model](https://github.com/Kylart/MalScraper/blob/master/README.md#user-stats-data-model) object |
583| lists | array | An array of [User anime entry data model](https://github.com/Kylart/MalScraper/blob/master/README.md#user-anime-entry-data-model) objects or [User manga entry data model](https://github.com/Kylart/MalScraper/blob/master/README.md#user-manga-entry-data-model)|
584
585#### User stats data model
586
587| Property | Type | Description |
588| --- | --- | --- |
589| TV | string | Number of TV anime this user watched |
590| OVA | string | Number of OVA anime this user watched |
591| Movies | string | Number of Movies anime this user watched |
592| Spcl | string | Number of special anime this user watched |
593| ONA | string | Number of ONA anime this user watched |
594| Days | string | Number of days spent in front of anime for this user |
595| Eps | string | Number of eps watched by this user |
596| MeanScore | string | Mean score given by this user |
597| ScoreDev | string | Score deviation for this user |
598
599#### User anime entry data model
600
601| Property | Type | Description |
602| --- | --- | --- |
603| status | integer | Status of the anime in the user's watch list (completed, on-hold...), see the [Statuses references](https://github.com/Kylart/MalScraper/blob/master/README.md#statuses-references) |
604| score | integer | Score given by the user |
605| tags | string | anime tags for this anime. Tags are separated by a comma |
606| isRewatching | integer | Whther this user is rewatching this anime |
607| numWatchedEpisodes: | integer | Number of episodes this user watched for this anime |
608| animeTitle | string | The title of the anime |
609| animeNumEpisodes | integer | How many episodes this anime has |
610| animeAiringStatus | string | The status of the anime, see the [Series statuses references](https://github.com/Kylart/MalScraper/blob/master/README.md#series-statuses-references) |
611| animeId | string | The unique identifier of this anime |
612| animeStudios | string | Studios of this anime |
613| animeLicensors | string | Who licensed this anime |
614| animeSeason | string | ??? |
615| hasEpisodeVideo | boolean | Whether episode information are available on MAL |
616| hasPromotionVideo | boolean | Whether anime trailer is available on MAL |
617| videoUrl | string | path to video url on MAL |
618| animeUrl | string | path to anime url on MAL |
619| animeImagePath | string | path to anime thumbnail url on MAL |
620| isAddedToList | boolean | ??? |
621| animeMediaTypeString | string | Type of this anime |
622| animeMpaaRatingString | string | Rating of this anime |
623| startDateString | string | When did this user start watching it |
624| finishDateString | string | When did this user finish it |
625| animeStartDateString | string | Start date of the anime following the format (MM-DD-YYYY) |
626| animeEndDateString | string | End date of the anime following the format (MM-DD-YYYY) |
627| daysString | string | ??? |
628| storageString | string | Storage type for this anime (set by the user) |
629| priorityString | string | Priority of this anime for the user |
630
631#### User manga entry data model
632
633| Property | Type | Description |
634| --- | --- | --- |
635| myID | string | Deprecated |
636| status | string | Status of the manga in the user's watch list (completed, on-hold...), see the [Statuses references](https://github.com/Kylart/MalScraper/blob/master/README.md#statuses-references) |
637| score | string | The score the user has given to this manga |
638| tags | string | The tags the user has given to this manga |
639| isRereading | string | Whether the user is re-reading this manga or not, where `0` means not |
640| nbReadChapters | string | Count of how many chapters of this manga the user has read |
641| nbReadVolumes | string | Count of how many volumes of this manga the user has read |
642| mangaTitle | string | The title of the manga |
643| mangaNumChapters | string | Total count of chapters this manga has |
644| mangaNumVolumes | string | Count of volumes this manga has |
645| mangaPublishingStatus | string | The status of the manga, see the [Series statuses references](https://github.com/Kylart/MalScraper/blob/master/README.md#series-statuses-references) |
646| mangaId | string | The unique identifier of this manga |
647| mangaMagazines | string | Magazines where this manga airs |
648| mangaUrl | string | Path to manga page |
649| mangaImagePath | string | path to manga thumbnail |
650| isAddedToList | boolean | ??? |
651| mangaMediaTypeString | string | The type of the manga, see the [Types references](https://github.com/Kylart/MalScraper/blob/master/README.md#types-references) |
652| startDateString | string | A `mm-dd-yyyy` format date of when the user started watching this manga |
653| finishDateString | string | A `mm-dd-yyyy` format date of when the user finished watching this manga |
654| mangaStartDateString | string | A `mm-dd-yyyy` format date of when the manga started |
655| mangaEndDateString | string | A `mm-dd-yyyy` format date of when the manga ended |
656| daysString | string | ??? |
657| retailString | string | ??? |
658| priorityString | string | Priority of this manga for the user |
659
660The types, statuses and series statuses aren't explicitly given by MyAnimeList, a number is given instead, here's the corresponding statuses/types according to their numbers
661
662#### Types references
663
664* `0`: Unknown
665* `1`: TV | Manga
666* `2`: OVA | Novel
667* `3`: Movie | One-shot
668* `4`: Special | Doujinshi
669* `5`: ONA | Manhwha
670* `6`: Music | Manhua
671
672#### Statuses references
673
674* `1`: Watching | Reading
675* `2`: Completed
676* `3`: On-hold
677* `4`: Dropped
678* `6`: Plan-to-watch | Plan-to-read
679
680#### Series statuses references
681
682* `1`: Currently airing | Publishing
683* `2`: Finished airing | Finished
684* `3`: Not yet aired | Not yet published
685
686#### News data model
687
688| Property | Type | Description |
689| --- | --- | --- |
690| title | string | The title of the news |
691| link | string | The link to the article |
692| image | string | URL of the cover image of the article |
693| text | string | A short preview of the news description |
694| newsNumber | string | The unique identifier of the news |
695
696#### Anime episodes data model
697
698| Property | Type | Description |
699| --- | --- | --- |
700| epNumber | number | The episode number |
701| aired | string | A "Jan 10, 2014" date like of when the episode has been aired |
702| discussionLink | string | - |
703| title | string | The title of the episode |
704| japaneseTitle | string | The japanese title of the episode |
705
706#### Anime search results data model
707
708| Property | Type | Description |
709| --- | --- | --- |
710| id | string | The unique identifier of this anime |
711| title | string | The title of the anime |
712| english | string | The english title of the anime |
713| synonyms | string | A set of synonyms of this anime |
714| episodes | string | The total count of aired episodes this anime has |
715| score | string | The average score given by users to this anime |
716| type | string | The type of the anime (TV, OVA...) |
717| status | string | The status of the anime (Airing, Finished airing...) |
718| start_date | string | A yyyy-mm-dd date format of when the anime started to be aired |
719| end_date | string | A yyyy-mm-dd date format of when the anime finished |
720| synopsis | string | The synopsis of the anime |
721| image | string | URL to the cover image of the anime |
722
723#### Manga search results data model
724
725| Property | Type | Description |
726| --- | --- | --- |
727| id | string | The unique identifier of this manga |
728| title | string | The title of the manga |
729| english | string | The english title of the manga |
730| synonyms | string | A set of synonyms of this manga |
731| chapters | string | The total count of chapters this manga has |
732| volumes | string | The total count of volumes this manga has |
733| score | string | The average score given by users to this manga |
734| type | string | The type of the manga (Manga, Doujinshi...) |
735| status | string | The status of the manga (Publishing, Finished...) |
736| start_date | string | A yyyy-mm-dd date format of when the manga started publication |
737| end_date | string | A yyyy-mm-dd date format of when the manga finished |
738| synopsis | string | The synopsis of the manga |
739| image | string | URL to the cover image of the manga |
740
741## Contributing
7421. Fork it!
7432. Create your feature branch: `git checkout -b my-new-feature`
7443. Commit your changes: `git commit -am 'Add some feature'`
7454. Push to the branch: `git push origin my-new-feature`
7465. Submit a pull request.
747
748## License
749MIT License
750
751Copyright (c) Kylart
752