cryptocoincharts_ruby 0.0.11 → 0.0.12

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 +33 -33
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDgxN2I5OGEwMWMxODIwMmZlMmMzMGEyZWYxNmJlN2U3NmRkMzM5NQ==
4
+ NWMzYmJkY2Y5MmQyNmUzNjQyNWI0MGIwMzk1NGYyMDU2YWVjMDkxMA==
5
5
  data.tar.gz: !binary |-
6
- ODkxOTM3MjI2YzFkNWM0NTZmNTRlN2Q4MGY0NDM4MTBjZDYyNGE0Nw==
6
+ N2JjN2M2MWUwNTVhZjI0ZTg5ZTI2MGFiMDJkOTA4NWM2OGE0NzgzMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZmE1OWZkYzRiMGFjYjE4YzgyYTQ5MjdmODkyMzc3NDBjNzQ5ZTVlNGViOTA2
10
- N2U3NjVjZTE4OTY3ZDA2YjYwNjQxMmUwODFiOTZhZDE1NDgzODQ3OGRkMmFm
11
- MThiZWI3OTk5M2Y3M2RlODlmYTZhM2I4YTUzMWIzZWY5ZmY3MDg=
9
+ MTk1YzcwNjI4NTc5MmU3MjAyNmM5ZjJlODhlNDlhN2E0NGYxYzNhNDllZDcw
10
+ OTdmNWNiMDI1MzNjM2NjNTMzNjgzZDE0ZjRmOWFjNWE1MWRkY2RjM2JjZTVm
11
+ OTk1NDAzY2NmZTY0YWI4MmUwZDU5ZjhhZjNiM2I0NTYxN2YzODc=
12
12
  data.tar.gz: !binary |-
13
- ZWY5ZmU1MDJmYzQ1MTIwMmJmODMxNTI2N2Q2ZDgzZGNjODE2NmU3Njk1ZDZj
14
- ZDBiN2Q3Y2IwZjQwNmRlOGJiZjE1ZTIwYzBlNGJkYzU4NDg4OTJlNmNiZjAz
15
- Y2ZmZmM0NjhjNzJhYTQyOGMzOWRkZmI3Y2ViNzRiMDU4ZDI0ODk=
13
+ NzUxNjhmOWIzYzcwYjlkM2M2YTAwZmUxMWVlMDY4MTc5MGI0MDA3NzlhNDYy
14
+ ZTI3MTM3Y2NhMDBhNDYwOWYzNTJlNTFhMjU4NzM1M2Q4N2VlMWVjMjZiMTVm
15
+ Y2YyZWZiYmYzOThlNTY2YjRmYTE3YTZlMTkzN2JjNTE2ODFjYmE=
@@ -5,41 +5,42 @@ require 'hashie'
5
5
  module CryptoCoinCharts
6
6
  class << self
7
7
 
8
- VERSION = '0.0.1'
8
+ VERSION = '0.0.12'
9
9
 
10
10
  API_URL = 'http://www.cryptocoincharts.info/v2/api'
