async-rest 0.7.2 → 0.7.3
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/examples/slack/clean.rb +2 -2
- data/lib/async/rest.rb +1 -1
- data/lib/async/rest/resource.rb +0 -2
- 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: 18152adb0c139c842d91c9e31114c2ec7c8f33408a0233276cb2acdc09d7f84d
|
4
|
+
data.tar.gz: b7159ec4f05af395a710b7d1d81fe5477f7e5e38f51e20dbc0a1464ede4c86cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 105602f5f11a4de0871ef6c0240b20391b748be9924a55b615f8fa15e9d8ea460be4c47368dbfc8979ab07defabd5cf76f0693cf919569a52bd25f03b584522d
|
7
|
+
data.tar.gz: 8a288f1c725899e267bff0f6b403d56289ab64582264199bd194e26f59507044dfea74838fa90adcfdb9497b8db208eb9e6abac88791a4ca89cf3f681c528992
|
data/examples/slack/clean.rb
CHANGED
@@ -9,7 +9,7 @@ def rate_limited?(response)
|
|
9
9
|
response[:error] == "ratelimited"
|
10
10
|
end
|
11
11
|
|
12
|
-
require 'async/rest
|
12
|
+
require 'async/rest'
|
13
13
|
|
14
14
|
URL = "https://slack.com/api"
|
15
15
|
TOKEN = "xoxp-your-api-token"
|
@@ -45,7 +45,7 @@ Async::REST::Resource.for(URL) do |resource|
|
|
45
45
|
response = message_delete.post
|
46
46
|
if rate_limited?(response.read)
|
47
47
|
puts "Rate limiting..."
|
48
|
-
Async::Task.current.sleep
|
48
|
+
Async::Task.current.sleep 2
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
data/lib/async/rest.rb
CHANGED
data/lib/async/rest/resource.rb
CHANGED
@@ -24,8 +24,6 @@ require 'async/http/accept_encoding'
|
|
24
24
|
require 'async/http/reference'
|
25
25
|
require 'async/http/url_endpoint'
|
26
26
|
|
27
|
-
require_relative 'representation'
|
28
|
-
|
29
27
|
module Async
|
30
28
|
module REST
|
31
29
|
# The key abstraction of information in REST is a resource. Any information that can be named can be a resource: a document or image, a temporal service (e.g. "today's weather in Los Angeles"), a collection of other resources, a non-virtual object (e.g. a person), and so on. In other words, any concept that might be the target of an author's hypertext reference must fit within the definition of a resource. A resource is a conceptual mapping to a set of entities, not the entity that corresponds to the mapping at any particular point in time.
|
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.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http
|