etherscan_api 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/etherscan_api.gemspec +3 -3
- data/lib/etherscan/client.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36a6d6ef1ed9b47148eaf83bc0bb294f30033982afc161b062607f24193946d3
|
4
|
+
data.tar.gz: 2b606924deb7c17081ca690211ed6086740b573654eb35d97d873e0334cf3f16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dd80f5769104c428452ce6c254dfc44c14bae272f023e11fc739a6974964187d10b34e7c06104e860e2e627db86af9d790897aea7a9e1b05d87b5500c06ff00
|
7
|
+
data.tar.gz: 789b7f07bb14853c9669c97f3d45a68bd08fa4de4a2981f2d847d36be66ee7a79e6bdf18f4f57aac23b0e4bb274d10f17de95e3cac2f15f0b7ff36d0db89fce1
|
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/etherscan_api.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: etherscan_api 0.
|
5
|
+
# stub: etherscan_api 0.4.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "etherscan_api".freeze
|
9
|
-
s.version = "0.
|
9
|
+
s.version = "0.4.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
@@ -53,7 +53,7 @@ Gem::Specification.new do |s|
|
|
53
53
|
|
54
54
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
55
55
|
s.add_runtime_dependency(%q<faraday>.freeze, [">= 0"])
|
56
|
-
s.
|
56
|
+
s.add_runtime_dependency(%q<json>.freeze, ["~> 2.1"])
|
57
57
|
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.0"])
|
58
58
|
s.add_development_dependency(%q<shoulda>.freeze, [">= 0"])
|
59
59
|
s.add_development_dependency(%q<rdoc>.freeze, ["~> 6.0.3"])
|
data/lib/etherscan/client.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'faraday'
|
2
|
+
require 'json'
|
2
3
|
|
3
4
|
module Etherscan
|
4
5
|
class Client
|
@@ -22,13 +23,13 @@ module Etherscan
|
|
22
23
|
def get(params = {})
|
23
24
|
endpoint = 'api'
|
24
25
|
merged_params = params.merge({apikey: key})
|
25
|
-
response = conn.get(
|
26
|
+
response = conn.get(endpoint) do |req|
|
26
27
|
req.headers = headers
|
27
28
|
req.params = merged_params
|
28
29
|
end
|
29
30
|
fail Etherscan::Exception, response if raise_exceptions? && response.status != 200
|
30
31
|
|
31
|
-
response
|
32
|
+
JSON(response.body)
|
32
33
|
end
|
33
34
|
|
34
35
|
def conn
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: etherscan_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Paluy
|
@@ -31,7 +31,7 @@ dependencies:
|
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '2.1'
|
34
|
-
type: :
|
34
|
+
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|