paxful_client 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +4 -6
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +33 -3
- data/README.md +11 -5
- data/lib/paxful_client.rb +4 -0
- data/lib/paxful_client/requests/base_request.rb +2 -2
- data/lib/paxful_client/schemas/base_request_schema.rb +8 -0
- data/lib/paxful_client/schemas/get_balance_request_schema.rb +3 -0
- data/lib/paxful_client/schemas/get_completed_trades_request_schema.rb +3 -0
- data/lib/paxful_client/version.rb +1 -1
- data/paxful_client.gemspec +1 -0
- metadata +20 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66e7dd2c722899ff116712986c06f49dc4890323f20c83357584974c2d15f258
|
4
|
+
data.tar.gz: d1d24de558f4183569d63e930763cb126ba9b573214460ac519969e02f734945
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7c58c18354557383e81f69221ce6a64fe342b36a3637aa9914afd2ce806805189bc491113a3776e10de7cb8432fcae5dfd3e809515340ad7eccaf4c98ec7fcc
|
7
|
+
data.tar.gz: 9293af9c62f8a7b2195398e9b7210aa55475d7a3766a6c5b773ffbc1f7be6fc2eff32e659103f094651c5086821ca059da3aa7db81eabf55b8c38a9012f28976
|
data/.github/workflows/ruby.yml
CHANGED
@@ -20,14 +20,12 @@ jobs:
|
|
20
20
|
|
21
21
|
steps:
|
22
22
|
- uses: actions/checkout@v2
|
23
|
-
-
|
24
|
-
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
25
|
-
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
26
|
-
# uses: ruby/setup-ruby@v1
|
27
|
-
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
23
|
+
- uses: actions/setup-ruby@v1
|
28
24
|
with:
|
29
|
-
ruby-version: 2.
|
25
|
+
ruby-version: '2.7'
|
30
26
|
- name: Install dependencies
|
31
27
|
run: bundle install
|
28
|
+
- name: Copy config.yml
|
29
|
+
run: cp spec/config.yml{.sample,}
|
32
30
|
- name: Run tests
|
33
31
|
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [1.0.0] - 2020-11-19
|
8
|
+
### Added
|
9
|
+
- Ensure that `key` and `secret` are present; raise exception otherwise
|
10
|
+
|
7
11
|
## [0.3.0] - 2020-10-12
|
8
12
|
### Added
|
9
13
|
- add `trade/completed` endpoint
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
paxful_client (0.
|
4
|
+
paxful_client (1.0.0)
|
5
5
|
activesupport
|
6
6
|
api_client_base
|
7
|
+
dry-validation (~> 0.13)
|
7
8
|
typhoeus
|
8
9
|
|
9
10
|
GEM
|
@@ -34,6 +35,35 @@ GEM
|
|
34
35
|
descendants_tracker (0.0.4)
|
35
36
|
thread_safe (~> 0.3, >= 0.3.1)
|
36
37
|
diff-lcs (1.4.4)
|
38
|
+
dry-configurable (0.11.6)
|
39
|
+
concurrent-ruby (~> 1.0)
|
40
|
+
dry-core (~> 0.4, >= 0.4.7)
|
41
|
+
dry-equalizer (~> 0.2)
|
42
|
+
dry-container (0.7.2)
|
43
|
+
concurrent-ruby (~> 1.0)
|
44
|
+
dry-configurable (~> 0.1, >= 0.1.3)
|
45
|
+
dry-core (0.4.9)
|
46
|
+
concurrent-ruby (~> 1.0)
|
47
|
+
dry-equalizer (0.3.0)
|
48
|
+
dry-inflector (0.2.0)
|
49
|
+
dry-logic (0.6.1)
|
50
|
+
concurrent-ruby (~> 1.0)
|
51
|
+
dry-core (~> 0.2)
|
52
|
+
dry-equalizer (~> 0.2)
|
53
|
+
dry-types (0.14.1)
|
54
|
+
concurrent-ruby (~> 1.0)
|
55
|
+
dry-container (~> 0.3)
|
56
|
+
dry-core (~> 0.4, >= 0.4.4)
|
57
|
+
dry-equalizer (~> 0.2)
|
58
|
+
dry-inflector (~> 0.1, >= 0.1.2)
|
59
|
+
dry-logic (~> 0.5, >= 0.5)
|
60
|
+
dry-validation (0.13.3)
|
61
|
+
concurrent-ruby (~> 1.0)
|
62
|
+
dry-configurable (~> 0.1, >= 0.1.3)
|
63
|
+
dry-core (~> 0.2, >= 0.2.1)
|
64
|
+
dry-equalizer (~> 0.2)
|
65
|
+
dry-logic (~> 0.5, >= 0.5.0)
|
66
|
+
dry-types (~> 0.14.0)
|
37
67
|
equalizer (0.0.11)
|
38
68
|
ethon (0.12.0)
|
39
69
|
ffi (>= 1.3.0)
|
@@ -67,7 +97,7 @@ GEM
|
|
67
97
|
thread_safe (0.3.6)
|
68
98
|
typhoeus (1.4.0)
|
69
99
|
ethon (>= 0.9.0)
|
70
|
-
tzinfo (1.2.
|
100
|
+
tzinfo (1.2.8)
|
71
101
|
thread_safe (~> 0.1)
|
72
102
|
vcr (3.0.3)
|
73
103
|
virtus (1.0.5)
|
@@ -79,7 +109,7 @@ GEM
|
|
79
109
|
addressable (>= 2.3.6)
|
80
110
|
crack (>= 0.3.2)
|
81
111
|
hashdiff
|
82
|
-
zeitwerk (2.4.
|
112
|
+
zeitwerk (2.4.1)
|
83
113
|
|
84
114
|
PLATFORMS
|
85
115
|
ruby
|
data/README.md
CHANGED
@@ -22,18 +22,24 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
```ruby
|
24
24
|
client = PaxfulClient.new(host: "host", key: "key", secret: "secret")
|
25
|
+
|
26
|
+
# Get balance
|
25
27
|
response = client.get_balance
|
26
28
|
wallet = response.wallet
|
27
|
-
|
28
|
-
# get the balance
|
29
29
|
wallet.balance
|
30
|
+
|
31
|
+
# Get completed trades
|
32
|
+
response = client.get_completed_trades
|
33
|
+
order_book = response.order_book
|
34
|
+
order_book.trades
|
30
35
|
```
|
31
36
|
|
32
37
|
## Development
|
33
38
|
|
34
|
-
|
35
|
-
|
36
|
-
|
39
|
+
```
|
40
|
+
cp spec/config.yml{.sample,}
|
41
|
+
rspec
|
42
|
+
```
|
37
43
|
|
38
44
|
## Contributing
|
39
45
|
|
data/lib/paxful_client.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require "paxful_client/version"
|
2
2
|
require "api_client_base"
|
3
|
+
require "dry-validation"
|
3
4
|
|
4
5
|
require "json"
|
5
6
|
require "active_support/core_ext/hash/indifferent_access"
|
@@ -15,6 +16,9 @@ require "paxful_client/requests/get_completed_trades_request"
|
|
15
16
|
require "paxful_client/responses/base_response"
|
16
17
|
require "paxful_client/responses/get_balance_response"
|
17
18
|
require "paxful_client/responses/get_completed_trades_response"
|
19
|
+
require "paxful_client/schemas/base_request_schema"
|
20
|
+
require "paxful_client/schemas/get_balance_request_schema"
|
21
|
+
require "paxful_client/schemas/get_completed_trades_request_schema"
|
18
22
|
|
19
23
|
module PaxfulClient
|
20
24
|
include APIClientBase::Base.module
|
data/paxful_client.gemspec
CHANGED
@@ -28,6 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_dependency "api_client_base"
|
29
29
|
spec.add_dependency "typhoeus"
|
30
30
|
spec.add_dependency "activesupport"
|
31
|
+
spec.add_dependency "dry-validation", "~> 0.13"
|
31
32
|
|
32
33
|
spec.add_development_dependency "pry"
|
33
34
|
spec.add_development_dependency "vcr", "~> 3.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paxful_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Chavez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: api_client_base
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: dry-validation
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.13'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.13'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: pry
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -124,6 +138,9 @@ files:
|
|
124
138
|
- lib/paxful_client/responses/base_response.rb
|
125
139
|
- lib/paxful_client/responses/get_balance_response.rb
|
126
140
|
- lib/paxful_client/responses/get_completed_trades_response.rb
|
141
|
+
- lib/paxful_client/schemas/base_request_schema.rb
|
142
|
+
- lib/paxful_client/schemas/get_balance_request_schema.rb
|
143
|
+
- lib/paxful_client/schemas/get_completed_trades_request_schema.rb
|
127
144
|
- lib/paxful_client/version.rb
|
128
145
|
- paxful_client.gemspec
|
129
146
|
homepage: https://github.com/MarkFChavez/paxful_client-ruby
|
@@ -148,8 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
165
|
- !ruby/object:Gem::Version
|
149
166
|
version: '0'
|
150
167
|
requirements: []
|
151
|
-
|
152
|
-
rubygems_version: 2.7.6
|
168
|
+
rubygems_version: 3.0.8
|
153
169
|
signing_key:
|
154
170
|
specification_version: 4
|
155
171
|
summary: API wrapper for Paxful
|