wyzie-lib 2.1.9 → 2.2.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.
Files changed (2) hide show
  1. package/README.md +1 -76
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -6,79 +6,4 @@
6
6
  </p>
7
7
 
8
8
  Wyzie Lib is a package made for easily implementing [Wyzie Subs](https://sub.wyzie.ru) into your
9
- project without all the fuss. [Read our source code!](https://github.com/itzcozi/wyzie-lib)
10
-
11
- <sup>New VTT Parser!</sup>
12
-
13
- ## Features
14
-
15
- - **Fast**: This package was written in Vite with TypeScript, so it's fast and reliable.
16
- - **Simple**: Just one function for searching subtitles using Wyzie Subs API.
17
- - **VTT Parser**: Convert SRT subtitles to VTT format quickly.
18
- - **Open-Source**: The API and package are open-source.
19
-
20
- **Recommended by [Checksub Blog](https://www.checksub.com/blog/best-subtitles-api-fast-efficient).**
21
-
22
- ## Installation
23
-
24
- **NPM**
25
-
26
- ```bash
27
- npm install wyzie-lib
28
- ```
29
-
30
- **PNPM**
31
-
32
- ```bash
33
- pnpm install wyzie-lib
34
- ```
35
-
36
- **Yarn**
37
-
38
- ```bash
39
- yarn add wyzie-lib
40
- ```
41
-
42
- ## Usage
43
-
44
- ```ts
45
- import { type SubtitleData, searchSubtitles, parseToVTT } from "wyzie-lib";
46
-
47
- // Fetches all subtitles for the media with the TMDB ID 286217
48
- const data: SubtitleData[] = await searchSubtitles({ tmdb_id: 286217, format: "srt" });
49
- console.log(data[0].id); // Prints the ID of the first subtitle object
50
-
51
- // Converts the first subtitle from SRT to VTT format
52
- const vttContent = await parseToVTT(data[0].url); // Passes the first subtitle URL
53
- console.log(vttContent); // Prints the raw VTT content
54
- ```
55
-
56
- Check out [demo.html](https://raw.githubusercontent.com/itzCozi/wyzie-lib/refs/heads/main/demo.html)
57
- for a working example using the VTT parser.
58
-
59
- ### Parameters
60
-
61
- | Parameter | Name | Description |
62
- | ----------------------- | ----------------- | ----------------------------------------------------------------------------------------- |
63
- | **tmdb_id** - _number_ | TmdbId | The TMDB ID of the movie or TV show. _(tmdb_id or imdb_id is required)_ |
64
- | **imdb_id** - _number_ | ImdbId | The IMDB ID of the movie or TV show. _(imdb_id or tmdb_id is required)_ |
65
- | **format** - _string_ | format | The file format of the subtitles returned. _(srt, ass, vtt, txt, sub, mpl, webvtt, dfxp)_ |
66
- | **season** - _number_ | season | Disired season of subtites _(this requires episode parameter aswell)_ |
67
- | **episode** - _number_ | episode | The episode of the given season. |
68
- | **language** - _string_ | language | The ISO 3166 code of the provided subtitles. |
69
- | **hi** - _boolean_ | isHearingImpaired | A boolean indicating if the subtitles are hearing impaired. |
70
-
71
- ### Types
72
-
73
- - **SearchSubtitlesParams**: All valid parameters recognized by the API.
74
- - **QueryParams**: All parameters (optional and required) available for the wyzie-subs API.
75
- - **SubtitleData**: All returned values from the API with their respective types.
76
-
77
- Check out the types.ts file
78
- [here](https://raw.githubusercontent.com/itzCozi/wyzie-lib/refs/heads/main/src/types.ts).
79
-
80
- <hr />
81
-
82
- <sup>
83
- Created by <a href="https://github.com/itzcozi" alt="github" title="itzCozi on Github">BadDeveloper</a> with 💙
84
- </sup>
9
+ project without all the fuss. Read the docs [here](https://docs.wyzie.ru/subs/usage/package).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wyzie-lib",
3
- "version": "2.1.9",
3
+ "version": "2.2.0",
4
4
  "icon": "https://i.postimg.cc/L5ppKYC5/cclogo.png",
5
5
  "license": "MIT",
6
6
  "keywords": [