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.
- checksums.yaml +8 -8
- data/lib/cryptocoincharts_ruby.rb +33 -33
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NWMzYmJkY2Y5MmQyNmUzNjQyNWI0MGIwMzk1NGYyMDU2YWVjMDkxMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
N2JjN2M2MWUwNTVhZjI0ZTg5ZTI2MGFiMDJkOTA4NWM2OGE0NzgzMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTk1YzcwNjI4NTc5MmU3MjAyNmM5ZjJlODhlNDlhN2E0NGYxYzNhNDllZDcw
|
10
|
+
OTdmNWNiMDI1MzNjM2NjNTMzNjgzZDE0ZjRmOWFjNWE1MWRkY2RjM2JjZTVm
|
11
|
+
OTk1NDAzY2NmZTY0YWI4MmUwZDU5ZjhhZjNiM2I0NTYxN2YzODc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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.
|
8
|
+
VERSION = '0.0.12'
|
9
9
|
|
10
10
|
API_URL = 'http://www.cryptocoincharts.info/v2/api'
|
11
11
|
VALID_PAIRS = [
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
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
|
|