yobit 0.1.0 → 0.1.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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +40 -11
  3. data/lib/yobit.rb +3 -2
  4. data/lib/yobit/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d009344d1d31886363efcf153d44e0fe6b0ce48a
4
- data.tar.gz: 4a5088e2909287c452b60f57f13d5c7b7ea17c5c
3
+ metadata.gz: 4cb3e3139e805aba227f668cdac448d0aedefbd8
4
+ data.tar.gz: 17f504ca0c14d65ad2d94a1951a6fe74ea0b143b
5
5
  SHA512:
6
- metadata.gz: 0d0c2ff2e9143095173aecf08a57af0ea04ce3be6c0e11965ea98379b2fbba0ecc80602c0ea31b877515546dbf73315e50c42a4b248a936ec8977249f2ce9dce
7
- data.tar.gz: cf31462b2666ceb2d187f2c3775a0a296fe6fbb62d93f63f691ee8f5f29a579f60ac9d040375a9422efebe4e7d64a130630151620fd3d410f3113fc59f789359
6
+ metadata.gz: e9dff2b750de42945a76ed3c11e3c66e04d4b0b2f51fc070b209c8dbbcf9b59263a4dafd7994b631d1ca88e17d1d7ceac86e698481c0fd01cf3cb6ed2bfef603
7
+ data.tar.gz: 2ac0c8b8502dcf54e0e62cb6e50d16d07be870bd622a62f116490829b75312dc93c98618c87cd245a5595ef32f911bf65b2278ed59dc55f54201b522e9b90118
data/README.md CHANGED
@@ -1,16 +1,15 @@
1
1
  # Yobit
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/yobit`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ I currently do not have a yobit.net account or api key (registration is currently disabled, so I cannot test any of the authenticated calls...
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ [![Gem Version](https://badge.fury.io/rb/yobit.png)](https://badge.fury.io/rb/yobit.png)
6
6
 
7
+ This gem provides a wrapper for the yobit.net api: [yobit.net](https://yobit.net/en/api)
7
8
  ## Installation
8
9
 
9
10
  Add this line to your application's Gemfile:
10
11
 
11
- ```ruby
12
- gem 'yobit'
13
- ```
12
+ gem 'yobit'
14
13
 
15
14
  And then execute:
16
15
 
@@ -22,15 +21,45 @@ Or install it yourself as:
22
21
 
23
22
  ## Usage
24
23
 
25
- TODO: Write usage instructions here
24
+ Setup your api key:
26
25
 
27
- ## Development
26
+ ```
27
+ Yobit.setup do | config |
28
+ config.key = 'my api key'
29
+ config.secret = 'my api secret'
30
+ end
31
+ ```
28
32
 
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
33
+ There is a class method for each api call, use underscores instead of camelcase.
30
34
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
35
+ ```
36
+ Yobit.ticker
37
+ Yobit.get_info
38
+ ```
32
39
 
33
- ## Contributing
40
+ Full list of supported methods, see [yobit](https://yobit.net/en/api) for usage.
34
41
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/yobit. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
42
+ ```
43
+ info
44
+ ticker
45
+ depth
46
+ trades
47
+ get_info
48
+ trade
49
+ active_orders
50
+ order_info
51
+ cancel_order
52
+ trad_history
53
+ get_deposit_address
54
+ withdraw_coins_to_address
55
+ ```
56
+
57
+
58
+
59
+ ## Contributing
36
60
 
61
+ 1. Fork it
62
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
63
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
64
+ 4. Push to the branch (`git push origin my-new-feature`)
65
+ 5. Create new Pull Request
@@ -11,7 +11,8 @@ module Yobit
11
11
  attr_accessor :key
12
12
 
13
13
  def initialize
14
- @key = ''
14
+ @key = ''
15
+ @secret = ''
15
16
  end
16
17
  end
17
18
 
@@ -111,7 +112,7 @@ module Yobit
111
112
 
112
113
  def self.create_sign(data)
113
114
  encoded_data = Addressable::URI.form_encode(data)
114
- OpenSSL::HMAC.hexdigest('sha512', config.key, encoded_data)
115
+ OpenSSL::HMAC.hexdigest('sha512', config.secret, encoded_data)
115
116
  end
116
117
 
117
118
  end
@@ -1,3 +1,3 @@
1
1
  module Yobit
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yobit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Fox