@irfanshadikrishad/anilist 1.2.5 → 1.2.7

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
@@ -44,24 +44,25 @@ anilist login -i <client-id> -s <client-secret>
44
44
 
45
45
  #### CLI Commands Overview
46
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) |
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
+ | `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 |
65
66
 
66
67
  #### Command Breakdown:
67
68
 
@@ -71,10 +72,10 @@ anilist login -i <client-id> -s <client-secret>
71
72
  anilist login -i <client-id> -s <client-secret>
72
73
  ```
73
74
 
74
- - **Options**:
75
+ - Options:
75
76
  - `-i, --id`: Specify AniList Client ID
76
77
  - `-s, --secret`: Provide the AniList Client Secret
77
- - **Usage**: Authenticate and log in to AniList using your ID and secret credentials.
78
+ - Usage: Authenticate and log in to AniList using your ID and secret credentials.
78
79
 
79
80
  #### `logout`:
80
81
 
@@ -82,7 +83,7 @@ anilist login -i <client-id> -s <client-secret>
82
83
  anilist logout
83
84
  ```
84
85
 
85
- - **Description**: End the current session and log out from your AniList account.
86
+ - Description: End the current session and log out from your AniList account.
86
87
 
87
88
  #### `me`:
88
89
 
@@ -90,7 +91,7 @@ anilist logout
90
91
  anilist me
91
92
  ```
92
93
 
93
- - **Description**: Retrieve and display information about the currently logged-in user, including stats and profile details.
94
+ - Description: Retrieve and display information about the currently logged-in user, including stats and profile details.
94
95
 
95
96
  #### `-V, --version`:
96
97
 
@@ -98,7 +99,7 @@ anilist me
98
99
  anilist -V
99
100
  ```
100
101
 
101
- - **Description**: Quickly check which version of the CLI you are running.
102
+ - Description: Quickly check which version of the CLI you are running.
102
103
 
103
104
  #### `-h, --help`:
104
105
 
@@ -106,7 +107,7 @@ anilist -V
106
107
  anilist -h
107
108
  ```
108
109
 
109
- - **Description**: List all available commands and their usage details for quick reference.
110
+ - Description: List all available commands and their usage details for quick reference.
110
111
 
111
112
  #### `trending` _(alias: `tr`)_:
112
113
 
@@ -114,9 +115,9 @@ anilist -h
114
115
  anilist tr -c 15
115
116
  ```
116
117
 
117
- - **Options**:
118
+ - Options:
118
119
  - `-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
+ - Description: Fetch the current trending anime series, with the option to customize how many results to display.
120
121
 
121
122
  #### `popular` _(alias: `plr`)_:
122
123
 
@@ -124,9 +125,9 @@ anilist tr -c 15
124
125
  anilist popular
125
126
  ```
126
127
 
127
- - **Options**:
128
+ - Options:
128
129
  - `-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
+ - Description: Fetch the most popular anime series, with the option to customize how many results to display.
130
131
 
131
132
  #### `upcoming` _(alias: `up`)_:
132
133
 
@@ -134,9 +135,9 @@ anilist popular
134
135
  anilist up -c 25
135
136
  ```
136
137
 
137
- - **Options**:
138
+ - Options:
138
139
  - `-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
+ - Description: Fetch the upcoming anime series next season, with the option to customize how many results to display.
140
141
 
141
142
  #### `user`:
142
143
 
@@ -144,9 +145,9 @@ anilist up -c 25
144
145
  anilist user <username>
145
146
  ```
146
147
 
147
- - **Options**:
148
+ - Options:
148
149
  - `<username>`: Specify the AniList username to fetch.
149
- - **Description**: Retrieve profile information about a specific AniList user.
150
+ - Description: Retrieve profile information about a specific AniList user.
150
151
 
151
152
  #### `lists` _(alias: `ls`)_:
152
153
 
@@ -154,10 +155,10 @@ anilist user <username>
154
155
  anilist ls -a
155
156
  ```
156
157
 
157
- - **Options**:
158
+ - Options:
158
159
  - `-a, --anime`: Fetch the authenticated user's anime list.
159
160
  - `-m, --manga`: Fetch the authenticated user's manga list.
