cryptocoincharts_ruby 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/cryptocoincharts_ruby.rb +9 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjhlNjk4NTU4ODZkMWM4ZTdjMTlmYmI0YzgzYWQ2NzE4NGE5ODkxYg==
4
+ ZDgxN2I5OGEwMWMxODIwMmZlMmMzMGEyZWYxNmJlN2U3NmRkMzM5NQ==
5
5
  data.tar.gz: !binary |-
6
- ZTBiZWFjZGNhMDgxYjQ2ODk1ZmUzNmFiZmZjZjBhMDljY2QxNjcxMQ==
6
+ ODkxOTM3MjI2YzFkNWM0NTZmNTRlN2Q4MGY0NDM4MTBjZDYyNGE0Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZjFhYjc2N2JmNTc3MTE3MzUzNTU4YjY2ZDFjZmE4M2U2MjQwMzBkZWRmOGM0
10
- M2ViM2VlM2RhN2YyN2I5OWE3MGU0MzZlNDc1OGUyM2Y0MDdmOTQzOTlmN2M4
11
- YWY1Yjk2ZTMwYjBlMzViM2ZlY2MxNzE1Yjc4YTBmNjNhYmE5Y2I=
9
+ ZmE1OWZkYzRiMGFjYjE4YzgyYTQ5MjdmODkyMzc3NDBjNzQ5ZTVlNGViOTA2
10
+ N2U3NjVjZTE4OTY3ZDA2YjYwNjQxMmUwODFiOTZhZDE1NDgzODQ3OGRkMmFm
11
+ MThiZWI3OTk5M2Y3M2RlODlmYTZhM2I4YTUzMWIzZWY5ZmY3MDg=
12
12
  data.tar.gz: !binary |-
13
- ZDA3ZGZjZWRkYzk3YTFlM2FkZTEzZjhmNzJiZGYzNjI5M2MyYjkxMDM2NWNi
14
- YzQ2ZDBiY2ZjM2NkZmRkMjUxNTc1N2Y2MGRhZGNhMjMxN2U5ZjFmZDMyZjg5
15
- Y2NiYjZkZTVmODNjOTA3MjA3YmQ0ZDM4Y2FkY2QxYmI3NmRkNTQ=
13
+ ZWY5ZmU1MDJmYzQ1MTIwMmJmODMxNTI2N2Q2ZDgzZGNjODE2NmU3Njk1ZDZj
14
+ ZDBiN2Q3Y2IwZjQwNmRlOGJiZjE1ZTIwYzBlNGJkYzU4NDg4OTJlNmNiZjAz
15
+ Y2ZmZmM0NjhjNzJhYTQyOGMzOWRkZmI3Y2ViNzRiMDU4ZDI0ODk=
@@ -9,7 +9,7 @@ module CryptoCoinCharts
9
9
 
10
10
  API_URL = 'http://www.cryptocoincharts.info/v2/api'
11
11
  VALID_PAIRS = [
12
- :"42_btc", :"888_btc", :aaa_btc, :adt_btc, :air_btc, :alb_btc, :alf_btc, :alp_btc,
12
+ :"42_btc", :"365_btc", :"888_btc", :aaa_btc, :adt_btc, :air_btc, :alb_btc, :alf_btc, :alp_btc,
13
13
  :amc_btc, :anc_btc, :ant_btc, :aph_btc, :app_btc, :arg_btc, :asc_btc, :asr_btc, :atp_btc, :aur_btc,
14
14
  :bat_btc, :bc_btc, :bcx_btc, :bea_btc, :bec_btc, :bela_btc, :beli_btc, :ben_btc, :bet_btc, :bfc_btc,
15
15
  :bil_btc, :blc_btc, :blk_btc, :boc_btc, :bqc_btc, :btb_btc, :btc_btc, :btcs_btc, :bte_btc, :btg_btc,
@@ -19,7 +19,7 @@ module CryptoCoinCharts
19
19
  :dgc_btc, :diem_btc, :dime_btc, :dmd_btc, :doge_btc, :drk_btc, :dsc_btc, :dtc_btc, :duck_btc, :dvc_btc,
20
20
  :eac_btc, :ebt_btc, :efl_btc, :elc_btc, :elp_btc, :emc2_btc, :emd_btc, :emo_btc, :etok_btc, :eur_btc,
21
21
  :exc_btc, :exe_btc, :ezc_btc, :ffc_btc, :flap_btc, :flo_btc, :flt_btc, :fox_btc, :frc_btc, :fre_btc,
22
- :frk_btc, :frq_btc, :fry_btc, :fsc_btc, :fst_btc, :ftc_btc, :fz_btc, :gac_btc, :gdc_btc, :ghc_btc,
22
+ :frk_btc, :frq_btc, :fry_btc, :fsc_btc, :fst_btc, :ftc_btc, :fz_btc, :gac_btc, :gdc_btc, :ghc_btc, :grce_btc,
23
23
  :gil_btc, :glb_btc, :glc_btc, :gld_btc, :glx_btc, :gme_btc, :gns_btc, :gpu_btc, :gpuc_btc, :gra_btc,
24
24
  :grc_btc, :grump_btc, :grw_btc, :hbn_btc, :hic_btc, :hiro_btc, :hkc_btc, :hpc_btc, :huc_btc, :hvc_btc,
25
25
  :hyc_btc, :i0c_btc, :icn_btc, :ifc_btc, :ipc_btc, :iqd_btc, :isk_btc, :ixc_btc, :jkc_btc, :karm_btc,
@@ -42,7 +42,13 @@ module CryptoCoinCharts
42
42
 
43
43
  def list_coins
44
44
  coins = JSON.parse(Mechanize.new.get("#{API_URL}/listCoins").body)
45
- coins.map {|c| Hashie::Mash.new(c) }
45
+ coins.map! {|c| Hashie::Mash.new(c) }
46
+ coins.each do |coin|
47
+ if !VALID_PAIRS.include?("#{coin.id}_btc".to_sym)
48
+ puts "WARNING: Valid coin pair #{coin.id}_btc does not appear in the list of valid pairs!"
49
+ end
50
+ end
51
+ coins
46
52
  end
47
53
 
48
54
  def coin_info(pair)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptocoincharts_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan Barron