rt-sdk
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 root of your project. (This will addrt-sdk
to yourpackage.json
)
// Import the rt-sdkconst rt = ;
- Use one of the available methods listed below to start building!
- Remember that all
rt-sdk
methods return a Promise() - Also remember that the
options
object isn't required... its.. optional.
Define your options
The options
object is a way of customizing your request to the rt-sdk
. It isn't required, but setting options
can be pretty helpful if you want to organize the results before the Promise resolves. You can use it to set maximum page item limits, organize items by oldest to newest, request a specific page of the results, etc. (If you aren't using any options, don't bother passing it to the method.)
const options = order: 'desc' per_page: '10' page: 1
Get all series
rt.series() only takes the optional options
obj.
rt ;
Get all seasons of a specific series
rt.seasons() takes a series slug (and options
).
rt ;
Get all episodes of a specific season
rt.season() takes a season slug (and options
).
rt ;
Get a specific episode
rt.episode() takes an episode slug (and options
).
rt ;
Get all products of a specific series
rt.products() takes a series slug (and options
). If there isn't a specific product collection associated with the series it will return generic products.
rt ;
Get all upcoming (or in progress) livestreams
rt.livestream() only takes the optional options
obj.
rt ;
Search Episodes
rt.searchEpisodes() takes an episode query string (and options
).
rt ;
In progress.. More coming soon!
- Tests to make sure I don't deploy and break yer shit
- TypeScript Typings
- Options Obj (order, per_page, page)
- Featured Products
- Scope options
- Schedule
- All Channels
- All Series in a Channel
- All Episodes in a Channel
- Featured Items in a Channel
- Featured Products in a Channel
- Show Episodes by Bulk
- Related Series
- Season Images
- Episode Images
- Episode Videos
- Query by Series
- List of all Genres
- Bonus Features?
- Marketing Banners..? ¯_(ツ)_/¯