bitstamp_client 1.0.0 → 1.0.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e71eda09644388a9d26214bc9cafba34c287dd78e092a5acf13bfc124a5ef6cd
|
4
|
+
data.tar.gz: 940eb60767ad7e04e5f70ee9143ad17344b325a8307566db3e002fc1e6e3734b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3bd3720cd709b0c17bf1827ee8aed81162346e2fc2d9ed86f7e4db19ebe95fdd08fbe1c2673152beb0e1b125d44735199099b26932ebe80e848e6c9a34af2a3
|
7
|
+
data.tar.gz: a13bf80119fa7eac0f315d36f3f838eb44b7422a37607db80b98475b1b129e27c53a6a0c19b9880be3b933d623b7e452717a3173567a164142e5c19ac0f33e6c
|
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](http://keepachangelog.com/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
+
## [1.0.1] - 2019-01-07
|
8
|
+
### Fixed
|
9
|
+
- All responses are not successful when Bitstamp's response has a `status` key
|
10
|
+
|
7
11
|
## [1.0.0] - 2019-01-04
|
8
12
|
### Added
|
9
13
|
- Place market orders
|
@@ -3,6 +3,7 @@ module BitstampClient
|
|
3
3
|
|
4
4
|
include APIClientBase::Response.module
|
5
5
|
attribute :body, String, lazy: true, default: :default_body
|
6
|
+
attribute :parsed_body, Hash, lazy: true, default: :default_parsed_body
|
6
7
|
|
7
8
|
private
|
8
9
|
|
@@ -10,5 +11,13 @@ module BitstampClient
|
|
10
11
|
raw_response.body
|
11
12
|
end
|
12
13
|
|
14
|
+
def default_success
|
15
|
+
raw_response.success? && !parsed_body.has_key?("status")
|
16
|
+
end
|
17
|
+
|
18
|
+
def default_parsed_body
|
19
|
+
JSON.parse(body)
|
20
|
+
end
|
21
|
+
|
13
22
|
end
|
14
23
|
end
|
@@ -7,7 +7,6 @@ module BitstampClient
|
|
7
7
|
})
|
8
8
|
attribute :status, String, lazy: true, default: :default_status
|
9
9
|
attribute :reason, String, lazy: true, default: :default_reason
|
10
|
-
attribute :parsed_body, Hash, lazy: true, default: :default_parsed_body
|
11
10
|
|
12
11
|
private
|
13
12
|
|
@@ -23,9 +22,5 @@ module BitstampClient
|
|
23
22
|
parsed_body["reason"]
|
24
23
|
end
|
25
24
|
|
26
|
-
def default_parsed_body
|
27
|
-
JSON.parse(body)
|
28
|
-
end
|
29
|
-
|
30
25
|
end
|
31
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitstamp_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ramon Tayag
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: api_client_base
|