{"id":17339097,"url":"https://github.com/lubien/popura","last_synced_at":"2025-04-14T19:11:23.872Z","repository":{"id":57327509,"uuid":"61336882","full_name":"lubien/popura","owner":"lubien","description":"[MAL API is down 😉] NodeJS wrapper for MyAnimeList API","archived":false,"fork":false,"pushed_at":"2018-05-27T14:43:59.000Z","size":106,"stargazers_count":28,"open_issues_count":6,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T04:45:47.435Z","etag":null,"topics":["myanimelist-api","nodejs-wrapper"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/popura","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lubien.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-17T01:27:00.000Z","updated_at":"2023-05-05T11:34:22.000Z","dependencies_parsed_at":"2022-09-16T07:00:48.445Z","dependency_job_id":null,"html_url":"https://github.com/lubien/popura","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lubien%2Fpopura","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lubien%2Fpopura/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lubien%2Fpopura/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lubien%2Fpopura/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lubien","download_url":"https://codeload.github.com/lubien/popura/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248943456,"owners_count":21186958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["myanimelist-api","nodejs-wrapper"],"created_at":"2024-10-15T15:40:45.016Z","updated_at":"2025-04-14T19:11:23.851Z","avatar_url":"https://github.com/lubien.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# popura\n\n\u003e NodeJS wrapper for MyAnimeList API\n\n[![npm version](https://badge.fury.io/js/popura.svg)](https://badge.fury.io/js/popura)\n[![Travis CI Build Status](https://travis-ci.org/lubien/popura.svg?branch=master)](https://travis-ci.org/lubien/popura)\n[![Coverage Status](https://coveralls.io/repos/github/lubien/popura/badge.svg?branch=master)](https://coveralls.io/github/lubien/popura?branch=master)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://www.pixiv.net/member.php?id=1722912\" title=\"Popura by yotsu\"\u003e\u003cimg src=\"http://i.imgur.com/Iarmq6S.png\" alt=\"Popura by yotsu\"/\u003e\u003c/a\u003e\n  \u003cp align=\"center\" style=\"color: #babac4\"\u003e\n    Image by \u003ca href=\"http://www.pixiv.net/member.php?id=1722912\" title=\"yotsu\"\u003eyotsu\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n[Popura](http://myanimelist.net/character/24417/Popura_Taneshima) is a promise-returning wrapper for MAL API.\n\n## Warning\n\n[MAL API is broken](https://myanimelist.net/forum/?topicid=1731860#msg55362465). Popura wont work until they solve their internal issues.\n\n## Table of Contents\n\n* [Install](#install)\n* [Usage](#usage)\n* [API](#api)\n* [Models](#models)\n * [Anime Model][anime-model]\n * [Manga Model][manga-model]\n * [Anime List Item Model][anime-list-item-model]\n * [Manga List Item Model][manga-list-item-model]\n * [Myinfo Model][myinfo-model]\n* [Development](#development)\n* [License](#license)\n\n## Install\n\n```\n$ npm install --save popura\n```\n\n## Usage\n\n```js\nimport popura from 'popura';\nconst client = popura('YourAwesomeUsername', 'YourHackablePassword');\n\nclient.getAnimeList()\n  .then(res =\u003e console.log(res))\n  .catch(err =\u003e console.log(err));\n```\n\n## API\n\n### `.getUser()`\n\nReturn the current user's username.\n\n### `.setUser(username, password)`\n\nChange the current user in this client instance.\n\n### `.verifyAuth()`\n\nCheck if this user is valid.\n\nReturns `Promise` =\u003e `{id, username}`.\n\n### `.searchAnimes(name)` and `.searchMangas(name)`\n\nSearch for an anime or manga title by `name`.\n\nReturns `Promise` =\u003e Array of [Anime Models][anime-model] | [Manga Models][manga-model].\n\n### `.getAnimeList(username = this.user)` and `.getMangaList(username = this.user)`\n\nGet the animelist or mangalist from an user. If `username` is empty, returns current user's list.\n\nReturns `Promise` =\u003e `{myinfo, list}` where `myinfo` is a [Myinfo Model][myinfo-model] and `list` is an array of [Anime List Item Models][anime-list-item-model] | [Manga List Item Models][manga-list-item-model].\n\n### `.addAnime(id, values = {})` and `.addManga(id, values = {})`\n\nInserts an anime or manga with `id` into your list. Optionally you can define `values` from [Anime Models][anime-model] | [Manga Models][manga-model].\n\nReturns `Promise` =\u003e Raw `response.body`.\n\n### `.updateAnime(id, values = {})` and `updateManga(id, values = {})`\n\nChanges `values` from an anime or manga with `id` in your list. Define `values` from [Anime Models][anime-model] | [Manga Models][manga-model].\n\nReturns `Promise` =\u003e Raw `response.body`.\n\n### `.deleteAnime(id)` and `deleteManga(id)`\n\nRemoves an anime or manga with `id` from your list.\n\nReturns `Promise` =\u003e Raw `response.body`.\n\n## Models\n\n### Anime Model\n\nModel used to add/update animes\n\nProperty | Type | Note\n-------- | ---- | ----\nepisode | int\nstatus | `int` or `string` | `1` / `watching`, `2` / `completed`, `3` / `onhold`, `4` / `dropped`, `6` / `plantowatch`\nscore | `int`\nstorage_type | `int`\nstorage_value | `float`\ntimes_rewatched | `int`\nrewatch_value | `int`\ndate_start | `date` | `mmddyyyy`\ndate_finish | `date` | `mmddyyyy`\npriority | `int`\nenable_discussion | `int` | `1` = enable, `0` = disable\nenable_rewatching | `int` | `1` = enable, `0` = disable\ncomments | `string`\nfansub_group | `string`\ntags | `array`\n\n### Manga Model\n\nModel used to add/update mangas\n\nProperty | Type | Note\n-------- | ---- | ----\nchapter | int\nvolume | int\nstatus | `int` or `string` | `1` / `reading`, `2` / `completed`, `3` / `onhold`, `4` / `dropped`, `6` / `plantoread`\nscore | `int`\ntimes_reread | `int`\nreread_value | `int`\ndate_start | `date` | `mmddyyyy`\ndate_finish | `date` | `mmddyyyy`\npriority | `int`\nenable_discussion | `int` | `1` = enable, `0` = disable\nenable_rereading | `int` | `1` = enable, `0` = disable\ncomments | `string`\nscan_group | `string`\ntags | `array`\nretail_volumes | `int`\n\n### Anime List Item Model\n\nModel you receive from API when requesting anime list\n\nProperty | Type | Note\n-------- | ---- | ----\nseries_animedb_id | `int`\nseries_title | `string`\nseries_synonyms | `array`\nseries_type | `int` | `1` = `TV`, `2` = `OVA`, `3` = `Movie`, `4` = `Special`, `5` = `ONA`, `6` = `Music`\nseries_episodes | `int`\nseries_status | `int` | `1` = `Airing`, `2` = `Finished`, `3` = `Not Yet Aired`\nseries_start | `date` | `mmddyyyy`\nseries_end | `date` | `mmddyyyy`\nmy_id | `int`\nmy_watched_episodes | `int`\nmy_start_date | `date` | `mmddyyyy`\nmy_finish_date | `date` | `mmddyyyy`\nmy_score | `int`\nmy_status | `int` | `1` = `watching`, `2` = `completed`, `3` = `onhold`, `4` = `dropped`, `6` = `plantowatch`\nmy_rewatching | `int`\nmy_rewatching_ep | `int`\nmy_last_updated | `date` | `mmddyyyy`\nmy_tags | `array`\n\n### Manga List Item Model\n\nModel you receive from API when requesting anime list\n\nProperty | Type | Note\n-------- | ---- | ----\nseries_mangadb_id | `int`\nseries_title | `string`\nseries_synonyms | `array`\nseries_type | `int` | TODO: figure out the meaning of these `int`s\nseries_chapters | `int`\nseries_volumes | `int`\nseries_status | `int` | TODO: figure out the meaning of these `int`s\nseries_start | `date` | `mmddyyyy`\nseries_end | `date` | `mmddyyyy`\nmy_id | `int`\nmy_read_chapters | `int`\nmy_read_volumes | `int`\nmy_start_date | `date` | `mmddyyyy`\nmy_finish_date | `date` | `mmddyyyy`\nmy_score | `int`\nmy_status | `int` | `1` = `reading`, `2` = `completed`, `3` = `onhold`, `4` = `dropped`, `6` = `plantoread`\nmy_rereading | `int`\nmy_rereading_chap | `int`\nmy_last_updated | `date` | `mmddyyyy`\nmy_tags | `array`\n\n### Myinfo Model\n\nProperty | Type | Note\n-------- | ---- | ----\nuser_id | `int`\nuser_name | `string`\nuser_watching | `int` | Only for anime\nuser_reading | `int` | Only for manga\nuser_completed | `int`\nuser_onhold | `int`\nuser_dropped | `int`\nuser_plantowatch | `int` | Only for anime\nuser_plantoread | `int` | Only for manga\nuser_days_spent_watching | `float` | Yes, they use 'watching' for manga too\n\n## Development\n\nAfter clonning this repo, you must copy `.env.sample` to `.env` and put your MAL username and password.\n\nIn some tests, it'll add, update and remove one anime and one manga from your lists. You can specify these two at `.env`. Defaults to anime Tachumaru Gekijou (id = 9562) and manga Junshin Miracle 100% (id = 94483), two not so known titles.\n\n## License\n\n[MIT](LICENSE.md)\n\n[myinfo-model]: #myinfo-model\n[anime-model]: #anime-model\n[manga-model]: #manga-model\n[anime-list-item-model]: #anime-list-item-model\n[manga-list-item-model]: #manga-list-item-model\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flubien%2Fpopura","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flubien%2Fpopura","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flubien%2Fpopura/lists"}