0.1.12 • Published 10 years ago

yts-client v0.1.12

Weekly downloads
6
License
BSD
Repository
github
Last release
10 years ago

yts-client

yts api for client

NPM

note

compative with yts api version 2

yts api version 2 document yts-api-v2-doc

using for synchronous yts database with other database, so almost yts api has removed because they not neccessary or work not stable

installation

# install by node package manager
npm install yts-client

usage

import yts client module

var YtsClient = require('yts-client');

create an instance of yts client

// use default yts api url
var ytsClient = new YtsClient();

// use custom yts api url
// using when yts change api url, not change api params and response
var api = {
    find: <string>,
    findById: <string>
};
var ytsClient = new YtsClient(api);

find item by selector

var selector = {
    pageIndex: <number>, // [1, 50]
    pageSize: <number> ,
    quality: <string>, // 720p, 1080p, 3D
    rating_min: <number>, // [0, 9]
    term: <string>, // match with name, actorm director
    genre: <string>,
    sort_by: <string>,
    order_by: <string>, // desc, asc
};
ytsClient.find(selector, function(error, items) {});

find item by identity

var id = <number>;
ytsClient.findById(id, function(error, item) {});

count number of item match with selector

var selector = {}; // same as find item by selector
ytsClient.size(selector, function(error, size) {});

next api

all api is stable, no big change will apply

development

# clone from github.com
# require ssh-key, please contact with owner to get one
git clone git@github.com:thelordofthetimes/yts-client.git
cd yts-client

# install dependency modules
npm install

# run test
npm test

# write code and more...

# update revision system control
git add .
git commit -am '<message>' 
git push
0.1.12

10 years ago

0.1.11

10 years ago

0.1.10

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago