blockchain 1.2.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/blockchain.gemspec +1 -1
- data/docs/receive.md +0 -21
- data/lib/blockchain/receive.rb +0 -12
- data/lib/blockchain/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a92813c9ae48afa6b214434774c53a23b75be82
|
4
|
+
data.tar.gz: 2cc22009b6e5573682c72e666be18dcb2635897b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e89dcad42091a11a0700423540d9bad795a7deea3cd996cb020780fc1cdab0e2d8d9f49592317473778714be30c091200dea7019057287a0d3b7bf02e19efa2
|
7
|
+
data.tar.gz: 8211b24abb62df05bbf0accbb6451f10e426d8b41b99f602785c055476d52b60b64bf506c24b79bf94a5568e0ce7f56e4097644226559787213a9e548f952e56
|
data/blockchain.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.7"
|
data/docs/receive.md
CHANGED
@@ -1,24 +1,3 @@
|
|
1
|
-
##Receive V1 functionality (deprecated)
|
2
|
-
|
3
|
-
####`receive`
|
4
|
-
Call the 'api/receive' endpoint and create a forwarding address. Returns a `ReceiveResponse` object.
|
5
|
-
|
6
|
-
Params:
|
7
|
-
```
|
8
|
-
dest_addr : str
|
9
|
-
callback : str
|
10
|
-
api_code : str (optional)
|
11
|
-
```
|
12
|
-
|
13
|
-
Usage:
|
14
|
-
```ruby
|
15
|
-
require 'blockchain'
|
16
|
-
|
17
|
-
resp = Blockchain::receive('1hNapz1CuH4DhnV1DFHH7hafwDE8FJRheA', 'http://your.url.com')
|
18
|
-
|
19
|
-
```
|
20
|
-
|
21
|
-
|
22
1
|
##Receive V2 functionality
|
23
2
|
|
24
3
|
####`receive`
|
data/lib/blockchain/receive.rb
CHANGED
@@ -18,18 +18,6 @@ module Blockchain
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
def self.receive(dest_addr, callback, api_code = nil)
|
22
|
-
params = { 'method' => 'create', 'address' => dest_addr, 'callback' => callback }
|
23
|
-
if !api_code.nil? then params['api_code'] = api_code end
|
24
|
-
resp = Blockchain::call_api('api/receive', method: 'post', data: params)
|
25
|
-
json_resp = JSON.parse(resp)
|
26
|
-
receive_response = ReceiveResponse.new(json_resp['fee_percent'],
|
27
|
-
json_resp['destination'],
|
28
|
-
json_resp['input_address'],
|
29
|
-
json_resp['callback_url'])
|
30
|
-
return receive_response
|
31
|
-
end
|
32
|
-
|
33
21
|
module V2
|
34
22
|
class ReceiveResponse
|
35
23
|
attr_reader :address
|
data/lib/blockchain/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blockchain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blockchain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.
|
105
|
+
rubygems_version: 2.5.1
|
106
106
|
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: Blockchain API library (Ruby, v1)
|