alluc 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/alluc.rb +4 -5
- data/lib/alluc/api.rb +2 -1
- data/lib/alluc/version.rb +1 -1
- metadata +2 -3
- data/do_not_commit +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d49d3a77689f547f4a3db53c1479f191439ecf4c
|
4
|
+
data.tar.gz: 0713e4a546ac626dd45ca1e299cf2704f2c0dc73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e20bc36bbee6d148dd8a9688426d5d5af6d11f5fe11f2d949aceba3454aaa0ac885a6c2d260324901bd667eea88fe06b81f6bec26f70583d9b51e98dc8db817b
|
7
|
+
data.tar.gz: 82588c91e4ddabad7f853938913c270775cb49a81ae783b3f72ec7ab3404e27f58ce3b4b1836a4fbc516598bbbce7b710af71a41d168493957a8b5d1f7fecb06
|
data/Gemfile.lock
CHANGED
data/lib/alluc.rb
CHANGED
@@ -18,12 +18,11 @@ module Alluc
|
|
18
18
|
['stream', 'download'].each do |action|
|
19
19
|
define_singleton_method("#{action}_links") do |query, opts = {}|
|
20
20
|
params = Hash.new.tap do |hash|
|
21
|
-
hash[
|
22
|
-
hash[
|
23
|
-
hash[
|
24
|
-
hash['getmeta'] = opts[:getmeta] if opts[:getmeta] # getmeta - If you want additional info on hosterlinks and source, set this to 1. Only use if you really need it as it might make for slower queries.
|
21
|
+
hash[:count] = opts[:count] if opts[:count] # count - max-amount of returned results. Can be between 1 - 100
|
22
|
+
hash[:from] = opts[:from] if opts[:from] # from - where to start. For example if you want result 20-30, you will set count=10 and from=20
|
23
|
+
hash[:getmeta] = opts[:getmeta] if opts[:getmeta] # getmeta - If you want additional info on hosterlinks and source, set this to 1. Only use if you really need it as it might make for slower queries.
|
25
24
|
end
|
26
|
-
Alluc::Requester.get("search/#{action}", params)
|
25
|
+
Alluc::Requester.get("search/#{action}?query=#{CGI.escape(query)}", params)
|
27
26
|
end
|
28
27
|
end
|
29
28
|
|
data/lib/alluc/api.rb
CHANGED
@@ -28,7 +28,8 @@ module Alluc
|
|
28
28
|
def url_for(action, params={})
|
29
29
|
params[:apikey] = api_key if api_type == :alluc
|
30
30
|
url = URI.join(actual_url, action) # Need some base_url / mashape_url logic here
|
31
|
-
url.query
|
31
|
+
# url.query += URI.encode_www_form(params) unless params.empty?
|
32
|
+
url.query = [url.query, params.map{|k,v| "#{k}=#{v}"}].compact.join('&')
|
32
33
|
url.to_s
|
33
34
|
end
|
34
35
|
|
data/lib/alluc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alluc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ahmet Abdi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -68,7 +68,6 @@ files:
|
|
68
68
|
- alluc.gemspec
|
69
69
|
- bin/console
|
70
70
|
- bin/setup
|
71
|
-
- do_not_commit
|
72
71
|
- lib/alluc.rb
|
73
72
|
- lib/alluc/api.rb
|
74
73
|
- lib/alluc/requester.rb
|
data/do_not_commit
DELETED