Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 81 lines (65 sloc) 2.271 kb
995e9af @hakovala Added Travis build image
authored
1 node-trakt [![Build Status](https://travis-ci.org/hakovala/node-trakt.png?branch=master)](https://travis-ci.org/hakovala/node-trakt)
25cf0b5 @hakovala README.md update
authored
2 =====
3
8ee0765 @hakovala Finalizing package.
authored
4 NodeJS wrapper module for Trakt.tv API.
25cf0b5 @hakovala README.md update
authored
5
05ecd0d @hakovala Help update
authored
6 > This is a early development version. So, expect it to change and have many bugs..
f567c4f @hakovala README.md updated
authored
7
31ddcc5 @hakovala License added
authored
8 ## Install
a0cdcd9 @hakovala Update README.md
authored
9 npm install trakt
25cf0b5 @hakovala README.md update
authored
10
31ddcc5 @hakovala License added
authored
11 ## Usage example
f567c4f @hakovala README.md updated
authored
12 var Trakt = require('trakt');
13 var trakt = new Trakt({username: 'username', password: 'password'});
14
15 var options = { query: 'american dad' }
25cf0b5 @hakovala README.md update
authored
16
f567c4f @hakovala README.md updated
authored
17 // Search 'american dad' from Trakt
18 trakt.request('search', 'shows', options, function(err, result) {
19 if (err) {
20 console.log(err);
21 if (result) {
22 console.log(result);
23 }
24 } else {
25 console.log(result);
26 }
27 })
25cf0b5 @hakovala README.md update
authored
28
f567c4f @hakovala README.md updated
authored
29 // Test account authentication
30 trakt.request('account', 'test', {}, function(err, result) {
31 if (err) {
32 console.log(err);
33 if (result) {
34 console.log(result);
35 }
36 } else {
37 console.log(result);
38 }
39 })
25cf0b5 @hakovala README.md update
authored
40
31ddcc5 @hakovala License added
authored
41 ## CLI Usage
05ecd0d @hakovala Help update
authored
42 trakt search shows --query 'american dad'
43 trakt account test -u username -p password
f567c4f @hakovala README.md updated
authored
44
31ddcc5 @hakovala License added
authored
45 ## TODO List
c7b239d @hakovala Update README.md
authored
46 - **Base**
47 - Add events to some situations
31ddcc5 @hakovala License added
authored
48 - Refactor request functions
c7b239d @hakovala Update README.md
authored
49 - Make helper functions for api calls
f567c4f @hakovala README.md updated
authored
50 - **Api Actions**
51 - Add missing parameters
c7b239d @hakovala Update README.md
authored
52 - Add missing dev parameters
53 - Handle show title as it can be many things
a0cdcd9 @hakovala Update README.md
authored
54 - ~~Check parameter if it needs authentication (needed only for GET)~~
c7b239d @hakovala Update README.md
authored
55 - Allow objects and lists as parameters
56 - Check parameter value validity
57 - Check for supplementary parameters (how?)
58 - Check for optional parameters that are marked as mandatory in the api
f567c4f @hakovala README.md updated
authored
59 - **Cli**
a0cdcd9 @hakovala Update README.md
authored
60 - ~~Redesign cli arguments~~
61 - ~~Add usefull usage and help printout~~
31ddcc5 @hakovala License added
authored
62 - **Tests**
63 - Implement them
f567c4f @hakovala README.md updated
authored
64
31ddcc5 @hakovala License added
authored
65 ## Copyright and license
f567c4f @hakovala README.md updated
authored
66
31ddcc5 @hakovala License added
authored
67 Copyright 2012 hakovala
68
69 Licensed under the Apache License, Version 2.0 (the "License");
70 you may not use this file except in compliance with the License.
71 You may obtain a copy of the License at
72
73 > [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
74
75 Unless required by applicable law or agreed to in writing, software
76 distributed under the License is distributed on an "AS IS" BASIS,
77 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
78 See the License for the specific language governing permissions and
79 limitations under the License.
f567c4f @hakovala README.md updated
authored
80
Something went wrong with that request. Please try again.