@irfanshadikrishad/anilist 1.0.6 → 1.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  #### Changelog
2
2
 
3
+ #### v1.0.7
4
+
5
+ - Optimization
6
+ - Implemented linting
7
+ - Implemented preetier
8
+ - Implemented github-actions
9
+ - No limit on delete command (previously only 50 could be deleted per-command)
10
+
3
11
  #### v1.0.6
4
12
 
5
13
  - Users can import/export the anime or manga list
@@ -1,43 +1,43 @@
1
- #### Contributor Covenant Code of Conduct
2
-
3
- #### Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- #### Our Standards
8
-
9
- Examples of behavior that contributes to creating a positive environment include:
10
-
11
- - Using welcoming and inclusive language
12
- - Being respectful of differing viewpoints and experiences
13
- - Gracefully accepting constructive criticism
14
- - Focusing on what is best for the community
15
- - Showing empathy towards other community members
16
-
17
- Examples of unacceptable behavior by participants include:
18
-
19
- - The use of sexualized language or imagery and unwelcome sexual attention or advances
20
- - Trolling, insulting/derogatory comments, and personal or political attacks
21
- - Public or private harassment
22
- - Publishing others' private information, such as a physical or electronic address, without explicit permission
23
- - Other conduct which could reasonably be considered inappropriate in a professional setting
24
-
25
- #### Our Responsibilities
26
-
27
- Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
-
29
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that do not align with this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project.
30
-
31
- #### Scope
32
-
33
- This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
34
-
35
- #### Enforcement
36
-
37
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [discord](https://discordid.netlify.app/?id=1119275731021725707). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
38
-
39
- The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
40
-
41
- #### Attribution
42
-
43
- This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.4.
1
+ #### Contributor Covenant Code of Conduct
2
+
3
+ #### Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ #### Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ - Using welcoming and inclusive language
12
+ - Being respectful of differing viewpoints and experiences
13
+ - Gracefully accepting constructive criticism
14
+ - Focusing on what is best for the community
15
+ - Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ - The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ - Trolling, insulting/derogatory comments, and personal or political attacks
21
+ - Public or private harassment
22
+ - Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ - Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ #### Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that do not align with this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project.
30
+
31
+ #### Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
34
+
35
+ #### Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [discord](https://discordid.netlify.app/?id=1119275731021725707). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
38
+
39
+ The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
40
+
41
+ #### Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.4.
package/CONTRIBUTING.md CHANGED
@@ -43,11 +43,11 @@ Thank you for considering contributing to **@irfanshadikrishad/anilist**! We wel
43
43
  8. Commit Your Changes
44
44
  Commit your changes with a clear and descriptive commit message:
45
45
  ```bash
46
- git commit -m "Add new feature: [describe the feature]"
46
+ git commit -m "feature: [describe the feature]"
47
47
  ```
48
48
  or for bug fixes:
49
49
  ```bash
50
- git commit -m "Fix: [describe the bug fix]"
50
+ git commit -m "fix: [describe the bug fix]"
51
51
  ```
52
52
  9. Push to Your Fork
53
53
  Push your changes to your forked repository:
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
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
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 |
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
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
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 💙_**
@@ -3,7 +3,7 @@ declare function storeAccessToken(token: string): Promise<void>;
3
3
  declare function retriveAccessToken(): Promise<string>;
4
4
  declare function anilistUserLogin(clientId: number, clientSecret: string): Promise<void>;
5
5
  declare function currentUserInfo(): Promise<any>;
6
- declare function isLoggedIn(): Promise<Boolean>;
6
+ declare function isLoggedIn(): Promise<boolean>;
7
7
  declare function logoutUser(): Promise<void>;
8
8
  declare function currentUsersId(): Promise<any>;
9
9
  declare function currentUsersName(): Promise<any>;