tmdby 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +96 -7
- data/lib/tmdby/version.rb +1 -1
- metadata +1 -2
- data/lib/tmdby/setup.rb +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5eafca0483e87f20c1e1b9aa113341b0dd1af224
|
|
4
|
+
data.tar.gz: ac9d6ebacf0e57523d080619a8c6ad06467eec38
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 939029eab5f1ae9728739beee76008548d0aea3d845a621f71951654200d994bb30cac37fde7db5d6bf1e4e1bc73182b96ba52c90a7d34b0e54978609deb0f68
|
|
7
|
+
data.tar.gz: 99f2c4346c9a484796678f57f34717e51848e4f6c23c2cb233cdb2bb8b65b07cedde861e8f334a91bb71390c151c94e55d94788b7cd930082d57bcc877a52651
|
data/README.md
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
**work in progress**
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
TMDBY : a Ruby wrapper for the [TMDB API](http://docs.themoviedb.apiary.io/)
|
|
4
|
+
---------------
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Features
|
|
7
|
+
--------
|
|
8
|
+
|
|
9
|
+
- Full integration of all the TMDB API
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Installation
|
|
13
|
+
------------
|
|
6
14
|
|
|
7
15
|
Add this line to your application's Gemfile:
|
|
8
16
|
|
|
@@ -18,13 +26,94 @@ Or install it yourself as:
|
|
|
18
26
|
|
|
19
27
|
$ gem install tmdby
|
|
20
28
|
|
|
21
|
-
|
|
29
|
+
How to use
|
|
30
|
+
----------
|
|
31
|
+
|
|
32
|
+
Every API is encapsulated in its own ruby class. For example, the Movie API is in lib/wrappers/movie.rb
|
|
33
|
+
|
|
34
|
+
**Configuration**
|
|
35
|
+
|
|
36
|
+
Set up your api key :
|
|
37
|
+
|
|
38
|
+
```ruby
|
|
39
|
+
Tmdby::Setup.key = "your_api_key"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
By default, every call to TMDB Api is set in insecure mode (HTTP).
|
|
43
|
+
If you want to enable HTTPS :
|
|
44
|
+
|
|
45
|
+
```ruby
|
|
46
|
+
Tmdby::Setup.secure = true
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If you want, you can set a default language value :
|
|
50
|
+
|
|
51
|
+
```ruby
|
|
52
|
+
Tmdby::Setup.default_language = "fr"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Example of use**
|
|
56
|
+
|
|
57
|
+
- Get Movie by id :
|
|
58
|
+
|
|
59
|
+
```ruby
|
|
60
|
+
Tmdby::Movies.get 550
|
|
61
|
+
```
|
|
62
|
+
- Find by IMDB id :
|
|
63
|
+
|
|
64
|
+
```ruby
|
|
65
|
+
Tmdby::Find.get "tt0266543", 'imdb_id', language:'es'
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
- Discover Movies by criterias :
|
|
69
|
+
|
|
70
|
+
```ruby
|
|
71
|
+
Tmdby::Discover.movie year: 1994, with_cast: 1269
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
You can take a look in the _tests_ directory to view a lot of examples.
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
Helpers
|
|
78
|
+
-------
|
|
79
|
+
|
|
80
|
+
_todo_
|
|
81
|
+
|
|
82
|
+
Running tests
|
|
83
|
+
-------------
|
|
84
|
+
|
|
85
|
+
First you have to enter your credentials (_API\_KEY_, _ACCOUNT\_ID_, _USERNAME_ and _PASSWORD_) in _tests/credentials.rb_
|
|
86
|
+
|
|
87
|
+
Then you can run the test suite :
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
% ruby tests/minitest_all.rb
|
|
91
|
+
|
|
92
|
+
Run options: --seed 60805
|
|
93
|
+
|
|
94
|
+
# Running:
|
|
95
|
+
|
|
96
|
+
.......................................................S...................................................................S.
|
|
97
|
+
|
|
98
|
+
Finished in 53.308930s, 2.3448 runs/s, 16.0573 assertions/s.
|
|
99
|
+
|
|
100
|
+
125 runs, 856 assertions, 0 failures, 0 errors, 2 skips
|
|
101
|
+
|
|
102
|
+
You have skipped tests. Run with --verbose for details.
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
More to come
|
|
106
|
+
------------
|
|
107
|
+
|
|
108
|
+
- callback parameter support
|
|
109
|
+
- images helpers
|
|
110
|
+
|
|
22
111
|
|
|
23
|
-
TODO: Write usage instructions here
|
|
24
112
|
|
|
25
|
-
|
|
113
|
+
Contributing
|
|
114
|
+
------------
|
|
26
115
|
|
|
27
|
-
1. Fork it ( https://github.com/
|
|
116
|
+
1. Fork it ( https://github.com/a-legrand/tmdby/fork )
|
|
28
117
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
29
118
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
30
119
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/tmdby/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tmdby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aurélien Le Grand
|
|
@@ -68,7 +68,6 @@ files:
|
|
|
68
68
|
- lib/tmdby/client.rb
|
|
69
69
|
- lib/tmdby/helpers/authentication.rb
|
|
70
70
|
- lib/tmdby/response.rb
|
|
71
|
-
- lib/tmdby/setup.rb
|
|
72
71
|
- lib/tmdby/version.rb
|
|
73
72
|
- lib/tmdby/wrapper.rb
|
|
74
73
|
- lib/tmdby/wrappers/account.rb
|
data/lib/tmdby/setup.rb
DELETED
|
File without changes
|