ant-pool-api 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +70 -0
  3. data/lib/ant.rb +1 -1
  4. data/lib/ant/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a28dc61064fbfa1ab6254bb60d5524f6f5eee7ec
4
- data.tar.gz: bea0aed629bee007e811e32409235b82b103b5d6
3
+ metadata.gz: 9749a1cbd3429ef71ebfb98b577d18a3b6ab9c82
4
+ data.tar.gz: 8856981345eae9821ca165f57680ad3058c05b37
5
5
  SHA512:
6
- metadata.gz: 3151f957f5187f1934bf0005a96908ebaf60dd4394768275b2d400fa601ea2d8c0ac2a36a180ccb8667026a1d9497e205685a80f3c102d133b221a5ef9d4da94
7
- data.tar.gz: 2a934b92b173d79aeac8dd1069c33a472e964abcee702f7e5fe6e55925caf38fd05beb6842c99d726157aa537e27f7e3dcfb0dcd7e79649958fea6c5e85ad64f
6
+ metadata.gz: 736ec82941124af400208cc25c8d4c21fd4f48e7421eee9072314a5e1c72cdb8e2b2dcf70e7fcf104e8703a36e8bd3fff9289ed6838dff17ab178dfe7e6833a5
7
+ data.tar.gz: 79cdcb0622f438c32117a1364d0d8f6bc5bbeb70d3947816d9f342eee776c90890de633c8f508700e018b02f81ce4d9f89cf43c088796a663a38eee8845ccc6f
data/README.md CHANGED
@@ -0,0 +1,70 @@
1
+ antpool
2
+ =======
3
+
4
+ ANT-POOL API integration. Ruby gem.
5
+
6
+ Installation
7
+ ------------
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```
12
+ gem 'ant-pool-api', :require => 'ant'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ ```
18
+ $ bundle
19
+ ```
20
+
21
+ Usage
22
+ -----
23
+
24
+ ##How to use?
25
+
26
+ ###1. Create your ruby project
27
+
28
+ ###2. Add "require 'ant'"
29
+
30
+ ###3. Create class
31
+
32
+ ```ruby
33
+ api = Ant::API.new(username, api_key, api_secret)
34
+ ```
35
+
36
+ ```
37
+ username - your username on ant-pool
38
+ api_key - your API key
39
+ api_secret - your API secret code
40
+ ```
41
+
42
+ ####c) Full API documentation: https://119.9.76.150/apiGuild.htm
43
+
44
+ ###4. Examples
45
+
46
+ ####Connect and get balance:
47
+
48
+ ```ruby
49
+ # -*- encoding : utf-8 -*-
50
+ require 'rubygems'
51
+ require 'ant'
52
+
53
+ api = Ant::API.new(username, api_key, api_secret)
54
+ puts api.account
55
+
56
+ ```
57
+
58
+ ```json
59
+ {"code":0, "message":"ok", "data":{"earn24Hours":"0.00000000", "earnTotal":"0.00000000", "paidOut":"0.00000000", "balance":"0.00000000"}}
60
+ ```
61
+
62
+ ####Get Hashrate:
63
+
64
+ ```ruby
65
+ puts api.hashrate
66
+ ```
67
+
68
+ ```json
69
+ {"code":0, "message":"ok", "data":{"last5m":"0", "last15m":"0", "last1h":"0", "last1d":"0", "prev5m":"0", "prev15m":"0", "prev1h":"0", "prev1d":"0", "accepted":"0", "stale":"0", "dupelicate":"0", "other":"0"}}
70
+ ```
data/lib/ant.rb CHANGED
@@ -20,7 +20,7 @@ module Ant
20
20
  end
21
21
 
22
22
  def api_call(method, param = {}, priv = false, is_json = true)
23
- url = "https://119.9.76.150/api/#{ method }"
23
+ url = "https://www.antpool.com/api/#{ method }"
24
24
  if priv
25
25
  self.nonce
26
26
  param.merge!(:key => self.api_key, :signature => self.signature.to_s.upcase, :nonce => self.nonce_v)
@@ -1,3 +1,3 @@
1
1
  module Ant
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ant-pool-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - charls
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-11 00:00:00.000000000 Z
12
+ date: 2014-08-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler