t411 0.0.3 → 0.0.4
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/lib/t411/torrents.rb +5 -12
- data/lib/t411/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bf86e54528a1bc67ef08542b86d6812632ac91ff
|
|
4
|
+
data.tar.gz: 7a0d798a575eb467c74c1be400ade8ffbdf6817e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 47940e18813603eacbe3c760569a63de3e216454ed78599f390f9aa81748104bc36e6b6e15d92a1afbf720ad1d2a14d532434aa5d1aca2f913da0fc537c966e4
|
|
7
|
+
data.tar.gz: 13bf4117b713043b39289dd2376128b0085a81de1df1f33407f4f3e39c46cdd9455d1c2dca1f6c0efc298af5c224c985cd97a84ea06c14c535627b98fa9b6db7
|
data/lib/t411/torrents.rb
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
module T411
|
|
2
2
|
module Torrents
|
|
3
3
|
extend self
|
|
4
|
-
def self.categories
|
|
5
|
-
T411::Api.request_data(URI.parse($t411_base_url + '/categories/tree'))
|
|
6
|
-
end
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
T411::Api.request_data(URI.parse($t411_base_url +
|
|
5
|
+
%w(categories terms).each do |request|
|
|
6
|
+
define_method(:"#{request}") {T411::Api.request_data(URI.parse($t411_base_url + "/#{request}/tree"))}
|
|
10
7
|
end
|
|
11
8
|
|
|
12
9
|
def self.search(query, limit = 100)
|
|
@@ -39,15 +36,11 @@ module T411
|
|
|
39
36
|
T411::Api.request_data(URI.parse($t411_base_url + '/torrents/top/100'))
|
|
40
37
|
end
|
|
41
38
|
|
|
42
|
-
|
|
43
|
-
T411::Api.request_data(URI.parse($t411_base_url +
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def self.month
|
|
47
|
-
T411::Api.request_data(URI.parse($t411_base_url + '/torrents/top/month'))
|
|
39
|
+
%w(today month).each do |request|
|
|
40
|
+
define_method(:"#{request}") {T411::Api.request_data(URI.parse($t411_base_url + "/torrents/top/#{request}"))}
|
|
48
41
|
end
|
|
49
|
-
|
|
50
42
|
end
|
|
51
43
|
end
|
|
52
44
|
|
|
53
45
|
|
|
46
|
+
|
data/lib/t411/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: t411
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Christophe Augello
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-03-
|
|
11
|
+
date: 2014-03-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|