async-rest 0.5.1 → 0.5.2

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
  SHA256:
3
- metadata.gz: 548f923968025491a47661619f728208c7c319dc33b03fac48d8a4d28be69ce8
4
- data.tar.gz: 31da938bb7b4aae9e51d16b2ef81c3877b77e3ec2e69b3c006e405446b922f80
3
+ metadata.gz: a22ad3fd143a7cbe87a92c2653ab5c5aa5ed88fc2f3aba5154d1e2f6c365f7b6
4
+ data.tar.gz: e89ffc8cd141a113ef605e6857288cf266fd2867e32eee179212c642c31d8dab
5
5
  SHA512:
6
- metadata.gz: 0c71a771cdd839421f9de1e242710ce03b101d8339a2154536e667eb332965e7937da61405bea3152de1cbb5571b3aebe53043e68a62cd04d169408cbf4f1608
7
- data.tar.gz: c3ac3800a1a4c86cda32fc5076c81075947070dbb90f986f026b031fa83bb7b794d6845c3884fef5412f1233f39085395b78f060d771a69b6b72985a7edde155
6
+ metadata.gz: 86b0c063038301619aacb0923a2ce50f5876c39ce5473e2109e22d19a3b8e6887090632c40e9d7f54c36869cc1a4a3fa0b26b779e4d0f135a81e58f8c805c2a6
7
+ data.tar.gz: 9b97aa0f0efc50931ed535bf64eac34f43f7b380bbe916a404c2effc1409f2847d6907f3449949b9478b25c8f2184876463e44cf13ea8f376961dc5f00a15336
data/README.md CHANGED
@@ -28,7 +28,24 @@ Or install it yourself as:
28
28
 
29
29
  ## Usage
30
30
 
31
- ...
31
+ ### GET a remote resource
32
+
33
+ ```ruby
34
+ require 'async'
35
+ require 'async/rest/resource'
36
+
37
+ API_URL = "https://reqres.in/api"
38
+
39
+ Async.run do
40
+ api = Async::REST::Resource.for(API_URL)
41
+
42
+ response = api.with(path: "users").get(page: 2)
43
+
44
+ pp response.read
45
+
46
+ api.close
47
+ end
48
+ ```
32
49
 
33
50
  ## Contributing
34
51
 
data/lib/async/rest.rb CHANGED
@@ -19,5 +19,4 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  require_relative 'rest/version'
22
- require_relative 'rest/reference'
23
22
  require_relative 'rest/resource'
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module REST
23
- VERSION = "0.5.1"
23
+ VERSION = "0.5.2"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-31 00:00:00.000000000 Z
11
+ date: 2018-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-http