wyzie-lib 2.1.8 → 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 -74
  2. package/package.json +10 -9
package/README.md CHANGED
@@ -6,77 +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
- ## Installation
21
-
22
- **NPM**
23
-
24
- ```bash
25
- npm install wyzie-lib
26
- ```
27
-
28
- **PNPM**
29
-
30
- ```bash
31
- pnpm install wyzie-lib
32
- ```
33
-
34
- **Yarn**
35
-
36
- ```bash
37
- yarn add wyzie-lib
38
- ```
39
-
40
- ## Usage
41
-
42
- ```ts
43
- import { type SubtitleData, searchSubtitles, parseToVTT } from "wyzie-lib";
44
-
45
- // Fetches all subtitles for the media with the TMDB ID 286217
46
- const data: SubtitleData[] = await searchSubtitles({ tmdb_id: 286217, format: "srt" });
47
- console.log(data[0].id); // Prints the ID of the first subtitle object
48
-
49
- // Converts the first subtitle from SRT to VTT format
50
- const vttContent = await parseToVTT(data[0].url); // Passes the first subtitle URL
51
- console.log(vttContent); // Prints the raw VTT content
52
- ```
53
-
54
- Check out [demo.html](https://raw.githubusercontent.com/itzCozi/wyzie-lib/refs/heads/main/demo.html)
55
- for a working example using the VTT parser.
56
-
57
- ### Parameters
58
-
59
- | Parameter | Name | Description |
60
- | ----------------------- | ----------------- | ----------------------------------------------------------------------------------------- |
61
- | **tmdb_id** - _number_ | TmdbId | The TMDB ID of the movie or TV show. _(tmdb_id or imdb_id is required)_ |
62
- | **imdb_id** - _number_ | ImdbId | The IMDB ID of the movie or TV show. _(imdb_id or tmdb_id is required)_ |
63
- | **format** - _string_ | format | The file format of the subtitles returned. _(srt, ass, vtt, txt, sub, mpl, webvtt, dfxp)_ |
64
- | **season** - _number_ | season | Disired season of subtites _(this requires episode parameter aswell)_ |
65
- | **episode** - _number_ | episode | The episode of the given season. |
66
- | **language** - _string_ | language | The ISO 3166 code of the provided subtitles. |
67
- | **hi** - _boolean_ | isHearingImpaired | A boolean indicating if the subtitles are hearing impaired. |
68
-
69
- ### Types
70
-
71
- - **SearchSubtitlesParams**: All valid parameters recognized by the API.
72
- - **QueryParams**: All parameters (optional and required) available for the wyzie-subs API.
73
- - **SubtitleData**: All returned values from the API with their respective types.
74
-
75
- Check out the types.ts file
76
- [here](https://raw.githubusercontent.com/itzCozi/wyzie-lib/refs/heads/main/src/types.ts).
77
-
78
- <hr />
79
-
80
- <sup>
81
- Created by <a href="https://github.com/itzcozi" alt="github" title="itzCozi on Github">BadDeveloper</a> with 💙
82
- </sup>
9
+ project without all the fuss. Read the docs [here](https://docs.wyzie.ru/subs/usage/package).
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "wyzie-lib",
3
- "version": "2.1.8",
3
+ "version": "2.2.0",
4
4
  "icon": "https://i.postimg.cc/L5ppKYC5/cclogo.png",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "wyzie-subs",
8
8
  "wyzie subs",
9
+ "wyzie api",
9
10
  "subtitle",
10
11
  "search",
11
12
  "library",
@@ -58,17 +59,17 @@
58
59
  "type": "git",
59
60
  "url": "git+https://github.com/itzcozi/wyzie-lib.git"
60
61
  },
62
+ "devDependencies": {
63
+ "prettier": "^3.5.3",
64
+ "typescript": "^5.8.2",
65
+ "vite": "^4.5.9",
66
+ "vite-plugin-dts": "^4.5.3",
67
+ "vitest": "^2.1.9"
68
+ },
61
69
  "scripts": {
62
70
  "build": "vite build && tsc",
63
71
  "test": "npx vitest",
64
72
  "format": "prettier --log-level warn --write \"{src/**/*.{ts},*.{ts,js,html,css,json,md,xml}}\"",
65
73
  "preview": "vite preview"
66
- },
67
- "devDependencies": {
68
- "prettier": "^3.5.1",
69
- "typescript": "^5.7.3",
70
- "vite": "^4.5.9",
71
- "vite-plugin-dts": "^4.5.0",
72
- "vitest": "^2.1.9"
73
74
  }
74
- }
75
+ }