bithound 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/bin/bithound +3 -0
- data/lib/bithound.rb +26 -0
- metadata +47 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
OWEwYzM2M2M5NzAxYzcxNmYxNzk4MjRhOTFiNjkzNDUxNDdmMzY2NA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YjMyNzk1NGU0MjFkOTMwODFkYTQ0MjZhY2I1MjhlZTAwOTU0OTM2Zg==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZGMxMmRmZmFhMTYxNDg3YmY5NzljNjRlMWU0ZGYzMTRlNGRmMTYwNjgzOGRk
|
10
|
+
OTZiOWE0Y2M3ODk0ZmEwNGM0MTExM2U1MTg1ZmE5YzIwNTRjMmNlMmYyZTI1
|
11
|
+
YWFlYTRiMWY3OTI4NGZkNDVmNDY4MzI3YTM0MTJkMDQ0OTVlNGU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ODE5YzI5Yjc5ODU5NTUzNjg0MDI1MTA4NzcxNGU1YWUyNDNlYjg4OGYxMDIy
|
14
|
+
MGEzYmJiOTg3MWQ4MmUxZGI2Y2E0MTY3ZjBkN2I0NzgwYWQ4ZDdmZmNiODY5
|
15
|
+
NTA3MjVmMjVjMTAzN2VhNWZlMGU2OTg2ZGI0ZmZlOTkxOTNlMTQ=
|
data/bin/bithound
ADDED
data/lib/bithound.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'open-uri'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
def call
|
5
|
+
bit_hound = open('http://api.bitcoincharts.com/v1/markets.json')
|
6
|
+
response_status = bit_hound.status
|
7
|
+
response_body = bit_hound.read
|
8
|
+
@parsed_body = JSON.parse(response_body)
|
9
|
+
end
|
10
|
+
|
11
|
+
def find
|
12
|
+
@parsed_body.detect {|market| market["symbol"] == "mtgoxUSD"}
|
13
|
+
end
|
14
|
+
|
15
|
+
call
|
16
|
+
@mtgoxUSD = find
|
17
|
+
|
18
|
+
def display
|
19
|
+
puts "mtgoxUSD latest_trade = "+ @mtgoxUSD.fetch("latest_trade").to_s
|
20
|
+
puts "mtgoxUSD close = " + @mtgoxUSD.fetch("close").to_s
|
21
|
+
end
|
22
|
+
|
23
|
+
display
|
24
|
+
|
25
|
+
|
26
|
+
|
metadata
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bithound
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Charlotte Chang
|
8
|
+
- Dave Cameron
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-10-20 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: a quick way to check the latest trade time and price for mtgoxUSD
|
15
|
+
email: charlottechang.ny@gmail.com
|
16
|
+
executables:
|
17
|
+
- bithound
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- lib/bithound.rb
|
22
|
+
- bin/bithound
|
23
|
+
homepage: http://rubygems.org/gems/bithound
|
24
|
+
licenses:
|
25
|
+
- MIT
|
26
|
+
metadata: {}
|
27
|
+
post_install_message:
|
28
|
+
rdoc_options: []
|
29
|
+
require_paths:
|
30
|
+
- lib
|
31
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ! '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
requirements: []
|
42
|
+
rubyforge_project:
|
43
|
+
rubygems_version: 2.1.4
|
44
|
+
signing_key:
|
45
|
+
specification_version: 4
|
46
|
+
summary: A bitcoin price checking gem
|
47
|
+
test_files: []
|