shapeshiftio 0.0.4 → 0.0.5
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 +4 -4
- data/README.md +4 -3
- data/lib/shapeshiftio.rb +10 -1
- data/lib/shapeshiftio/version.rb +1 -1
- data/shapeshiftio.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2ffa6a2d7a8a5315204cfa791179d2b78ffaa92a
|
|
4
|
+
data.tar.gz: 061e02398d4bb1df6df84072a88d9b4302fd93de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 945c97f8aba4a6c1f5aa6dd76ef701976fec7dd83d70dfbf68a52a4dca2965b8333de10d118db99544adee31aceded193b1528c0e78956af538414aee18630c2
|
|
7
|
+
data.tar.gz: ea11812cf7b0d27f4f78b0400b2f1d87675f43c6856bfb728f3d86bfb96e66a245435fff683950f624de8982a7af825de06ff49453a4e18bd7c584bcd84a409c
|
data/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# Shapeshiftio
|
|
2
2
|
A complete ruby wrapper for shapeshift.io API
|
|
3
|
+
[](https://badge.fury.io/rb/shapeshiftio)<br>
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
## Installation
|
|
@@ -8,7 +9,7 @@ Add this line to your application's Gemfile:
|
|
|
8
9
|
|
|
9
10
|
```ruby
|
|
10
11
|
gem 'shapeshiftio', git: 'https://github.com/rbm4/shapeshiftio'
|
|
11
|
-
or
|
|
12
|
+
or
|
|
12
13
|
gem 'shapeshiftio'
|
|
13
14
|
```
|
|
14
15
|
|
|
@@ -21,8 +22,8 @@ Or install it yourself as:
|
|
|
21
22
|
$ gem install shapeshiftio
|
|
22
23
|
|
|
23
24
|
## Usage
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
* All methods return a JSON object with the fields detailed at the [shapeshift's official website](https://info.shapeshift.io/api)
|
|
26
|
+
* 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)
|
|
26
27
|
|
|
27
28
|
# GET requests:
|
|
28
29
|
|
data/lib/shapeshiftio.rb
CHANGED
|
@@ -18,7 +18,16 @@ private
|
|
|
18
18
|
|
|
19
19
|
public
|
|
20
20
|
def self.get(path_name, value = nil, p2 = nil)
|
|
21
|
-
|
|
21
|
+
route = ""
|
|
22
|
+
route = route + (path_name.to_s + "/")
|
|
23
|
+
if !(value.nil?)
|
|
24
|
+
route = route + (value.to_s + "/")
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
if !(p2.nil?)
|
|
28
|
+
route = route + (p2.to_s + "/")
|
|
29
|
+
end
|
|
30
|
+
uri = URI("https://shapeshift.io/#{route}")
|
|
22
31
|
response = Net::HTTP.get(uri)
|
|
23
32
|
check_response(response)
|
|
24
33
|
end
|
data/lib/shapeshiftio/version.rb
CHANGED
data/shapeshiftio.gemspec
CHANGED
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.email = ["ricardo.malafaia1994@gmail.com"]
|
|
11
11
|
|
|
12
12
|
spec.summary = %q{A complete functional Ruby wrapper for the shapeshift.io API.}
|
|
13
|
-
spec.description = %q{
|
|
13
|
+
spec.description = %q{Only use versions above 0.0.3!}
|
|
14
14
|
spec.homepage = "https://github.com/rbm4/shapeshiftio"
|
|
15
15
|
spec.license = "MIT"
|
|
16
16
|
|
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.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ricardo Malafaia
|
|
@@ -38,7 +38,7 @@ dependencies:
|
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '10.0'
|
|
41
|
-
description:
|
|
41
|
+
description: Only use versions above 0.0.3!
|
|
42
42
|
email:
|
|
43
43
|
- ricardo.malafaia1994@gmail.com
|
|
44
44
|
executables: []
|