igdb2 0.8.0 → 0.8.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/lib/igdb/models/api_resource.rb +16 -25
- data/lib/igdb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3ac7c5fecdedab89a8d6a7f9e8f669eeec539fcf6b21d27265fa99b674f896b
|
4
|
+
data.tar.gz: 4ce83900cc09f6201f59bf718a7bbcb148aeb999d9a91a88c106feff5d6221a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b20b6784ed636c7ec3a9ba258e74a1e1b1c28449e85ad9cbb6a71d7fc3775e0f5d4f5b79a2e9ef7d01f8f7995723fee52c36f8ed580333744adc84e4a3d66152
|
7
|
+
data.tar.gz: b7d3eb0dbb84d07d002e8a612641a0d1fc329bf642d404e6c02b2e5a4cd9c18b9d967f07eca1c3c280c4d59cff67c444d1c76e3d6dfbd60aac511eca08cae058
|
@@ -14,43 +14,34 @@ module Igdb
|
|
14
14
|
Igdb::Requester.get("#{path}/meta")
|
15
15
|
end
|
16
16
|
|
17
|
-
def find(id,
|
18
|
-
|
19
|
-
params[:fields] = '*' unless params[:fields]
|
17
|
+
def find(id, **kwargs)
|
18
|
+
kwargs[:fields] = kwargs[:fields] || '*'
|
20
19
|
|
21
20
|
if id.class == Array
|
22
|
-
build_collection(Igdb::Requester.get("#{path}/#{id.join(',')}",
|
21
|
+
build_collection(Igdb::Requester.get("#{path}/#{id.join(',')}", kwargs), representer)
|
23
22
|
else
|
24
|
-
build_single_resource(Igdb::Requester.get("#{path}/#{id}",
|
23
|
+
build_single_resource(Igdb::Requester.get("#{path}/#{id}", kwargs)[0], representer)
|
25
24
|
end
|
26
25
|
end
|
27
26
|
|
28
|
-
def slug(id,
|
29
|
-
|
30
|
-
|
31
|
-
params['filter[slug][eq]'] = id
|
27
|
+
def slug(id, **kwargs)
|
28
|
+
kwargs[:fields] = kwargs[:fields] || '*'
|
29
|
+
kwargs[:'filter[slug][eq]'] = id
|
32
30
|
|
33
|
-
build_single_resource(Igdb::Requester.get("#{path}/",
|
31
|
+
build_single_resource(Igdb::Requester.get("#{path}/", kwargs)[0], representer)
|
34
32
|
end
|
35
33
|
|
36
|
-
def search(
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
hash['fields'] = '*'
|
41
|
-
end
|
34
|
+
def search(**kwargs)
|
35
|
+
kwargs[:offset] = kwargs[:offset] || 0
|
36
|
+
kwargs[:limit] = kwargs[:limit] || 50
|
37
|
+
kwargs[:fields] = kwargs[:fields] || '*'
|
42
38
|
|
43
|
-
build_collection(Igdb::Requester.get("#{path}/",
|
39
|
+
build_collection(Igdb::Requester.get("#{path}/", kwargs), representer)
|
44
40
|
end
|
45
41
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
hash['limit'] = opts[:limit] || 50
|
50
|
-
hash['fields'] = '*'
|
51
|
-
end
|
52
|
-
|
53
|
-
build_collection(Igdb::Requester.get("#{path}/", opts), representer)
|
42
|
+
# Alias for #search
|
43
|
+
def all(**kwargs)
|
44
|
+
search(kwargs)
|
54
45
|
end
|
55
46
|
|
56
47
|
private
|
data/lib/igdb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: igdb2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kalyn Robinson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|