@irfanshadikrishad/anilist 1.3.3-forbidden.1 → 1.4.0-forbidden.6

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,243 +1,266 @@
1
- #### @irfanshadikrishad/anilist
2
-
3
- Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts.
4
-
5
- ![NPM Version](https://img.shields.io/npm/v/%40irfanshadikrishad%2Fanilist?style=for-the-badge&color=%23adc178)
6
- ![NPM Downloads](https://img.shields.io/npm/dw/%40irfanshadikrishad%2Fanilist?style=for-the-badge&color=%23eaac8b)
7
- ![NPM License](https://img.shields.io/npm/l/%40irfanshadikrishad%2Fanilist?style=for-the-badge&color=%23f2d0a4)
8
-
9
- #### How to install?
10
-
11
- Make sure [Node.js](https://nodejs.org/en) and [npm](https://www.npmjs.com) are already installed in your system.
12
- Verify installation using
13
-
14
- ```bash
15
- node -v
16
- npm -v
17
- ```
18
-
19
- If you see the version then its installed. Otherwise install nodejs and npm should already be installed with nodejs.
20
- Then install the package by running
21
-
22
- ```bash
23
- npm install -g @irfanshadikrishad/anilist
24
- ```
25
-
26
- This will install the package globally. And you have to use commands like
27
-
28
- ```bash
29
- anilist tr -c 15
30
- ```
31
-
32
- #### How to use?
33
-
34
- Create an API client from [anilist developer setting](https://anilist.co/settings/developer) with an application name and redirect url as `https://anilist.co/api/v2/oauth/pin`. After creating the client you will get `Client ID` and `Client Secret` which is required in order to login from CLI.
35
-
36
- To login:
37
-
38
- ```
39
- anilist login -i <client-id> -s <client-secret>
40
- ```
41
-
42
- > [!NOTE]
43
- > here `<client-id>` and `<client-secret>` should be replaced by the ones that you recieved from the developer setting.
44
-
45
- #### CLI Commands Overview
46
-
47
- | **Command** | **Options** | **Description** |
48
- | ------------------------------------------- | ----------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
49
- | **`login`** | `-i, --id` `-s, --secret` | Log in with your AniList credentials |
50
- | **`logout`** | _None_ | Log out from your AniList account |
51
- | **`whoami`** | _None_ | Display information about the logged-in user |
52
- | **`-V, --version`** | _None_ | Display the current version of the CLI |
53
- | **`-h, --help`** | _None_ | Display available commands and options |
54
- | **`trending`** <br> _(alias: `tr`)_ | `-c (default: 10)` | Fetch trending anime (default count is 10) |
55
- | **`popular`** <br> _(alias: `plr`)_ | `-c (default: 10)` | Fetch popular anime (default count is 10) |
56
- | **`user`** | `<username>` | Get information about a specific AniList user |
57
- | **`lists`** <br> _(alias: `ls`)_ | `-a, --anime` <br> `-m, --manga` | Fetch anime or manga lists of the logged-in user |
58
- | **`delete`** <br> _(alias: `del`)_ | `-a, --anime` <br> `-m, --manga` <br> `-s, --activity` | Delete collections of anime, manga or activities |
59
- | **`upcoming`** <br> _(alias:`up`)_ | `-c (default: 10)` | Fetch upcoming anime (default count is 10) |
60
- | **`anime`** | `<anime-id>` | Get anime details by Anime Id |
61
- | **`search`** <br> _(alias:`srch`/`find`)_ | `<query>` <br> `-a, --anime` <br> `-m, --manga` <br> `-c (default: 10)` | Get anime/manga search results |
62
- | **`status`** <br> _(alias: `write`/`post`)_ | `<status>` | Write a status... (text/markdown/html) |
63
- | **`export`** <br> _(alias: `exp`)_ | `-a, --anime` <br> `-m, --manga` | Export anime or manga list in JSON, CSV or XML (MyAnimeList/AniDB) |
64
- | **`import`** <br> _(alias: `imp`)_ | `-a, --anime` <br> `-m, --manga` | Import anime or manga list from exported JSON, MyAnimeList (XML) or AniDB (json-large) |
65
-
66
- #### Command Breakdown:
67
-
68
- #### `login`:
69
-
70
- ```bash
71
- anilist login -i <client-id> -s <client-secret>
72
- ```
73
-
74
- - **Options**:
75
- - `-i, --id`: Specify AniList Client ID
76
- - `-s, --secret`: Provide the AniList Client Secret
77
- - **Usage**: Authenticate and log in to AniList using your ID and secret credentials.
78
-
79
- #### `logout`:
80
-
81
- ```bash
82
- anilist logout
83
- ```
84
-
85
- - **Description**: End the current session and log out from your AniList account.
86
-
87
- #### `me`:
88
-
89
- ```bash
90
- anilist me
91
- ```
92
-
93
- - **Description**: Retrieve and display information about the currently logged-in user, including stats and profile details.
94
-
95
- #### `-V, --version`:
96
-
97
- ```bash
98
- anilist -V
99
- ```
100
-
101
- - **Description**: Quickly check which version of the CLI you are running.
102
-
103
- #### `-h, --help`:
104
-
105
- ```bash
106
- anilist -h
107
- ```
108
-
109
- - **Description**: List all available commands and their usage details for quick reference.
110
-
111
- #### `trending` _(alias: `tr`)_:
112
-
113
- ```bash
114
- anilist tr -c 15
115
- ```
116
-
117
- - **Options**:
118
- - `-c (count)`: Specify how many trending anime to fetch (default: 10).
119
- - **Description**: Fetch the current trending anime series, with the option to customize how many results to display.
120
-
121
- #### `popular` _(alias: `plr`)_:
122
-
123
- ```bash
124
- anilist popular
125
- ```
126
-
127
- - **Options**:
128
- - `-c (count)`: Specify how many popular anime to fetch (default: 10).
129
- - **Description**: Fetch the most popular anime series, with the option to customize how many results to display.
130
-
131
- #### `upcoming` _(alias: `up`)_:
132
-
133
- ```bash
134
- anilist up -c 25
135
- ```
136
-
137
- - **Options**:
138
- - `-c (count)`: Specify how many upcoming anime to fetch (default: 10).
139
- - **Description**: Fetch the upcoming anime series next season, with the option to customize how many results to display.
140
-
141
- #### `user`:
142
-
143
- ```bash
144
- anilist user <username>
145
- ```
146
-
147
- - **Options**:
148
- - `<username>`: Specify the AniList username to fetch.
149
- - **Description**: Retrieve profile information about a specific AniList user.
150
-
151
- #### `lists` _(alias: `ls`)_:
152
-
153
- ```bash
154
- anilist ls -a
155
- ```
156
-
157
- - **Options**:
158
- - `-a, --anime`: Fetch the authenticated user's anime list.
159
- - `-m, --manga`: Fetch the authenticated user's manga list.
160
- - **Description**: Get the anime or manga lists of the logged-in user.
161
-
162
- #### `delete` _(alias: `del`)_:
163
-
164
- ```bash
165
- anilist del -ac
166
- ```
167
-
168
- - **Options**:
169
- - `-a, --anime`: Delete your specific anime collection that you want.
170
- - `-m, --manga`: Delete your specific manga collection that you want.
171
- - `-ac, --activity`: Delete all or any type of activities you want.
172
- - **Description**: Delete the entire anime or manga collection from the logged-in user's profile.
173
-
174
- #### `anime`
175
-
176
- ```bash
177
- anilist anime <anime-id>
178
- ```
179
-
180
- - **Options**
181
- - `<anime-id>` _(eg: 21)_ : Id of the anime you want to get details of.
182
- - **Description**: Get anime details by anime Id.
183
-
184
- #### `search` _(alias: `srch`/`find`)_:
185
-
186
- ```bash
187
- anilist search <query> -a -c 20
188
- ```
189
-
190
- - **Options**:
191
- - `<query>` : What you want to search (eg: naruto).
192
- - `-a, --anime`: To get results of anime search.
193
- - `-m, --manga`: To get results of manga search.
194
- - `-c (count)`: Specify how many items to fetch (default: 10).
195
- - **Description**: Get anime/manga search results
196
-
197
- #### `status` _(alias: `write`/`post`)_:
198
-
199
- ```bash
200
- anilist write <status>
201
- ```
202
-
203
- - **Options**:
204
- - `<status>` : This is what you want to write, It can be HTML, Markdown and/or Text. But wrap it with quotation mark (") else it might get cut-off.
205
- - **Description**: Get anime/manga search results
206
-
207
- #### `export` _(alias: `exp`)_:
208
-
209
- ```bash
210
- anilist export -a
211
- ```
212
-
213
- - **Options**:
214
- - `-a, --anime`: To export anime list.
215
- - `-m, --manga`: To export manga list.
216
- - **Description**: Export anime or manga list. For `XML (MyAnimeList/AniDB)` file, to import it on MyAnimeList, go [here](https://myanimelist.net/import.php) and choose `MyAnimeList Import` for `AniDB` go [here](https://anidb.net/user/import) and select `MyAnimeList.net - XML anime list export`.
217
-
218
- #### `import` _(alias: `imp`)_:
219
-
220
- ```bash
221
- anilist import -m
222
- ```
223
-
224
- - **Options**:
225
- - `-a, --anime`: To import anime list.
226
- - `-m, --manga`: To import manga list.
227
- - **Description**: Import anime or manga list. If you want to import anime/manga list from `MyAnimeList`, export the XML from [here](https://myanimelist.net/panel.php?go=export), for exporting list from `AniDB` go [here](https://anidb.net/user/export).
228
-
229
- > [!NOTE]
230
- > If you have exported from `AniDB`, you will have to unzip it, and there should be a file named `mylist.json`, copy and paste it in your systems download folder, and select it from import option.
231
-
232
- > [!IMPORTANT]
233
- > If you are importing from a file, place the file in the system specific download folder, And the exported file will also be exported there as well.
234
-
235
- #### Security
236
-
237
- Since you are creating your own API client for login no else else can get your credentials and the generated access token will be stored in your own system. So, As long as you don't share your device (in case you do, just logout) you are safe.
238
-
239
- #### Contribution
240
-
241
- Want to contribute to the project? Check out complete guideline [here](CONTRIBUTING.md).
242
-
243
- #### **_Thanks for visiting 💙_**
1
+ #### @irfanshadikrishad/anilist
2
+
3
+ Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts.
4
+
5
+ ![NPM Version](https://img.shields.io/npm/v/%40irfanshadikrishad%2Fanilist?style=for-the-badge&color=%23adc178)
6
+ ![NPM Downloads](https://img.shields.io/npm/dw/%40irfanshadikrishad%2Fanilist?style=for-the-badge&color=%23eaac8b)
7
+ ![NPM License](https://img.shields.io/npm/l/%40irfanshadikrishad%2Fanilist?style=for-the-badge&color=%23f2d0a4)
8
+
9
+ #### How to install?
10
+
11
+ Make sure [Node.js](https://nodejs.org/en) and [npm](https://www.npmjs.com) are already installed in your system.
12
+ Verify installation using
13
+
14
+ ```bash
15
+ node -v
16
+ npm -v
17
+ ```
18
+
19
+ If you see the version then its installed. Otherwise install nodejs and npm should already be installed with nodejs.
20
+ Then install the package by running
21
+
22
+ ```bash
23
+ npm install -g @irfanshadikrishad/anilist
24
+ ```
25
+
26
+ This will install the package globally. And you have to use commands like
27
+
28
+ ```bash
29
+ anilist tr -c 15
30
+ ```
31
+
32
+ #### How to use?
33
+
34
+ Create an API client from [anilist developer setting](https://anilist.co/settings/developer) with an application name and redirect url as `https://anilist.co/api/v2/oauth/pin`. After creating the client you will get `Client ID` and `Client Secret` which is required in order to login from CLI.
35
+
36
+ To login:
37
+
38
+ ```bash
39
+ anilist login -i <client-id> -s <client-secret>
40
+ ```
41
+
42
+ > [!NOTE]
43
+ > here `<client-id>` and `<client-secret>` should be replaced by the ones that you recieved from the developer setting. Also don't include `<>`, this only indicates need-to-be-replaced data.
44
+
45
+ #### CLI Commands Overview
46
+
47
+ | **Command** | **Options** | **Description** |
48
+ | --------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
49
+ | `login` | `-i, --id` `-s, --secret` | Log in with your AniList credentials |
50
+ | `logout` | _None_ | Log out from your AniList account |
51
+ | `whoami` | _None_ | Display information about the logged-in user |
52
+ | `-V, --version` | _None_ | Display the current version of the CLI |
53
+ | `-h, --help` | _None_ | Display available commands and options |
54
+ | `trending` <br> _(alias: `tr`)_ | `-c (default: 10)` | Fetch trending anime (default count is 10) |
55
+ | `popular` <br> _(alias: `plr`)_ | `-c (default: 10)` | Fetch popular anime (default count is 10) |
56
+ | `user` | `<username>` | Get information about a specific AniList user |
57
+ | `lists` <br> _(alias: `ls`)_ | `-a, --anime` <br> `-m, --manga` | Fetch anime or manga lists of the logged-in user |
58
+ | `delete` <br> _(alias: `del`)_ | `-a, --anime` <br> `-m, --manga` <br> `-s, --activity` | Delete collections of anime, manga or activities |
59
+ | `upcoming` <br> _(alias:`up`)_ | `-c (default: 10)` | Fetch upcoming anime (default count is 10) |
60
+ | `anime` | `<anime-id>` | Get anime details by Anime Id |
61
+ | `manga` | `<manga-id>` | Get manga details by Manga ID |
62
+ | `search` <br> _(alias:`srch`/`find`)_ | `<query>` <br> `-a, --anime` <br> `-m, --manga` <br> `-c (default: 10)` | Get anime/manga search results |
63
+ | `status` <br> _(alias: `write`/`post`)_ | `<status>` | Write a status... (text/markdown/html) |
64
+ | `export` <br> _(alias: `exp`)_ | `-a, --anime` <br> `-m, --manga` | Export anime or manga list in JSON, CSV or XML (MyAnimeList/AniDB) |
65
+ | `import` <br> _(alias: `imp`)_ | `-a, --anime` <br> `-m, --manga` | Import anime or manga list from exported JSON, MyAnimeList (XML) or AniDB (json-large) |
66
+ | `social` <br> _(alias: `sol`)_ | `-f, --follow` <br> `-u, --unfollow` | Follow users who follows you or Unfollow who doesn't follow you back with a simple command |
67
+
68
+ #### Command Breakdown:
69
+
70
+ #### `login`:
71
+
72
+ ```bash
73
+ anilist login -i <client-id> -s <client-secret>
74
+ ```
75
+
76
+ - Options:
77
+ - `-i, --id`: Specify AniList Client ID
78
+ - `-s, --secret`: Provide the AniList Client Secret
79
+ - Usage: Authenticate and log in to AniList using your ID and secret credentials.
80
+
81
+ #### `logout`:
82
+
83
+ ```bash
84
+ anilist logout
85
+ ```
86
+
87
+ - Description: End the current session and log out from your AniList account.
88
+
89
+ #### `whoami`:
90
+
91
+ ```bash
92
+ anilist whoami
93
+ ```
94
+
95
+ - Description: Retrieve and display information about the currently logged-in user, including stats and profile details.
96
+
97
+ #### `-V, --version`:
98
+
99
+ ```bash
100
+ anilist -V
101
+ ```
102
+
103
+ - Description: Quickly check which version of the CLI you are running.
104
+
105
+ #### `-h, --help`:
106
+
107
+ ```bash
108
+ anilist -h
109
+ ```
110
+
111
+ - Description: List all available commands and their usage details for quick reference.
112
+
113
+ #### `trending` _(alias: `tr`)_:
114
+
115
+ ```bash
116
+ anilist tr -c 15
117
+ ```
118
+
119
+ - Options:
120
+ - `-c (count)`: Specify how many trending anime to fetch (default: 10).
121
+ - Description: Fetch the current trending anime series, with the option to customize how many results to display.
122
+
123
+ #### `popular` _(alias: `plr`)_:
124
+
125
+ ```bash
126
+ anilist popular
127
+ ```
128
+
129
+ - Options:
130
+ - `-c (count)`: Specify how many popular anime to fetch (default: 10).
131
+ - Description: Fetch the most popular anime series, with the option to customize how many results to display.
132
+
133
+ #### `upcoming` _(alias: `up`)_:
134
+
135
+ ```bash
136
+ anilist up -c 25
137
+ ```
138
+
139
+ - Options:
140
+ - `-c (count)`: Specify how many upcoming anime to fetch (default: 10).
141
+ - Description: Fetch the upcoming anime series next season, with the option to customize how many results to display.
142
+
143
+ #### `user`:
144
+
145
+ ```bash
146
+ anilist user <username>
147
+ ```
148
+
149
+ - Options:
150
+ - `<username>`: Specify the AniList username to fetch.
151
+ - Description: Retrieve profile information about a specific AniList user.
152
+
153
+ #### `lists` _(alias: `ls`)_:
154
+
155
+ ```bash
156
+ anilist ls -a
157
+ ```
158
+
159
+ - Options:
160
+ - `-a, --anime`: Fetch the authenticated user's anime list.
161
+ - `-m, --manga`: Fetch the authenticated user's manga list.
162
+ - Description: Get the anime or manga lists of the logged-in user.
163
+
164
+ #### `delete` _(alias: `del`)_:
165
+
166
+ ```bash
167
+ anilist del -s,
168
+ ```
169
+
170
+ - Options:
171
+ - `-a, --anime`: Delete your specific anime collection that you want.
172
+ - `-m, --manga`: Delete your specific manga collection that you want.
173
+ - `-s,, --activity`: Delete all or any type of activities you want.
174
+ - Description: Delete the entire anime or manga collection from the logged-in user's profile.
175
+
176
+ #### `anime`
177
+
178
+ ```bash
179
+ anilist anime <anime-id>
180
+ ```
181
+
182
+ - Options
183
+ - `<anime-id>` _(eg: 21)_ : Id of the anime you want to get details of.
184
+ - Description: Get anime details by anime Id.
185
+
186
+ #### `manga`
187
+
188
+ ```bash
189
+ anilist manga <manga-id>
190
+ ```
191
+
192
+ - Options
193
+ - `<anime-id>` _(eg: 21)_ : Id of the manga you want to get details of.
194
+ - Description: Get manga details by manga Id.
195
+
196
+ #### `search` _(alias: `srch`/`find`)_:
197
+
198
+ ```bash
199
+ anilist search <query> -a -c 20
200
+ ```
201
+
202
+ - Options:
203
+ - `<query>` : What you want to search (eg: naruto).
204
+ - `-a, --anime`: To get results of anime search.
205
+ - `-m, --manga`: To get results of manga search.
206
+ - `-c (count)`: Specify how many items to fetch (default: 10).
207
+ - Description: Get anime/manga search results
208
+
209
+ #### `status` _(alias: `write`/`post`)_:
210
+
211
+ ```bash
212
+ anilist write <status>
213
+ ```
214
+
215
+ - Options:
216
+ - `<status>` : This is what you want to write, It can be HTML, Markdown and/or Text. But wrap it with quotation mark (") else it might get cut-off.
217
+ - Description: Get anime/manga search results
218
+
219
+ #### `export` _(alias: `exp`)_:
220
+
221
+ ```bash
222
+ anilist export -a
223
+ ```
224
+
225
+ - Options:
226
+ - `-a, --anime`: To export anime list.
227
+ - `-m, --manga`: To export manga list.
228
+ - Description: Export anime or manga list. For `XML (MyAnimeList/AniDB)` file, to import it on MyAnimeList, go [here](https://myanimelist.net/import.php) and choose `MyAnimeList Import` for `AniDB` go [here](https://anidb.net/user/import) and select `MyAnimeList.net - XML anime list export`.
229
+
230
+ #### `import` _(alias: `imp`)_:
231
+
232
+ ```bash
233
+ anilist import -m
234
+ ```
235
+
236
+ - Options:
237
+ - `-a, --anime`: To import anime list.
238
+ - `-m, --manga`: To import manga list.
239
+ - Description: Import anime or manga list. If you want to import anime/manga list from `MyAnimeList`, export the XML from [here](https://myanimelist.net/panel.php?go=export), for exporting list from `AniDB` go [here](https://anidb.net/user/export).
240
+
241
+ > [!NOTE]
242
+ > If you have exported from `AniDB`, you will have to unzip it, and there should be a file named `mylist.json`, copy and paste it in your systems download folder, and select it from import option.
243
+
244
+ > [!IMPORTANT]
245
+ > If you are importing from a file, place the file in the system specific download folder, And the exported file will also be exported there as well.
246
+
247
+ #### `social` _(alias: `sol`)_:
248
+
249
+ ```bash
250
+ anilist sol -f
251
+ ```
252
+
253
+ - Options:
254
+ - `-f, --follow`: To follow users who follows you automatically.
255
+ - `-u, --unfollow`: To unfollow users who doesn't follow you back.
256
+ - Description: It follows users who follows you or unfollow users who doesn't follow you back at ease.
257
+
258
+ #### Security
259
+
260
+ Since you are creating your own API client for login no else else can get your credentials and the generated access token will be stored in your own system. So, As long as you don't share your device (in case you do, just logout) you are safe.
261
+
262
+ #### Contribution
263
+
264
+ Want to contribute to the project? Check out complete guideline [here](CONTRIBUTING.md).
265
+
266
+ #### _Thanks for visiting 💙_
@@ -3,9 +3,9 @@ declare class Auth {
3
3
  /**
4
4
  * Get access-token from user
5
5
  */
6
- static GetAccessToken(): Promise<string>;
6
+ static GetAccessToken(): Promise<string | null>;
7
7
  static StoreAccessToken(token: string): Promise<void>;
8
- static RetriveAccessToken(): Promise<string>;
8
+ static RetriveAccessToken(): Promise<string | null>;
9
9
  static Login(clientId: number, clientSecret: string): Promise<void>;
10
10
  static Myself(): Promise<{
11
11
  id: number;
@@ -49,8 +49,19 @@ declare class Auth {
49
49
  static callAnimeImporter(): Promise<void>;
50
50
  static callMangaImporter(): Promise<void>;
51
51
  private static LikeFollowing;
52
- private static Like;
52
+ private static LikeGlobal;
53
53
  private static LikeSpecificUser;
54
+ static LikeFollowingActivityV2(perPage: number): Promise<void>;
54
55
  static AutoLike(): Promise<void>;
55
56
  }
56
- export { Auth };
57
+ declare class Social {
58
+ /**
59
+ * Follow the users that follows you
60
+ */
61
+ static follow(): Promise<void>;
62
+ /**
63
+ * Unfollow the users thats not following you
64
+ */
65
+ static unfollow(): Promise<void>;
66
+ }
67
+ export { Auth, Social };