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 +4 -4
- data/README.md +18 -1
- data/lib/async/rest.rb +0 -1
- data/lib/async/rest/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: a22ad3fd143a7cbe87a92c2653ab5c5aa5ed88fc2f3aba5154d1e2f6c365f7b6
|
4
|
+
data.tar.gz: e89ffc8cd141a113ef605e6857288cf266fd2867e32eee179212c642c31d8dab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/lib/async/rest/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http
|