rickai 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +6 -1
- data/lib/rickai/client.rb +9 -1
- data/lib/rickai/version.rb +1 -1
- data/rickai.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 292ab7b66564ccc75c4b98adaf90773d7f23acb8df15a05a181f3d56e9aae628
|
4
|
+
data.tar.gz: 0e9d2df8aee2b8d34a50cc1d85c9fdc6b7f56d9b856c2c981288e92a5e00062a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c9bb18de470aff08f40c6fd55915d3c884aef070f0683d1d40dda84e4b793387c7eb246ebc35afcce69fd245c1fdcf3790dc654a7a35731ed7266ab5d555cb7
|
7
|
+
data.tar.gz: 13d62cad122062136eca83ae76e137a81db26943b5c35af43cc78cb4184483337a7fd94fd65217a5b0e2101dc47b11106cb8e07e8440ba561490ac9a3867a5a0
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Rickai
|
2
2
|
|
3
|
-
Gem which will help you to
|
3
|
+
Gem which will help you to get integration with Rick.io the fastest way
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -36,6 +36,11 @@ For calling action of create you just can call
|
|
36
36
|
client.create(your_attributes)
|
37
37
|
```
|
38
38
|
|
39
|
+
For calling action of check you just can call
|
40
|
+
```ruby
|
41
|
+
client.check(your_attributes)
|
42
|
+
```
|
43
|
+
|
39
44
|
## Contributing
|
40
45
|
|
41
46
|
1. Fork it
|
data/lib/rickai/client.rb
CHANGED
@@ -2,7 +2,7 @@ require 'net/http'
|
|
2
2
|
require 'multi_json'
|
3
3
|
|
4
4
|
module Rickai
|
5
|
-
DEFAULT_BASE_URI = 'https://exchange.
|
5
|
+
DEFAULT_BASE_URI = 'https://exchange.rick.ai'
|
6
6
|
DEFAULT_TIMEOUT = 10
|
7
7
|
|
8
8
|
class Client
|
@@ -22,6 +22,10 @@ module Rickai
|
|
22
22
|
verify_response(request(url_create, attributes))
|
23
23
|
end
|
24
24
|
|
25
|
+
def check(attributes)
|
26
|
+
verify_response(request(url_check, attributes))
|
27
|
+
end
|
28
|
+
|
25
29
|
private
|
26
30
|
|
27
31
|
def url_create
|
@@ -32,6 +36,10 @@ module Rickai
|
|
32
36
|
"/transactions/#{@agent_url}/update"
|
33
37
|
end
|
34
38
|
|
39
|
+
def url_check
|
40
|
+
"/transactions/#{@agent_url}/check"
|
41
|
+
end
|
42
|
+
|
35
43
|
def verify_response(response)
|
36
44
|
if response.code.to_i >= 200 && response.code.to_i < 300
|
37
45
|
response
|
data/lib/rickai/version.rb
CHANGED
data/rickai.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Anton Zagorskii"]
|
10
10
|
spec.email = ["zagorskiianton@gmail.com"]
|
11
11
|
|
12
|
-
spec.summary = %q{
|
12
|
+
spec.summary = %q{Gem which will help you to get integration with Rick.io the fastest way}
|
13
13
|
spec.homepage = "https://github.com/antonzagorskii"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rickai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Zagorskii
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -122,5 +122,5 @@ rubyforge_project:
|
|
122
122
|
rubygems_version: 2.7.6
|
123
123
|
signing_key:
|
124
124
|
specification_version: 4
|
125
|
-
summary:
|
125
|
+
summary: Gem which will help you to get integration with Rick.io the fastest way
|
126
126
|
test_files: []
|