@irfanshadikrishad/anilist 2.0.0-forbidden → 2.0.0-forbidden.1

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.
@@ -0,0 +1,3 @@
1
+ npm run format
2
+ npm run test
3
+ git add .
package/README.md CHANGED
@@ -44,26 +44,26 @@ 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
- | `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 |
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` <br> `-i, --inactive <months>` | Follow users who follows you, unfollow who doesn't follow you back, or unfollow stale/inactive accounts |
67
67
 
68
68
  #### Command Breakdown:
69
69
 
@@ -250,10 +250,15 @@ anilist import -m
250
250
  anilist sol -f
251
251
  ```
252
252
 
253
+ ```bash
254
+ anilist sol -i 6
255
+ ```
256
+
253
257
  - Options:
254
258
  - `-f, --follow`: To follow users who follows you automatically.
255
259
  - `-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.
260
+ - `-i, --inactive <months>`: To unfollow users you follow who haven't posted any activity in the given number of months, to help clear out stale/inactive accounts.
261
+ - Description: It follows users who follows you, unfollows users who doesn't follow you back, or unfollows stale accounts with no recent activity, all at ease.
257
262
 
258
263
  #### Security
259
264
 
@@ -263,4 +268,13 @@ Since you are creating your own API client for login no else else can get your c
263
268
 
264
269
  Want to contribute to the project? Check out complete guideline [here](CONTRIBUTING.md).
265
270
 
271
+ #### Publish
272
+
273
+ • Bump the version (since you have real changes since 2.0.0-forbidden was published, you can't republish that exact version):
274
+ `npm version prerelease --preid=forbidden --no-git-tag-version`
275
+ This takes 2.0.0-forbidden → 2.0.0-forbidden.0, matching the pattern of past releases (1.1.0-forbidden.0, .7, etc.).
276
+ • Build: `npm run build`
277
+ • Publish under the forbidden tag, not latest:
278
+ `npm publish --tag forbidden`
279
+
266
280
  #### _Thanks for visiting 💙_
@@ -13,13 +13,20 @@ declare class Auth {
13
13
  static MyUserId(): Promise<number>;
14
14
  static MyUserName(): Promise<string>;
15
15
  static DeleteMyActivities(): Promise<void>;
16
- static DeleteMyAnimeList(): Promise<void>;
16
+ private static DeleteMediaEntryById;
17
17
  static DeleteAnimeById(id: number, title?: MediaTitle): Promise<void>;
18
- static DeleteMyMangaList(): Promise<void>;
19
18
  static DeleteMangaById(id: number, title?: MediaTitle): Promise<void>;
19
+ private static DeleteMyMediaList;
20
+ static DeleteMyAnimeList(): Promise<void>;
21
+ static DeleteMyMangaList(): Promise<void>;
20
22
  static Write(status: string): Promise<void>;
21
23
  static callAnimeImporter(): Promise<void>;
22
24
  static callMangaImporter(): Promise<void>;
25
+ /**
26
+ * Attempt to like a single activity, respecting activities that are already liked.
27
+ * Printing/counting is left to the caller since labeling conventions differ per flow.
28
+ */
29
+ private static attemptLikeActivity;
23
30
  private static LikeFollowing;
24
31
  private static LikeGlobal;
25
32
  private static LikeSpecificUser;
@@ -27,6 +34,14 @@ declare class Auth {
27
34
  static AutoLike(): Promise<void>;
28
35
  }
29
36
  declare class Social {
37
+ /**
38
+ * Fetch every page of a followers/following listing for the current user.
39
+ */
40
+ private static fetchAllUsers;
41
+ /**
42
+ * Toggle-follow a batch of users, logging the outcome of each.
43
+ */
44
+ private static toggleFollowBatch;
30
45
  /**
31
46
  * Follow the users that follows you
32
47
  */
@@ -35,5 +50,10 @@ declare class Social {
35
50
  * Unfollow the users thats not following you
36
51
  */
37
52
  static unfollow(): Promise<void>;
53
+ /**
54
+ * Unfollow the users you follow who haven't posted any activity in the
55
+ * given number of months, to help clear out stale/inactive accounts.
56
+ */
57
+ static unfollowInactive(months: number): Promise<void>;
38
58
  }
39
59
  export { Auth, Social };