160
- - **Description**: Get the anime or manga lists of the logged-in user.
161
+ - Description: Get the anime or manga lists of the logged-in user.
161
162
 
162
163
  #### `delete` _(alias: `del`)_:
163
164
 
@@ -165,11 +166,11 @@ anilist ls -a
165
166
  anilist del -ac
166
167
  ```
167
168
 
168
- - **Options**:
169
+ - Options:
169
170
  - `-a, --anime`: Delete your specific anime collection that you want.
170
171
  - `-m, --manga`: Delete your specific manga collection that you want.
171
172
  - `-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
+ - Description: Delete the entire anime or manga collection from the logged-in user's profile.
173
174
 
174
175
  #### `anime`
175
176
 
@@ -177,9 +178,9 @@ anilist del -ac
177
178
  anilist anime <anime-id>
178
179
  ```
179
180
 
180
- - **Options**
181
+ - Options
181
182
  - `<anime-id>` _(eg: 21)_ : Id of the anime you want to get details of.
182
- - **Description**: Get anime details by anime Id.
183
+ - Description: Get anime details by anime Id.
183
184
 
184
185
  #### `search` _(alias: `srch`/`find`)_:
185
186
 
@@ -187,12 +188,12 @@ anilist anime <anime-id>
187
188
  anilist search <query> -a -c 20
188
189
  ```
189
190
 
190
- - **Options**:
191
+ - Options:
191
192
  - `<query>` : What you want to search (eg: naruto).
192
193
  - `-a, --anime`: To get results of anime search.
193
194
  - `-m, --manga`: To get results of manga search.
194
195
  - `-c (count)`: Specify how many items to fetch (default: 10).
195
- - **Description**: Get anime/manga search results
196
+ - Description: Get anime/manga search results
196
197
 
197
198
  #### `status` _(alias: `write`/`post`)_:
198
199
 
@@ -200,9 +201,9 @@ anilist search <query> -a -c 20
200
201
  anilist write <status>
201
202
  ```
202
203
 
203
- - **Options**:
204
+ - Options:
204
205
  - `<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
+ - Description: Get anime/manga search results
206
207
 
207
208
  #### `export` _(alias: `exp`)_:
208
209
 
@@ -210,10 +211,10 @@ anilist write <status>
210
211
  anilist export -a
211
212
  ```
212
213
 
213
- - **Options**:
214
+ - Options:
214
215
  - `-a, --anime`: To export anime list.
215
216
  - `-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
+ - 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
 
218
219
  #### `import` _(alias: `imp`)_:
219
220
 
@@ -221,10 +222,10 @@ anilist export -a
221
222
  anilist import -m
222
223
  ```
223
224
 
224
- - **Options**:
225
+ - Options:
225
226
  - `-a, --anime`: To import anime list.
226
227
  - `-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
+ - 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
 
229
230
  > [!NOTE]
230
231
  > 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.
@@ -232,6 +233,17 @@ anilist import -m
232
233
  > [!IMPORTANT]
233
234
  > 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
 
236
+ #### `social` _(alias: `sol`)_:
237
+
238
+ ```bash
239
+ anilist sol -f
240
+ ```
241
+
242
+ - Options:
243
+ - `-f, --follow`: To follow users who follows you automatically.
244
+ - `-u, --unfollow`: To unfollow users who doesn't follow you back.
245
+ - Description: It follows users who follows you or unfollow users who doesn't follow you back at ease.
246
+
235
247
  #### Security
236
248
 
237
249
  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.
@@ -240,4 +252,4 @@ Since you are creating your own API client for login no else else can get your c
240
252
 
241
253
  Want to contribute to the project? Check out complete guideline [here](CONTRIBUTING.md).
242
254
 
243
- #### **_Thanks for visiting 💙_**
255
+ #### _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,4 +49,14 @@ declare class Auth {
49
49
  static callAnimeImporter(): Promise<void>;
50
50
  static callMangaImporter(): Promise<void>;
51
51
  }
52
- export { Auth };
52
+ declare class Social {
53
+ /**
54
+ * Follow the users that follows you
55
+ */
56
+ static follow(): Promise<void>;
57
+ /**
58
+ * Unfollow the users thats not following you
59
+ */
60
+ static unfollow(): Promise<void>;
61
+ }
62
+ export { Auth, Social };