@p.aleks/myshows-api
v0.0.29
Published
A simple API for logging into and interacting with MyShows website. Rewritten to Typescript.
Downloads
5
Readme
@p.aleks/myshows-api
Forked from @asznee7/myshows-api
Overview
Simple API wrapper for logging into and interacting with MyShows website. Rewritten to Typescript.
Supported versions
- MyShows.me API v2.0 - based on JSON-RPC 2.0 with OAuth 2.0 as authorization. In order to use this module you need to obtain OAuth AppID. If you don't have one you can request in here [email protected].
Getting started
To install run
$ yarn add @p.aleks/myshows-api
// or
$ npm install @p.aleks/myshows-api
Simple example of using generic method:
import MyShows from '@p.aleks/myshows-api';
const credentials = {
client_id: 'your_client_id',
client_secret: 'your_client_secret',
username: 'your_username',
password: 'your_password',
}
async function example() {
const myshows = new MyShows(credentials)
const user = await myshows.generic('profile.Get', {
login: 'Aikenov',
}) // profile.Get API method does not require logging in
await myshows.login() // after logging in you can use API methods that require authorization
const list = await myshows.generic('lists.Shows', {
list: 'favorites',
}) // lists.Shows API method does require logging in
console.log(user)
console.log(list)
}
example()
API Documentation
See the MyShows.me API page to start exploring documentation.