queru_btce 1.0.3 → 1.0.5

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
  SHA1:
3
- metadata.gz: 14aa6c1f57a1b80220c41112c5c46af0c44744a0
4
- data.tar.gz: e6650108a51502b73d9f48becc9877c46e1276b9
3
+ metadata.gz: cdedde9668a31846f6df9e024bba1164bfe27449
4
+ data.tar.gz: 536ccfd0077f9251963a3f13a74e0958c0200406
5
5
  SHA512:
6
- metadata.gz: 456aaacff0e206a8352d27630b84b33096f8885900f1ca96130b6c47053d2cfde7fe2f58f259e2f977e7794c532ce799087a2159e0b2a6536c096beae72ff785
7
- data.tar.gz: 0cc3289a08eb3da87627ab7172bbdcc7baf0e6d1708e3f68bc650518f3c09ce7d3b51af76ac6dfac429fe614f3ca61765f19b26c8b428122db6a86d74461ba06
6
+ metadata.gz: 2a2a4a920b254fcd494bca06177b4ee1a32d0ce5f0a0d02f6752e9ec3f2213fedc6fec06e7ef43fd0667a84fefc311624c3da3cd70c66547ac6380c95a949246
7
+ data.tar.gz: 69536e75783ad4de23c34e9c257452434b6e106abf8d8242dfd0a6933ee96fa900b54ce293ea7d9285905c020274af277625f3a31fc78b70e219f5237dab808b
data/README.md CHANGED
@@ -1,11 +1,12 @@
1
1
  # QueruBtce
2
2
 
3
- KISS _BTC-e_ API Access from Ruby.
3
+ KISS _BTC-e_ and now _wex.nz_ API Access from Ruby.
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/queru_btce.svg)](https://badge.fury.io/rb/queru_btce)
6
6
 
7
7
  ### Pros:
8
8
 
9
+ - It supports _wex.nz_, former _BTC-E_.
9
10
  - No config file and no framework dependency.
10
11
  - No weird abstractions, you can follow _BTC-e_ API specs.
11
12
  - Returns an object, keys are methods.
@@ -45,8 +46,8 @@ $ gem install queru-btce
45
46
  This gem provides class methods for all public/private API methods offered by _BTC-e_.
46
47
  Responses are objects (dot methods or hash access) and any errors are raised as exception, your program can handle it.
47
48
 
48
- - [_BTC-e_ Trade API Documentation](https://btc-e.com/api/documentation)
49
- - [_BTC-e_ Public API Documentation](https://btc-e.com/api/3/docs)
49
+ - [_BTC-e_ Trade API Documentation](https://wex.nz/api/documentation)
50
+ - [_BTC-e_ Public API Documentation](https://wex.nz/api/3/docs)
50
51
 
51
52
  In _BTC-e_ API some methods are _CamelCase_. In this gem those method must be called in _snake_case_ format. For example `TradeHistory` becomes `QueruBtce.trade_history`.
52
53
 
data/lib/queru_btce.rb CHANGED
@@ -24,7 +24,7 @@ module QueruBtce
24
24
 
25
25
  signature = OpenSSL::HMAC.hexdigest('sha512', @api_secret, payload)
26
26
 
27
- Net::HTTP.start('btc-e.com', 443, use_ssl: true) do |http|
27
+ Net::HTTP.start('wex.nz', 443, use_ssl: true) do |http|
28
28
  headers = { 'Sign': signature, 'Key': @api_key }
29
29
  response = http.post('/tapi', payload, headers).body
30
30
  JSON.parse response, object_class: OpenStruct
@@ -38,9 +38,9 @@ module QueruBtce
38
38
  def self.public_api(m, *pair)
39
39
  if pair
40
40
  pair = pair.join('-') if pair.is_a? Array
41
- JSON.parse open("https://btc-e.com/api/3/#{m}/#{pair}").read, object_class: OpenStruct
41
+ JSON.parse open("https://wex.nz/api/3/#{m}/#{pair}").read, object_class: OpenStruct
42
42
  else
43
- JSON.parse open("https://btc-e.com/api/3/#{m}").read, object_class: OpenStruct
43
+ JSON.parse open("https://wex.nz/api/3/#{m}").read, object_class: OpenStruct
44
44
  end
45
45
  rescue OpenURI::HTTPError => e
46
46
  raise "BTC-e API down? #{e}"
@@ -1,3 +1,3 @@
1
1
  module QueruBtce
2
- VERSION = '1.0.3'.freeze
2
+ VERSION = '1.0.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: queru_btce
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Queru AKA Jorge Fuertes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-16 00:00:00.000000000 Z
11
+ date: 2017-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json