inkling_api 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,6 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.email = ["david@isotope11.com", "nick@isotope11.com", "josh@isotope11.com"]
11
11
  s.homepage = "http://www.isotope11.com/"
12
12
  s.summary = %q{Gem to interact with inkling markets API}
13
+ s.description = %q{Gem to interact with inkling markets API}
13
14
 
14
15
  s.rubyforge_project = "inkling_api"
15
16
 
@@ -264,6 +264,16 @@ module InklingApi
264
264
  post("stocks/#{stock_id}/trades/quote.xml", quote_data.to_xml(:root => "trade"), :content_type => 'application/xml')
265
265
  end
266
266
 
267
+ def comments(market_id)
268
+ trades = get("/markets/#{market_id}/trades.xml")["trades"]
269
+ ugly_comments = trades.select!{ |t| !t["reason"].nil? }
270
+ pretty_comments = Array.new
271
+ ugly_comments.each do |c|
272
+ pretty_comments << { c["membership"]["id"] => c["reason"] }
273
+ end
274
+ pretty_comments
275
+ end
276
+
267
277
  end
268
278
 
269
279
  extend Configuration
@@ -1,3 +1,3 @@
1
1
  module InklingApi
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -201,4 +201,9 @@ describe InklingApi do
201
201
  inkling_api.quote(stock_id, membership_id, quantity)
202
202
  end.should_not raise_error
203
203
  end
204
+
205
+ it "should get a list of comments" do
206
+ market_id = 38118
207
+ inkling_api.comments(market_id).should be_a(Array)
208
+ end
204
209
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inkling_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,12 +11,12 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2011-09-07 00:00:00.000000000 +00:00
14
+ date: 2011-10-03 00:00:00.000000000 +00:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: faraday
19
- requirement: &7967400 !ruby/object:Gem::Requirement
19
+ requirement: &9219200 !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - ~>
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: 0.7.4
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *7967400
27
+ version_requirements: *9219200
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: faraday-stack
30
- requirement: &7966900 !ruby/object:Gem::Requirement
30
+ requirement: &9218700 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ~>
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: 0.1.3
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *7966900
38
+ version_requirements: *9218700
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: hashie
41
- requirement: &7966440 !ruby/object:Gem::Requirement
41
+ requirement: &9218240 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ~>
@@ -46,10 +46,10 @@ dependencies:
46
46
  version: 1.1.0
47
47
  type: :runtime
48
48
  prerelease: false
49
- version_requirements: *7966440
49
+ version_requirements: *9218240
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: activesupport
52
- requirement: &7965980 !ruby/object:Gem::Requirement
52
+ requirement: &9217780 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ~>
@@ -57,10 +57,10 @@ dependencies:
57
57
  version: 3.1.0.rc5
58
58
  type: :runtime
59
59
  prerelease: false
60
- version_requirements: *7965980
60
+ version_requirements: *9217780
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: i18n
63
- requirement: &7965520 !ruby/object:Gem::Requirement
63
+ requirement: &9217320 !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements:
66
66
  - - ~>
@@ -68,10 +68,10 @@ dependencies:
68
68
  version: 0.6.0
69
69
  type: :runtime
70
70
  prerelease: false
71
- version_requirements: *7965520
71
+ version_requirements: *9217320
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: builder
74
- requirement: &7998320 !ruby/object:Gem::Requirement
74
+ requirement: &9216860 !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
77
  - - ~>
@@ -79,10 +79,10 @@ dependencies:
79
79
  version: 3.0.0
80
80
  type: :runtime
81
81
  prerelease: false
82
- version_requirements: *7998320
82
+ version_requirements: *9216860
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
- requirement: &7997860 !ruby/object:Gem::Requirement
85
+ requirement: &9250120 !ruby/object:Gem::Requirement
86
86
  none: false
87
87
  requirements:
88
88
  - - ~>
@@ -90,10 +90,10 @@ dependencies:
90
90
  version: 2.6.0
91
91
  type: :development
92
92
  prerelease: false
93
- version_requirements: *7997860
93
+ version_requirements: *9250120
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: rspec-core
96
- requirement: &7997400 !ruby/object:Gem::Requirement
96
+ requirement: &9249660 !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
99
  - - ~>
@@ -101,10 +101,10 @@ dependencies:
101
101
  version: 2.6.0
102
102
  type: :development
103
103
  prerelease: false
104
- version_requirements: *7997400
104
+ version_requirements: *9249660
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: json_spec
107
- requirement: &7996940 !ruby/object:Gem::Requirement
107
+ requirement: &9249200 !ruby/object:Gem::Requirement
108
108
  none: false
109
109
  requirements:
110
110
  - - ~>
@@ -112,10 +112,10 @@ dependencies:
112
112
  version: 0.6.0
113
113
  type: :development
114
114
  prerelease: false
115
- version_requirements: *7996940
115
+ version_requirements: *9249200
116
116
  - !ruby/object:Gem::Dependency
117
117
  name: shoulda
118
- requirement: &7996480 !ruby/object:Gem::Requirement
118
+ requirement: &9248740 !ruby/object:Gem::Requirement
119
119
  none: false
120
120
  requirements:
121
121
  - - ~>
@@ -123,10 +123,10 @@ dependencies:
123
123
  version: 2.11.3
124
124
  type: :development
125
125
  prerelease: false
126
- version_requirements: *7996480
126
+ version_requirements: *9248740
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: ruby-debug19
129
- requirement: &7996100 !ruby/object:Gem::Requirement
129
+ requirement: &9248360 !ruby/object:Gem::Requirement
130
130
  none: false
131
131
  requirements:
132
132
  - - ! '>='
@@ -134,8 +134,8 @@ dependencies:
134
134
  version: '0'
135
135
  type: :development
136
136
  prerelease: false
137
- version_requirements: *7996100
138
- description:
137
+ version_requirements: *9248360
138
+ description: Gem to interact with inkling markets API
139
139
  email:
140
140
  - david@isotope11.com
141
141
  - nick@isotope11.com