Skip to content

Commit

Permalink
Regenerate the client library according to the new specs
Browse files Browse the repository at this point in the history
  • Loading branch information
the-maestro-bot committed May 6, 2024
1 parent eecc87f commit 0633873
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 47 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ npm i streaming-availability
### Via Script Tag from CDN

```html
<script src="https://cdn.jsdelivr.net/gh/movieofthenight/ts-streaming-availability@v4.1.0/bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/movieofthenight/ts-streaming-availability@v4.2.0/bundle.min.js"></script>
```

This script creates a global variable at `window.streamingAvailability`
Expand Down Expand Up @@ -106,7 +106,7 @@ const client = new streamingAvailability.Client(new streamingAvailability.Config
<title>Example</title>
</head>
<body style="white-space: pre-line">
<script src="https://cdn.jsdelivr.net/gh/movieofthenight/ts-streaming-availability@v4.1.0/bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/movieofthenight/ts-streaming-availability@v4.2.0/bundle.min.js"></script>
<script type="module">
const RAPID_API_KEY = "<YOUR_RAPID_API_KEY>";
Expand All @@ -122,6 +122,15 @@ const client = new streamingAvailability.Client(new streamingAvailability.Config

## Examples

These examples assume that you are running inside
a module, since it uses
[top level await](https://github.com/tc39/proposal-top-level-await).

In
[examples](https://github.com/movieofthenight/ts-streaming-availability/blob/main/examples)
folder, you can find sample package setups that
you can take as a reference.

### Get The Godfather's Streaming Availability Info

```ts
Expand Down Expand Up @@ -154,7 +163,7 @@ show.streamingOptions["us"].forEach((streamingOption) => {
<title>The Godfather</title>
</head>
<body style="white-space: pre-line">
<script src="https://cdn.jsdelivr.net/gh/movieofthenight/ts-streaming-availability@v4.1.0/bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/movieofthenight/ts-streaming-availability@v4.2.0/bundle.min.js"></script>
<script type="module">
const RAPID_API_KEY = "<YOUR_RAPID_API_KEY>";
Expand All @@ -175,8 +184,9 @@ show.streamingOptions["us"].forEach((streamingOption) => {
</html>
```

> Checkout [examples](https://github.com/movieofthenight/ts-streaming-availability/blob/main/examples)
folder for the rest of the examples.
> Checkout
> [examples](https://github.com/movieofthenight/ts-streaming-availability/blob/main/examples)
> folder for the rest of the examples.
## Auto Pagination

Expand Down
2 changes: 1 addition & 1 deletion bundle.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/classes/ChangesApiExtended.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
Get Changes</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">requestParameters</span>: <a href="../interfaces/GetChangesRequest.html" class="tsd-signature-type tsd-kind-interface">GetChangesRequest</a></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">initOverrides</span>: <span class="tsd-signature-type">RequestInit</span><span class="tsd-signature-symbol"> | </span><a href="../types/InitOverrideFunction.html" class="tsd-signature-type tsd-kind-type-alias">InitOverrideFunction</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/ChangesResult.html" class="tsd-signature-type tsd-kind-interface">ChangesResult</a><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="ChangesApi.html">ChangesApi</a>.<a href="ChangesApi.html#getChanges">getChanges</a></p><ul><li>Defined in src/apis/ChangesApi.ts:151</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="getChangesRaw" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Changes<wbr/>Raw</span><a href="#getChangesRaw" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="getChangesRaw.getChangesRaw-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Changes<wbr/>Raw</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">requestParameters</span>, <span class="tsd-kind-parameter">initOverrides</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/ApiResponse.html" class="tsd-signature-type tsd-kind-interface">ApiResponse</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/ChangesResult.html" class="tsd-signature-type tsd-kind-interface">ChangesResult</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span><a href="#getChangesRaw.getChangesRaw-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Query the new, removed, updated, expiring or upcoming movies/series/seasons/episodes in a given list of streaming services. Results are ordered by the date of the changes. Changes listed per page is 25. Changes are listed under changes field, and shows affected by these changes are listed under shows field.
Get Changes</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">requestParameters</span>: <a href="../interfaces/GetChangesRequest.html" class="tsd-signature-type tsd-kind-interface">GetChangesRequest</a></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">initOverrides</span>: <span class="tsd-signature-type">RequestInit</span><span class="tsd-signature-symbol"> | </span><a href="../types/InitOverrideFunction.html" class="tsd-signature-type tsd-kind-type-alias">InitOverrideFunction</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/ApiResponse.html" class="tsd-signature-type tsd-kind-interface">ApiResponse</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/ChangesResult.html" class="tsd-signature-type tsd-kind-interface">ChangesResult</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="ChangesApi.html">ChangesApi</a>.<a href="ChangesApi.html#getChangesRaw">getChangesRaw</a></p><ul><li>Defined in src/apis/ChangesApi.ts:63</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="getChangesWithAutoPagination" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Changes<wbr/>With<wbr/>Auto<wbr/>Pagination</span><a href="#getChangesWithAutoPagination" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="getChangesWithAutoPagination.getChangesWithAutoPagination-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Changes<wbr/>With<wbr/>Auto<wbr/>Pagination</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">requestParameters</span>, <span class="tsd-kind-parameter">maxPages</span>, <span class="tsd-kind-parameter">initOverrides</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/ChangeWithShow.html" class="tsd-signature-type tsd-kind-interface">ChangeWithShow</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><a href="#getChangesWithAutoPagination.getChangesWithAutoPagination-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Performs getChanges with auto-pagination.
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">requestParameters</span>: <a href="../interfaces/GetChangesRequest.html" class="tsd-signature-type tsd-kind-interface">GetChangesRequest</a></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">initOverrides</span>: <span class="tsd-signature-type">RequestInit</span><span class="tsd-signature-symbol"> | </span><a href="../types/InitOverrideFunction.html" class="tsd-signature-type tsd-kind-type-alias">InitOverrideFunction</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/ApiResponse.html" class="tsd-signature-type tsd-kind-interface">ApiResponse</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/ChangesResult.html" class="tsd-signature-type tsd-kind-interface">ChangesResult</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="ChangesApi.html">ChangesApi</a>.<a href="ChangesApi.html#getChangesRaw">getChangesRaw</a></p><ul><li>Defined in src/apis/ChangesApi.ts:63</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="getChangesWithAutoPagination" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Changes<wbr/>With<wbr/>Auto<wbr/>Pagination</span><a href="#getChangesWithAutoPagination" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="getChangesWithAutoPagination.getChangesWithAutoPagination-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Changes<wbr/>With<wbr/>Auto<wbr/>Pagination</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">requestParameters</span>, <span class="tsd-kind-parameter">maxPages</span>, <span class="tsd-kind-parameter">initOverrides</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/ChangeWithShow.html" class="tsd-signature-type tsd-kind-interface">ChangeWithShow</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#getChangesWithAutoPagination.getChangesWithAutoPagination-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Performs getChanges with auto-pagination.
Unlike the original getChanges, this method returns ChangeWithShow objects, which include the Show object
that corresponds to the showId field of the Change object.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">requestParameters</span>: <a href="../interfaces/GetChangesRequest.html" class="tsd-signature-type tsd-kind-interface">GetChangesRequest</a></span><div class="tsd-comment tsd-typography"><p>Request parameters</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">maxPages</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Maximum number of pages to fetch. If 0 or less, fetches all pages.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">initOverrides</span>: <span class="tsd-signature-type">RequestInit</span><span class="tsd-signature-symbol"> | </span><a href="../types/InitOverrideFunction.html" class="tsd-signature-type tsd-kind-type-alias">InitOverrideFunction</a></span><div class="tsd-comment tsd-typography"><p>Optional overrides for the fetch init parameters</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/ChangeWithShow.html" class="tsd-signature-type tsd-kind-interface">ChangeWithShow</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></h4><p>AsyncGenerator of ChangeWithShow</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/ChangeWithShow.html" class="tsd-signature-type tsd-kind-interface">ChangeWithShow</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>AsyncGenerator of ChangeWithShow</p>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in src/client.ts:90</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="isJsonMime" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>is<wbr/>Json<wbr/>Mime</span><a href="#isJsonMime" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="isJsonMime.isJsonMime-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Json<wbr/>Mime</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">mime</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isJsonMime.isJsonMime-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Check if the given MIME is a JSON MIME.
JSON MIME examples:
application/json
Expand Down
Loading

0 comments on commit 0633873

Please sign in to comment.