open-exchange-rate-ruby 0.0.2 → 0.0.3

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: 27d1db2ee3cb193cf845fc06d566e0eb79408871
4
- data.tar.gz: 0652255b4639b537872491577b1bb9e718f86179
3
+ metadata.gz: 50dff7d6f51c004cbb0c8f83fd94b7525032c0a7
4
+ data.tar.gz: 512e4e6c61464a7c571dd95257d3a024f9e292ca
5
5
  SHA512:
6
- metadata.gz: 3a016549117420e677bc1eebe4323274b7c84b0d426be57abb5416b8dd4f099b5d6f04626a8ce6b3882cf204b81e5638bda82ca9e17ec272f391682287391325
7
- data.tar.gz: 2e2637d52b1c0509f7e67f7c054f969af8f33fa075934df0478f4f6ecb5ade62a484f1da9728c7aa99529fd9c8dacd7078a1d028a390cc922e7f53a7b9dba395
6
+ metadata.gz: 66554f808dacd8f07a70990876e4522a2f141dface2d9bc5c9cc92efe096748bc74da561b8468c549ad38e8a2ede81d21be63b3032cdb5684cb834ffdd28fc46
7
+ data.tar.gz: 928d318760fe557424c6c9cde52b3e9191cc522d9594c45e9778a842783e545e3635ba6b9dafcd91da9de7639edc49b5e953fde9dc8580d3970deee646251572
data/README.md CHANGED
@@ -6,3 +6,14 @@ Ruby wrapper for the API here: https://openexchangerates.org/documentation
6
6
  Docs https://openexchangerates.org/documentation don't have an ruby implementation so here's my take.
7
7
 
8
8
  Will work great with this gem I made: https://github.com/blooberr/bitcoin-price
9
+
10
+ Example Usage:
11
+ gem install 'open-exchange-rate-ruby'
12
+
13
+ require 'open-exchange-rate'
14
+ oer = OpenExchangeRate.new(app_id: YOUR_APP_ID, https: false)
15
+ oer.latest
16
+
17
+ Combo this with the bitcoin gem I released here https://github.com/blooberr/bitcoin-price.
18
+ You'll be able to get bitcoin prices in all sorts of currencies.
19
+
@@ -22,6 +22,12 @@ module OpenExchangeRate
22
22
  Oj.load(http.body_str)
23
23
  end
24
24
 
25
+ def currencies
26
+ url = "http://openexchangerates.org/api/currencies.json" # no app_id required
27
+ http = Curl.get url
28
+ Oj.load(http.body_str)
29
+ end
30
+
25
31
  end
26
32
  end
27
33
 
@@ -1,4 +1,4 @@
1
1
  module OpenExchangeRate
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open-exchange-rate-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - blooberr