lionshare 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -3
- data/lib/lionshare.rb +3 -1
- data/lib/lionshare/settings.rb +7 -0
- data/lib/lionshare/version.rb +1 -1
- data/lib/lionshare/wrapper/base.rb +1 -3
- data/lionshare.gemspec +1 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cedc9f5a30ea54c0f8c2765cdf0413fefa581b1
|
4
|
+
data.tar.gz: 4d47902fff84f021d34ee27374b60f2d4f07ded8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a18a873e98eaefc85a315f97093894256ee60d2104e5daa56ebba2bb55830573c8eb74228005ed1c9a6fcb8ab76009203c8465eac5eb182a31cedd3512c4cea9
|
7
|
+
data.tar.gz: 46be2e45677c88f58595cb163c7fc0cd3e9c093ee960f741a267ffa45234ed1daa65c6500c2bfd7ad8315b84f68209849313eb651b4d181c4729ecd76a68e595
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Lionshare
|
2
2
|
|
3
|
-
A Ruby interface to the Lionshare API.
|
3
|
+
A Ruby interface to the [Lionshare](https://github.com/lionsharecapital/lionshare-api) API.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -26,6 +26,19 @@ Initialize client:
|
|
26
26
|
client = Lionshare::Client.new
|
27
27
|
```
|
28
28
|
|
29
|
+
### Configuration
|
30
|
+
|
31
|
+
By default, requests are sent to `https://api.lionshare.capital/api`
|
32
|
+
|
33
|
+
You can change url to your own instance
|
34
|
+
|
35
|
+
`config/initializers/lionshare.rb`
|
36
|
+
```ruby
|
37
|
+
Lionshare::Settings.configure do |config|
|
38
|
+
config.api_url = 'https://exchange.domain.com/api'
|
39
|
+
end
|
40
|
+
```
|
41
|
+
|
29
42
|
### Prices
|
30
43
|
|
31
44
|
```ruby
|
@@ -62,12 +75,12 @@ client.markets.get(period: :hour)
|
|
62
75
|
Response:
|
63
76
|
|
64
77
|
```ruby
|
65
|
-
{"data"=>{"BTC"=>28317131524, "ETH"=>8372895792
|
78
|
+
{"data"=>{"BTC"=>28317131524, "ETH"=>8372895792, "XRP"=>6477081639, "LTC"=>1562510222, "XEM"=>1104930000, "DASH"=>704585094, "ETC"=>606619545, "XMR"=>417501622}}
|
66
79
|
```
|
67
80
|
|
68
81
|
## Contributing
|
69
82
|
|
70
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
83
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/kirillshevch/lionshare.
|
71
84
|
|
72
85
|
## License
|
73
86
|
|
data/lib/lionshare.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
+
require 'http'
|
2
|
+
require 'dry-configurable'
|
1
3
|
require 'lionshare/version'
|
2
4
|
require 'lionshare/client'
|
5
|
+
require 'lionshare/settings'
|
3
6
|
require 'lionshare/wrapper/base'
|
4
7
|
require 'lionshare/wrapper/markets'
|
5
8
|
require 'lionshare/wrapper/prices'
|
6
|
-
require 'http'
|
7
9
|
|
8
10
|
module Lionshare
|
9
11
|
end
|
data/lib/lionshare/version.rb
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
module Lionshare
|
2
2
|
module Wrapper
|
3
3
|
class Base
|
4
|
-
API_URL = 'https://api.lionshare.capital/api'.freeze
|
5
|
-
|
6
4
|
def initialize
|
7
|
-
@root_url =
|
5
|
+
@root_url = Settings.config.api_url + prefix
|
8
6
|
@client = HTTP::Client.new(headers: {
|
9
7
|
'Accept': 'application/json',
|
10
8
|
'Content-Type': 'application/json'
|
data/lionshare.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lionshare
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kirill Shevchenko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05
|
11
|
+
date: 2017-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: dry-configurable
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.7'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.7'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,6 +153,7 @@ files:
|
|
139
153
|
- circle.yml
|
140
154
|
- lib/lionshare.rb
|
141
155
|
- lib/lionshare/client.rb
|
156
|
+
- lib/lionshare/settings.rb
|
142
157
|
- lib/lionshare/version.rb
|
143
158
|
- lib/lionshare/wrapper/base.rb
|
144
159
|
- lib/lionshare/wrapper/markets.rb
|