11
11
  VALID_PAIRS = [
12
- :"42_btc", :"365_btc", :"888_btc", :aaa_btc, :adt_btc, :air_btc, :alb_btc, :alf_btc, :alp_btc,
13
- :amc_btc, :anc_btc, :ant_btc, :aph_btc, :app_btc, :arg_btc, :asc_btc, :asr_btc, :atp_btc, :aur_btc,
14
- :bat_btc, :bc_btc, :bcx_btc, :bea_btc, :bec_btc, :bela_btc, :beli_btc, :ben_btc, :bet_btc, :bfc_btc,
15
- :bil_btc, :blc_btc, :blk_btc, :boc_btc, :bqc_btc, :btb_btc, :btc_btc, :btcs_btc, :bte_btc, :btg_btc,
16
- :btq_btc, :btr_btc, :buk_btc, :c2_btc, :cach_btc, :cage_btc, :cap_btc, :cash_btc, :cat_btc, :cdc_btc,
17
- :cent_btc, :cga_btc, :cgb_btc, :cin_btc, :clr_btc, :cmc_btc, :cnc_btc, :cnote_btc, :cny_btc, :coin_btc,
18
- :col_btc, :con_btc, :corg_btc, :cpr_btc, :crc_btc, :csc_btc, :ctm_btc, :dbl_btc, :dem_btc, :dgb_btc,
19
- :dgc_btc, :diem_btc, :dime_btc, :dmd_btc, :doge_btc, :drk_btc, :dsc_btc, :dtc_btc, :duck_btc, :dvc_btc,
20
- :eac_btc, :ebt_btc, :efl_btc, :elc_btc, :elp_btc, :emc2_btc, :emd_btc, :emo_btc, :etok_btc, :eur_btc,
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, :grce_btc,
23
- :gil_btc, :glb_btc, :glc_btc, :gld_btc, :glx_btc, :gme_btc, :gns_btc, :gpu_btc, :gpuc_btc, :gra_btc,
24
- :grc_btc, :grump_btc, :grw_btc, :hbn_btc, :hic_btc, :hiro_btc, :hkc_btc, :hpc_btc, :huc_btc, :hvc_btc,
25
- :hyc_btc, :i0c_btc, :icn_btc, :ifc_btc, :ipc_btc, :iqd_btc, :isk_btc, :ixc_btc, :jkc_btc, :karm_btc,
26
- :kdc_btc, :kgc_btc, :krn_btc, :lbw_btc, :ldc_btc, :leaf_btc, :lgbt_btc, :lk7_btc, :lky_btc, :lot_btc,
27
- :love_btc, :ltc_btc, :lyc_btc, :max_btc, :mcx_btc, :mec_btc, :med_btc, :mem_btc, :meow_btc, :mim_btc,
28
- :mint_btc, :mmc_btc, :mnc_btc, :moon_btc, :mrc_btc, :mrs_btc, :msc_btc, :mst_btc, :mtc_btc, :mts_btc,
29
- :mvc_btc, :mxb_btc, :myr_btc, :mzc_btc, :nan_btc, :nbl_btc, :nec_btc, :net_btc, :nib_btc, :nka_btc,
30
- :nmc_btc, :nobl_btc, :nok_btc, :nrb_btc, :nrs_btc, :nvc_btc, :nwc_btc, :nxt_btc, :nyan_btc, :nym_btc,
31
- :ogc_btc, :oly_btc, :orb_btc, :osc_btc, :pand_btc, :panda_btc, :pawn_btc, :pcc_btc, :peng_btc, :pho_btc,
32
- :phs_btc, :pi_btc, :pig_btc, :plnc_btc, :pmc_btc, :points_btc, :pop_btc, :pot_btc, :ppc_btc, :ppl_btc,
33
- :prc_btc, :prt_btc, :pt_btc, :pts_btc, :pwc_btc, :pxc_btc, :pxl_btc, :pyc_btc, :q2c_btc, :qqc_btc,
34
- :qrk_btc, :rch_btc, :rdd_btc, :rec_btc, :red_btc, :redd_btc, :ric_btc, :rpc_btc, :rpd_btc, :rqc_btc,
35
- :ruby_btc, :rur_btc, :ryc_btc, :sat_btc, :sav_btc, :sbc_btc, :sc_btc, :skc_btc, :sll_btc, :sloth_btc,
36
- :smc_btc, :soc_btc, :spa_btc, :spt_btc, :src_btc, :stc_btc, :str_btc, :sun_btc, :svc_btc, :sxc_btc,
37
- :syn_btc, :tag_btc, :tak_btc, :tea_btc, :tek_btc, :tes_btc, :tgc_btc, :tips_btc, :tix_btc, :top_btc,
38
- :trc_btc, :trl_btc, :ttc_btc, :ufc_btc, :uni_btc, :uno_btc, :usd_btc, :usde_btc, :utc_btc, :vel_btc,
39
- :ven_btc, :vtc_btc, :wdc_btc, :wiki_btc, :wolf_btc, :xcp_btc, :xiv_btc, :xjo_btc, :xnc_btc, :xpm_btc,
40
- :xrp_btc, :xsv_btc, :yac_btc, :yang_btc, :ybc_btc, :yin_btc, :zcc_btc, :zed_btc, :zeit_btc, :zet_btc
41
- ]
42
-
12
+ :"365_btc", :"42_btc", :"888_btc", :aaa_btc, :adt_btc, :air_btc, :alb_btc, :alf_btc, :alp_btc,
13
+ :amc_btc, :anc_btc, :ant_btc, :aph_btc, :app_btc, :arg_btc, :asc_btc, :asr_btc, :atp_btc, :aur_btc,
14
+ :bat_btc, :bc_btc, :bcx_btc, :bea_btc, :bec_btc, :bela_btc, :beli_btc, :ben_btc, :bet_btc, :bfc_btc,
15
+ :bil_btc, :blc_btc, :blk_btc, :boc_btc, :bqc_btc, :btb_btc, :btc_btc, :btcs_btc, :bte_btc, :btg_btc,
16
+ :btq_btc, :btr_btc, :buk_btc, :c2_btc, :cach_btc, :cage_btc, :cap_btc, :cash_btc, :cat_btc, :cdc_btc,
17
+ :cent_btc, :cga_btc, :cgb_btc, :cin_btc, :clr_btc, :cmc_btc, :cnc_btc, :cnote_btc, :cny_btc, :coin_btc,
18
+ :col_btc, :con_btc, :corg_btc, :cpr_btc, :crc_btc, :csc_btc, :ctm_btc, :dbl_btc, :dem_btc, :dgb_btc,
19
+ :dgc_btc, :diem_btc, :dime_btc, :dmd_btc, :doge_btc, :drk_btc, :dsc_btc, :dtc_btc, :duck_btc, :dvc_btc,
20
+ :eac_btc, :ebt_btc, :ecc_btc, :efl_btc, :elc_btc, :elp_btc, :emc2_btc, :emd_btc, :emo_btc, :etok_btc,
21
+ :eur_btc, :exc_btc, :exe_btc, :ezc_btc, :fail_btc, :ffc_btc, :flap_btc, :flo_btc, :flt_btc, :fox_btc,
22
+ :frc_btc, :fre_btc, :frk_btc, :frq_btc, :frx_btc, :fry_btc, :fsc_btc, :fst_btc, :ftc_btc, :fz_btc, :gac_btc,
23
+ :gdc_btc, :ger_btc, :ghc_btc, :gil_btc, :glb_btc, :glc_btc, :gld_btc, :glx_btc, :gme_btc, :gns_btc,
24
+ :gpu_btc, :gpuc_btc, :gra_btc, :grc_btc, :grce_btc, :grump_btc, :grw_btc, :hbn_btc, :hic_btc, :hiro_btc,
25
+ :hkc_btc, :hpc_btc, :huc_btc, :hvc_btc, :hyc_btc, :i0c_btc, :icn_btc, :ifc_btc, :ipc_btc, :iqd_btc,
26
+ :isk_btc, :ixc_btc, :jkc_btc, :karm_btc, :kdc_btc, :kgc_btc, :krn_btc, :lbw_btc, :ldc_btc, :leaf_btc,
27
+ :lgbt_btc, :lk7_btc, :lky_btc, :lot_btc, :love_btc, :ltc_btc, :lyc_btc, :max_btc, :mcx_btc, :mec_btc,
28
+ :med_btc, :mem_btc, :meow_btc, :mim_btc, :mint_btc, :mmc_btc, :mnc_btc, :moon_btc, :mpl_btc, :mrc_btc,
29
+ :mrs_btc, :msc_btc, :mst_btc, :mtc_btc, :mts_btc, :mvc_btc, :mxb_btc, :myr_btc, :mzc_btc, :nan_btc,
30
+ :nbl_btc, :nec_btc, :net_btc, :nib_btc, :nka_btc, :nmc_btc, :nobl_btc, :nok_btc, :nrb_btc, :nrs_btc,
31
+ :nvc_btc, :nwc_btc, :nxt_btc, :nyan_btc, :nym_btc, :ogc_btc, :oly_btc, :orb_btc, :osc_btc, :pand_btc,
32
+ :panda_btc, :pawn_btc, :pcc_btc, :peng_btc, :pho_btc, :phs_btc, :pi_btc, :pig_btc, :plnc_btc, :pmc_btc,
33
+ :points_btc, :pop_btc, :pot_btc, :ppc_btc, :ppl_btc, :prc_btc, :prt_btc, :pt_btc, :pts_btc, :pwc_btc,
34
+ :pxc_btc, :pxl_btc, :pyc_btc, :q2c_btc, :qqc_btc, :qrk_btc, :rch_btc, :rdd_btc, :rec_btc, :red_btc,
35
+ :redd_btc, :ric_btc, :rpc_btc, :rpd_btc, :rqc_btc, :rt2_btc, :ruby_btc, :rur_btc, :ryc_btc, :sat_btc,
36
+ :sav_btc, :sbc_btc, :sc_btc, :skc_btc, :sll_btc, :sloth_btc, :slr_btc, :smc_btc, :soc_btc, :spa_btc,
37
+ :spt_btc, :src_btc, :stc_btc, :str_btc, :sun_btc, :svc_btc, :sxc_btc, :syn_btc, :tag_btc, :tak_btc,
38
+ :tea_btc, :tek_btc, :tes_btc, :tgc_btc, :tips_btc, :tix_btc, :top_btc, :trc_btc, :trl_btc, :ttc_btc,
39
+ :ufc_btc, :uni_btc, :uno_btc, :usd_btc, :usde_btc, :utc_btc, :vel_btc, :ven_btc, :vtc_btc, :wdc_btc,
40
+ :wiki_btc, :wolf_btc, :xcp_btc, :xiv_btc, :xjo_btc, :xnc_btc, :xpm_btc, :xrp_btc, :xsv_btc, :yac_btc,
41
+ :yang_btc, :ybc_btc, :yin_btc, :zcc_btc, :zed_btc, :zeit_btc, :zet_btc
42
+ ]
43
+
43
44
  def list_coins
44
45
  coins = JSON.parse(Mechanize.new.get("#{API_URL}/listCoins").body)
45
46
  coins.map! {|c| Hashie::Mash.new(c) }
@@ -53,7 +54,6 @@ module CryptoCoinCharts
53
54
 
54
55
  def coin_info(pair)
55
56
  raise ArgumentError, "You must supply a valid coin pair!" if !VALID_PAIRS.include?(pair.to_sym)
56
- #Hashie::Mash.new(JSON.parse(Mechanize.new.get("#{API_URL}/tradingPair/#{pair.to_s}").body))
57
57
  coins_info(pair)[0]
58
58
  end
59
59
 
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.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan Barron