yao 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fcf16d4a4921aa948f2baab99e8a5624f9e6f26d
4
- data.tar.gz: fc582b3b713a62a294ef37a2038ad3a5cee4ccd3
3
+ metadata.gz: 517b6618308b87efa43bf2b5fa2853c83a543f1d
4
+ data.tar.gz: 2dec246c29252a5a72ca61d8858095e786003465
5
5
  SHA512:
6
- metadata.gz: d96d8f256bcdddf501242a12466f69900f6a382332c92d97f9637046c62c5db551e5132f6ca3e52a49e0691e19a1e911b31fa1a7044c88f661ff1df1fc64a2cd
7
- data.tar.gz: 134ae978ae8b3d7b16f9549f6b06451c389bb6d6d7809569267729ec95130f2a9e87d9c23d43704f1e1cc21e8dc78bdb6aa12cfbdd1f3d1e0e2c50bfc828e49a
6
+ metadata.gz: 6c0933ab6497b148eccd6d665937b9356e02ace745a14cef84a34a2e9f4479b97dfb4de1abab5313358033f47f9a706019de2c15d2d5e94e395e3268ada1a1c3
7
+ data.tar.gz: 692dd164884a732865215e318f5e54e7a2eae8c9d6ef7a7c5e2984deaeb7655d163b2f637f492fee619925e49b733c0a4fe4ea6eabcc280739b022b5a038cff7
@@ -28,19 +28,19 @@ module Yao::Resources
28
28
  end
29
29
 
30
30
  # restful methods
31
- def list
32
- return_resources(GET(resources_name).body[resources_name_in_json])
31
+ def list(query={})
32
+ return_resources(GET(resources_name, query).body[resources_name_in_json])
33
33
  end
34
34
 
35
- def list_detail
36
- return_resources(GET([resources_name, "detail"].join("/")).body[resources_name_in_json])
35
+ def list_detail(query={})
36
+ return_resources(GET([resources_name, "detail"].join("/"), query).body[resources_name_in_json])
37
37
  end
38
38
 
39
- def get(id_or_permalink)
39
+ def get(id_or_permalink, query={})
40
40
  res = if id_or_permalink =~ /^https?:\/\//
41
- GET(id_or_permalink)
41
+ GET(id_or_permalink, query)
42
42
  else
43
- GET([resources_name, id_or_permalink].join("/"))
43
+ GET([resources_name, id_or_permalink].join("/"), query)
44
44
  end
45
45
  return_resource(res.body[resource_name_in_json])
46
46
  end
data/lib/yao/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yao
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yao
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uchio, KONDO