shapeshiftio 0.0.1 → 0.0.2

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: d8521419ac9cc63ddc3966299a099a8b224e97ac
4
- data.tar.gz: 0e9cb73787dac20e96e55a7943dcaea502e23712
3
+ metadata.gz: 7b62b2c2299505f6afc19972515c0815ae04a575
4
+ data.tar.gz: 8f16403ea3b4014c420fe1e114f5235f80a412af
5
5
  SHA512:
6
- metadata.gz: d166c033b47a05ed8e0baaba6ffc8eff970ce61bd0901ce7d4c9c0012c3aa9b2520b8db59625bc2e1fbca58ca5c1daab690a5dc5d2a94d3c7d67bbcad09a4944
7
- data.tar.gz: 73eecafd1eaeed6c20d6cadf0c92c80c7b896f9bfa7cf1ad876c56464544084cdb6837f675a2edd54a3177f8eb935fbe11d3e2f71aa0bd0603bbadf4e31c2780
6
+ metadata.gz: 27ff68cd37d4e8215b1fbcc4d349db05c8e3f93c580d6e63fe3ad710798ae764260488cb837d86d3ab10fa67bb0976ab4db96e83831ddb6b13cfac8de020f485
7
+ data.tar.gz: fe2daff0ba4698a62664c1032655f7bbebc0d108390be0fc6c34d13164be265948db4faa1bb1d59ddc05fca7142440d44d65987bdb2bcf385534c7fd72b3f1ca
data/README.md CHANGED
@@ -1,15 +1,13 @@
1
- # Shapeshift
1
+ # Shapeshiftio
2
+ A complete ruby wrapper for shapeshift.io API
2
3
 
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/shapeshift`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Refactor and make code base more DRY
6
4
 
7
5
  ## Installation
8
6
 
9
7
  Add this line to your application's Gemfile:
10
8
 
11
9
  ```ruby
12
- gem 'shapeshift'
10
+ gem 'shapeshiftio'
13
11
  ```
14
12
 
15
13
  And then execute:
@@ -18,21 +16,88 @@ And then execute:
18
16
 
19
17
  Or install it yourself as:
20
18
 
21
- $ gem install shapeshift
19
+ $ gem install shapeshiftio
22
20
 
23
21
  ## Usage
22
+ ..* All methods return a JSON object with the fields detailed at the [shapeshift's official website](https://info.shapeshift.io/api)
23
+ ..* To call a method you only need the __required fields__, if you want to pass more parameters, just add a hash when callind a method (examples below)
24
+
25
+ # GET requests:
26
+
27
+ List available coins in the shapeshift API:
28
+
29
+ Shapeshiftio.get_coins
30
+
31
+ Gets the current deposit limit set by Shapeshift for a specific pair:
32
+
33
+ Shapeshiftio.limit("doge_dgb")
34
+
35
+ Market info of a specific pair:
36
+
37
+ Shapeshiftio.market_info("doge_dgb")
38
+
39
+ Gets the current rate offered by Shapeshift:
40
+
41
+ Shapeshiftio.rate("btc_eth")
42
+
43
+ Get a list of the most recent transactions:
44
+
45
+ Shapeshiftio.recent_tx(max) #[max] is an optional maximum number of transactions to return.
46
+
47
+ Returns the status of the most recent deposit transaction to the address:
48
+
49
+ Shapeshiftio.tx_stat(deposit_address) #[address] is the deposit address to look up.
50
+
51
+ Time Remaining on Fixed Amount Transaction:
52
+
53
+ Shapeshiftio.time_remaining(deposit_address) #[address] is the deposit address to look up.
54
+
55
+ Validate an address, given a currency symbol and address.
56
+
57
+ Shapeshiftio.validate(address,coin_symbol) #[address] the address that the user wishes to validate, [coinSymbol] the currency symbol of the coin
58
+
59
+ # POST requests
60
+
61
+ # Normal Transaction (convert coin):
62
+
63
+ withdrawal = the address for resulting coin to be sent to
64
+ pair = what coins are being exchanged in the form [input coin]_[output coin]
65
+ returnAddress = (Optional) address to return deposit to if anything goes wrong with the exchange
66
+ destTag = (Optional) Destination tag that you want appended to a Ripple payment to you
67
+ rsAddress = (Optional) For new NXT accounts to be funded, you supply this on NXT payment to you
68
+ apiKey = (Optional) Your affiliate PUBLIC KEY
69
+
70
+ example data: {"withdrawal":"AAAAAAAAAAAAA", "pair":"btc_ltc", returnAddress:"BBBBBBBBBBB"}
71
+
72
+ Shapeshiftio.shift("AAAAAAAAAAAAA","btc_ltc",options = {"returnAddress" : "BBBBBBBBBBB"})
73
+ Shapeshiftio.shift("RIPPLE ADDRESS","ltc_xrp",options = {"returnAddres" : "RIPPLE ADDRESS", "destTag" : "RIPPLE ADDRESS TAG"})
74
+
75
+ # Request Email Receipt
76
+ email = the address for receipt email to be sent to
77
+ txid = the transaction id of the transaction TO the user (ie the txid for the withdrawal NOT the deposit)
78
+ example data {"email":"mail@example.com", "txid":"123ABC"}
24
79
 
25
- TODO: Use cases and example code coming soon.
80
+ Shapeshiftio.receipt("mail@example.com","123ABC")
81
+
82
+ # Fixed Amount Transaction / Quote Send Exact Price
83
+ amount = the amount to be sent to the withdrawal address
84
+ withdrawal = the address for coin to be sent to
85
+ pair = what coins are being exchanged in the form [input coin]_[output coin]
86
+ returnAddress = (Optional) address to return deposit to if anything goes wrong with exchange
87
+ destTag = (Optional) Destination tag that you want appended to a Ripple payment to you
88
+ rsAddress = (Optional) For new NXT accounts to be funded, supply this on NXT payment to you
89
+ apiKey = (Optional) Your affiliate PUBLIC KEY
26
90
 
27
- ## Development
91
+ Shapeshiftio.fixed(amount, wallet_address, coin_pair, options = {})
92
+ Shapeshiftio.quote(amount, coin_pair)
28
93
 
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.
94
+ # Cancel Pending Transaction
30
95
 
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).
96
+ Shapeshiftio.cancel(deposit_address)
32
97
 
33
98
  ## Contributing
34
99
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/atjohnson/shapeshift.
100
+ Bug reports and pull requests are welcome on GitHub.
36
101
 
37
102
 
38
103
  ## License
@@ -1,3 +1,3 @@
1
1
  module Shapeshiftio
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/shapeshiftio.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Ricardo Malafaia"]
10
10
  spec.email = ["ricardo.malafaia1994@gmail.com"]
11
11
 
12
- spec.summary = %q{A complete Ruby wrapper for the shapeshift.io API.}
12
+ spec.summary = %q{A complete functional Ruby wrapper for the shapeshift.io API.}
13
13
  spec.description = %q{}
14
14
  spec.homepage = "https://github.com/rbm4/shapeshiftio"
15
15
  spec.license = "MIT"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shapeshiftio
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
  - Ricardo Malafaia
@@ -78,5 +78,5 @@ rubyforge_project:
78
78
  rubygems_version: 2.6.11
79
79
  signing_key:
80
80
  specification_version: 4
81
- summary: A complete Ruby wrapper for the shapeshift.io API.
81
+ summary: A complete functional Ruby wrapper for the shapeshift.io API.
82
82
  test_files: []