@irfanshadikrishad/anilist 1.0.8 → 1.1.0-forbidden.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 CHANGED
@@ -1,232 +1,232 @@
1
- #### @irfanshadikrishad/anilist
2
-
3
- Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts.
4
-
5
- #### How to install?
6
-
7
- Make sure [Node.js](https://nodejs.org/en) and [npm](https://www.npmjs.com) are already installed in your system.
8
- Verify installation using
9
-
10
- ```bash
11
- node -v
12
- npm -v
13
- ```
14
-
15
- If you see the version then its installed. Otherwise install nodejs and npm should already be installed with nodejs.
16
- Then install the package by running
17
-
18
- ```bash
19
- npm install -g @irfanshadikrishad/anilist
20
- ```
21
-
22
- This will install the package globally. And you have to use commands like
23
-
24
- ```bash
25
- anilist tr -c 15
26
- ```
27
-
28
- #### How to use?
29
-
30
- 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.
31
-
32
- To login:
33
-
34
- ```
35
- anilist login -i <client-id> -s <client-secret>
36
- ```
37
-
38
- here `<client-id>` and `<client-secret>` should be replaced by the ones that you recieved from the developer setting.
39
-
40
- #### CLI Commands Overview
41
-
42
- | **Command** | **Options** | **Description** |
43
- | ------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------ |
44
- | **`login`** | `-i, --id` `-s, --secret` | Log in with your AniList credentials |
45
- | **`logout`** | _None_ | Log out from your AniList account |
46
- | **`me`** | _None_ | Display information about the logged-in user |
47
- | **`-V, --version`** | _None_ | Display the current version of the CLI |
48
- | **`-h, --help`** | _None_ | Display available commands and options |
49
- | **`trending`** <br> _(alias: `tr`)_ | `-c (default: 10)` | Fetch trending anime (default count is 10) |
50
- | **`popular`** <br> _(alias: `plr`)_ | `-c (default: 10)` | Fetch popular anime (default count is 10) |
51
- | **`user`** | `<username>` | Get information about a specific AniList user |
52
- | **`lists`** <br> _(alias: `ls`)_ | `-a, --anime` <br> `-m, --manga` | Fetch anime or manga lists of the logged-in user |
53
- | **`delete`** <br> _(alias: `del`)_ | `-a, --anime` <br> `-m, --manga` <br> `-ac, --activity` | Delete collections of anime, manga or activities |
54
- | **`upcoming`** <br> _(alias:`up`)_ | `-c (default: 10)` | Fetch upcoming anime (default count is 10) |
55
- | **`anime`** | `<anime-id>` | Get anime details by Anime Id |
56
- | **`search`** <br> _(alias:`srch`/`find`)_ | `<query>` <br> `-a, --anime` <br> `-m, --manga` <br> `-c (default: 10)` | Get anime/manga search results |
57
- | **`status`** <br> _(alias: `write`/`post`)_ | `<status>` | Write a status... (text/markdown/html) |
58
- | **`export`** <br> _(alias: `exp`)_ | `-a, --anime` <br> `-m, --manga` | Export anime or manga list |
59
- | **`import`** <br> _(alias: `imp`)_ | `-a, --anime` <br> `-m, --manga` | Import anime or manga list |
60
-
61
- #### Command Breakdown:
62
-
63
- #### `login`:
64
-
65
- ```bash
66
- anilist login -i <client-id> -s <client-secret>
67
- ```
68
-
69
- - **Options**:
70
- - `-i, --id`: Specify AniList Client ID
71
- - `-s, --secret`: Provide the AniList Client Secret
72
- - **Usage**: Authenticate and log in to AniList using your ID and secret credentials.
73
-
74
- #### `logout`:
75
-
76
- ```bash
77
- anilist logout
78
- ```
79
-
80
- - **Description**: End the current session and log out from your AniList account.
81
-
82
- #### `me`:
83
-
84
- ```bash
85
- anilist me
86
- ```
87
-
88
- - **Description**: Retrieve and display information about the currently logged-in user, including stats and profile details.
89
-
90
- #### `-V, --version`:
91
-
92
- ```bash
93
- anilist -V
94
- ```
95
-
96
- - **Description**: Quickly check which version of the CLI you are running.
97
-
98
- #### `-h, --help`:
99
-
100
- ```bash
101
- anilist -h
102
- ```
103
-
104
- - **Description**: List all available commands and their usage details for quick reference.
105
-
106
- #### `trending` _(alias: `tr`)_:
107
-
108
- ```bash
109
- anilist tr -c 15
110
- ```
111
-
112
- - **Options**:
113
- - `-c (count)`: Specify how many trending anime to fetch (default: 10).
114
- - **Description**: Fetch the current trending anime series, with the option to customize how many results to display.
115
-
116
- #### `popular` _(alias: `plr`)_:
117
-
118
- ```bash
119
- anilist popular
120
- ```
121
-
122
- - **Options**:
123
- - `-c (count)`: Specify how many popular anime to fetch (default: 10).
124
- - **Description**: Fetch the most popular anime series, with the option to customize how many results to display.
125
-
126
- #### `upcoming` _(alias: `up`)_:
127
-
128
- ```bash
129
- anilist up -c 25
130
- ```
131
-
132
- - **Options**:
133
- - `-c (count)`: Specify how many upcoming anime to fetch (default: 10).
134
- - **Description**: Fetch the upcoming anime series next season, with the option to customize how many results to display.
135
-
136
- #### `user`:
137
-
138
- ```bash
139
- anilist user <username>
140
- ```
141
-
142
- - **Options**:
143
- - `<username>`: Specify the AniList username to fetch.
144
- - **Description**: Retrieve profile information about a specific AniList user.
145
-
146
- #### `lists` _(alias: `ls`)_:
147
-
148
- ```bash
149
- anilist ls -a
150
- ```
151
-
152
- - **Options**:
153
- - `-a, --anime`: Fetch the authenticated user's anime list.
154
- - `-m, --manga`: Fetch the authenticated user's manga list.
155
- - **Description**: Get the anime or manga lists of the logged-in user.
156
-
157
- #### `delete` _(alias: `del`)_:
158
-
159
- ```bash
160
- anilist del -ac
161
- ```
162
-
163
- - **Options**:
164
- - `-a, --anime`: Delete your specific anime collection that you want.
165
- - `-m, --manga`: Delete your specific manga collection that you want.
166
- - `-ac, --activity`: Delete all or any type of activities you want.
167
- - **Description**: Delete the entire anime or manga collection from the logged-in user's profile.
168
-
169
- #### `anime`
170
-
171
- ```bash
172
- anilist anime <anime-id>
173
- ```
174
-
175
- - **Options**
176
- - `<anime-id>` _(eg: 21)_ : Id of the anime you want to get details of.
177
- - **Description**: Get anime details by anime Id.
178
-
179
- #### `search` _(alias: `srch`/`find`)_:
180
-
181
- ```bash
182
- anilist search <query> -a -c 20
183
- ```
184
-
185
- - **Options**:
186
- - `<query>` : What you want to search (eg: naruto).
187
- - `-a, --anime`: To get results of anime search.
188
- - `-m, --manga`: To get results of manga search.
189
- - `-c (count)`: Specify how many items to fetch (default: 10).
190
- - **Description**: Get anime/manga search results
191
-
192
- #### `status` _(alias: `write`/`post`)_:
193
-
194
- ```bash
195
- anilist write <status>
196
- ```
197
-
198
- - **Options**:
199
- - `<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.
200
- - **Description**: Get anime/manga search results
201
-
202
- #### `export` _(alias: `exp`)_:
203
-
204
- ```bash
205
- anilist export -a
206
- ```
207
-
208
- - **Options**:
209
- - `-a, --anime`: To export anime list.
210
- - `-m, --manga`: To export manga list.
211
- - **Description**: Export anime or manga list. For `XML (MyAnimeList)` file, to import it on MyAnimeList, go [here](https://myanimelist.net/import.php) and choose `MyAnimeList Import`.
212
-
213
- #### `import` _(alias: `imp`)_:
214
-
215
- ```bash
216
- anilist import -m
217
- ```
218
-
219
- - **Options**:
220
- - `-a, --anime`: To import anime list.
221
- - `-m, --manga`: To import manga list.
222
- - **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).
223
-
224
- #### Security
225
-
226
- 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.
227
-
228
- #### Contribution
229
-
230
- Want to contribute to the project? Check out complete guideline [here](CONTRIBUTING.md).
231
-
232
- #### **_Thanks for visiting 💙_**
1
+ #### @irfanshadikrishad/anilist
2
+
3
+ Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts.
4
+
5
+ #### How to install?
6
+
7
+ Make sure [Node.js](https://nodejs.org/en) and [npm](https://www.npmjs.com) are already installed in your system.
8
+ Verify installation using
9
+
10
+ ```bash
11
+ node -v
12
+ npm -v
13
+ ```
14
+
15
+ If you see the version then its installed. Otherwise install nodejs and npm should already be installed with nodejs.
16
+ Then install the package by running
17
+
18
+ ```bash
19
+ npm install -g @irfanshadikrishad/anilist
20
+ ```
21
+
22
+ This will install the package globally. And you have to use commands like
23
+
24
+ ```bash
25
+ anilist tr -c 15
26
+ ```
27
+
28
+ #### How to use?
29
+
30
+ 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.
31
+
32
+ To login:
33
+
34
+ ```
35
+ anilist login -i <client-id> -s <client-secret>
36
+ ```
37
+
38
+ here `<client-id>` and `<client-secret>` should be replaced by the ones that you recieved from the developer setting.
39
+
40
+ #### CLI Commands Overview
41
+
42
+ | **Command** | **Options** | **Description** |
43
+ | ------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------ |
44
+ | **`login`** | `-i, --id` `-s, --secret` | Log in with your AniList credentials |
45
+ | **`logout`** | _None_ | Log out from your AniList account |
46
+ | **`me`** | _None_ | Display information about the logged-in user |
47
+ | **`-V, --version`** | _None_ | Display the current version of the CLI |
48
+ | **`-h, --help`** | _None_ | Display available commands and options |
49
+ | **`trending`** <br> _(alias: `tr`)_ | `-c (default: 10)` | Fetch trending anime (default count is 10) |
50
+ | **`popular`** <br> _(alias: `plr`)_ | `-c (default: 10)` | Fetch popular anime (default count is 10) |
51
+ | **`user`** | `<username>` | Get information about a specific AniList user |
52
+ | **`lists`** <br> _(alias: `ls`)_ | `-a, --anime` <br> `-m, --manga` | Fetch anime or manga lists of the logged-in user |
53
+ | **`delete`** <br> _(alias: `del`)_ | `-a, --anime` <br> `-m, --manga` <br> `-ac, --activity` | Delete collections of anime, manga or activities |
54
+ | **`upcoming`** <br> _(alias:`up`)_ | `-c (default: 10)` | Fetch upcoming anime (default count is 10) |
55
+ | **`anime`** | `<anime-id>` | Get anime details by Anime Id |
56
+ | **`search`** <br> _(alias:`srch`/`find`)_ | `<query>` <br> `-a, --anime` <br> `-m, --manga` <br> `-c (default: 10)` | Get anime/manga search results |
57
+ | **`status`** <br> _(alias: `write`/`post`)_ | `<status>` | Write a status... (text/markdown/html) |
58
+ | **`export`** <br> _(alias: `exp`)_ | `-a, --anime` <br> `-m, --manga` | Export anime or manga list in JSON, CSV or XML (MyAnimeList) |
59
+ | **`import`** <br> _(alias: `imp`)_ | `-a, --anime` <br> `-m, --manga` | Import anime or manga list from exported JSON or MyAnimeList (XML) |
60
+
61
+ #### Command Breakdown:
62
+
63
+ #### `login`:
64
+
65
+ ```bash
66
+ anilist login -i <client-id> -s <client-secret>
67
+ ```
68
+
69
+ - **Options**:
70
+ - `-i, --id`: Specify AniList Client ID
71
+ - `-s, --secret`: Provide the AniList Client Secret
72
+ - **Usage**: Authenticate and log in to AniList using your ID and secret credentials.
73
+
74
+ #### `logout`:
75
+
76
+ ```bash
77
+ anilist logout
78
+ ```
79
+
80
+ - **Description**: End the current session and log out from your AniList account.
81
+
82
+ #### `me`:
83
+
84
+ ```bash
85
+ anilist me
86
+ ```
87
+
88
+ - **Description**: Retrieve and display information about the currently logged-in user, including stats and profile details.
89
+
90
+ #### `-V, --version`:
91
+
92
+ ```bash
93
+ anilist -V
94
+ ```
95
+
96
+ - **Description**: Quickly check which version of the CLI you are running.
97
+
98
+ #### `-h, --help`:
99
+
100
+ ```bash
101
+ anilist -h
102
+ ```
103
+
104
+ - **Description**: List all available commands and their usage details for quick reference.
105
+
106
+ #### `trending` _(alias: `tr`)_:
107
+
108
+ ```bash
109
+ anilist tr -c 15
110
+ ```
111
+
112
+ - **Options**:
113
+ - `-c (count)`: Specify how many trending anime to fetch (default: 10).
114
+ - **Description**: Fetch the current trending anime series, with the option to customize how many results to display.
115
+
116
+ #### `popular` _(alias: `plr`)_:
117
+
118
+ ```bash
119
+ anilist popular
120
+ ```
121
+
122
+ - **Options**:
123
+ - `-c (count)`: Specify how many popular anime to fetch (default: 10).
124
+ - **Description**: Fetch the most popular anime series, with the option to customize how many results to display.
125
+
126
+ #### `upcoming` _(alias: `up`)_:
127
+
128
+ ```bash
129
+ anilist up -c 25
130
+ ```
131
+
132
+ - **Options**:
133
+ - `-c (count)`: Specify how many upcoming anime to fetch (default: 10).
134
+ - **Description**: Fetch the upcoming anime series next season, with the option to customize how many results to display.
135
+
136
+ #### `user`:
137
+
138
+ ```bash
139
+ anilist user <username>
140
+ ```
141
+
142
+ - **Options**:
143
+ - `<username>`: Specify the AniList username to fetch.
144
+ - **Description**: Retrieve profile information about a specific AniList user.
145
+
146
+ #### `lists` _(alias: `ls`)_:
147
+
148
+ ```bash
149
+ anilist ls -a
150
+ ```
151
+
152
+ - **Options**:
153
+ - `-a, --anime`: Fetch the authenticated user's anime list.
154
+ - `-m, --manga`: Fetch the authenticated user's manga list.
155
+ - **Description**: Get the anime or manga lists of the logged-in user.
156
+
157
+ #### `delete` _(alias: `del`)_:
158
+
159
+ ```bash
160
+ anilist del -ac
161
+ ```
162
+
163
+ - **Options**:
164
+ - `-a, --anime`: Delete your specific anime collection that you want.
165
+ - `-m, --manga`: Delete your specific manga collection that you want.
166
+ - `-ac, --activity`: Delete all or any type of activities you want.
167
+ - **Description**: Delete the entire anime or manga collection from the logged-in user's profile.
168
+
169
+ #### `anime`
170
+
171
+ ```bash
172
+ anilist anime <anime-id>
173
+ ```
174
+
175
+ - **Options**
176
+ - `<anime-id>` _(eg: 21)_ : Id of the anime you want to get details of.
177
+ - **Description**: Get anime details by anime Id.
178
+
179
+ #### `search` _(alias: `srch`/`find`)_:
180
+
181
+ ```bash
182
+ anilist search <query> -a -c 20
183
+ ```
184
+
185
+ - **Options**:
186
+ - `<query>` : What you want to search (eg: naruto).
187
+ - `-a, --anime`: To get results of anime search.
188
+ - `-m, --manga`: To get results of manga search.
189
+ - `-c (count)`: Specify how many items to fetch (default: 10).
190
+ - **Description**: Get anime/manga search results
191
+
192
+ #### `status` _(alias: `write`/`post`)_:
193
+
194
+ ```bash
195
+ anilist write <status>
196
+ ```
197
+
198
+ - **Options**:
199
+ - `<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.
200
+ - **Description**: Get anime/manga search results
201
+
202
+ #### `export` _(alias: `exp`)_:
203
+
204
+ ```bash
205
+ anilist export -a
206
+ ```
207
+
208
+ - **Options**:
209
+ - `-a, --anime`: To export anime list.
210
+ - `-m, --manga`: To export manga list.
211
+ - **Description**: Export anime or manga list. For `XML (MyAnimeList)` file, to import it on MyAnimeList, go [here](https://myanimelist.net/import.php) and choose `MyAnimeList Import`.
212
+
213
+ #### `import` _(alias: `imp`)_:
214
+
215
+ ```bash
216
+ anilist import -m
217
+ ```
218
+
219
+ - **Options**:
220
+ - `-a, --anime`: To import anime list.
221
+ - `-m, --manga`: To import manga list.
222
+ - **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).
223
+
224
+ #### Security
225
+
226
+ 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.
227
+
228
+ #### Contribution
229
+
230
+ Want to contribute to the project? Check out complete guideline [here](CONTRIBUTING.md).
231
+
232
+ #### **_Thanks for visiting 💙_**
@@ -1,10 +1,26 @@
1
- declare function getAccessTokenFromUser(): Promise<any>;
2
- declare function storeAccessToken(token: string): Promise<void>;
3
- declare function retriveAccessToken(): Promise<string>;
4
- declare function anilistUserLogin(clientId: number, clientSecret: string): Promise<void>;
5
- declare function currentUserInfo(): Promise<any>;
6
- declare function isLoggedIn(): Promise<boolean>;
7
- declare function logoutUser(): Promise<void>;
8
- declare function currentUsersId(): Promise<any>;
9
- declare function currentUsersName(): Promise<any>;
10
- export { anilistUserLogin, currentUserInfo, currentUsersId, currentUsersName, getAccessTokenFromUser, isLoggedIn, logoutUser, retriveAccessToken, storeAccessToken, };
1
+ declare class Auth {
2
+ /**
3
+ * Get access-token from user
4
+ */
5
+ static GetAccessToken(): Promise<any>;
6
+ static StoreAccessToken(token: string): Promise<void>;
7
+ static RetriveAccessToken(): Promise<string>;
8
+ static Login(clientId: number, clientSecret: string): Promise<void>;
9
+ static Myself(): Promise<any>;
10
+ static isLoggedIn(): Promise<boolean>;
11
+ static Logout(): Promise<void>;
12
+ static MyUserId(): Promise<any>;
13
+ static MyUserName(): Promise<any>;
14
+ static DeleteMyActivities(): Promise<void>;
15
+ static DeleteMyAnimeList(): Promise<void>;
16
+ static DeleteAnimeById(id: number, title?: any): Promise<void>;
17
+ static DeleteMyMangaList(): Promise<void>;
18
+ static DeleteMangaById(id: number, title?: any): Promise<void>;
19
+ static Write(status: string): Promise<void>;
20
+ static callAnimeImporter(): Promise<void>;
21
+ static callMangaImporter(): Promise<void>;
22
+ private static Like;
23
+ private static LikeSpecificUser;
24
+ static AutoLike(): Promise<void>;
25
+ }
26
+ export { Auth };