Comparing version 0.0.2 to 0.0.3
@@ -18,3 +18,3 @@ | ||
const episodes = (seasonSlug, options) => apiService | ||
const season = (seasonSlug, options) => apiService | ||
.get('/seasons/' + seasonSlug + '/episodes?per_page=100', options) | ||
@@ -21,0 +21,0 @@ .then(res => res.json()) |
{ | ||
"name": "rt-sdk", | ||
"description": "", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -1,1 +0,46 @@ | ||
# rt-sdk | ||
# rt-sdk | ||
[![npm version](https://badge.fury.io/js/rt-sdk.svg)](https://badge.fury.io/js/rt-sdk) | ||
The rt-sdk is a simple little wrapper for Company X's APIs. | ||
You can request things like: | ||
- series | ||
- episodes | ||
- livestreams | ||
- search results | ||
- products | ||
- and many more stuffz! | ||
# Get started! | ||
- Run `yarn add rt-sdk` in the project folder of your project. (This will add `rt-sdk` to your `package.json`) | ||
```js | ||
const rt = require('rt-sdk'); | ||
``` | ||
- Use one of the available methods listed below to start building! | ||
> Remember that all `rt-sdk` methods return a [Promise()](https://developers.google.com/web/fundamentals/primers/promises) | ||
### Get all seasons of a specific show | ||
rt.seasons() takes a show uuid or season slug | ||
```js | ||
rt.seasons('rt-podcast') | ||
.then(seasons => { | ||
for (let season in seasons) { | ||
console.log(season.attributes.title); | ||
} | ||
}); | ||
``` | ||
### Get all episodes of a specific season | ||
rt.season() takes a season uuid or season slug | ||
```js | ||
rt.season('always-open-2018') | ||
.then(episodes => { | ||
for (let episode in episodes) { | ||
console.log(episode.attributes.title); | ||
console.log(episode.attributes.description); | ||
console.log(episode.attributes.number); | ||
} | ||
}); | ||
``` | ||
# In progress.. More coming soon! |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39537
46