Class: DataScope::Api
- Inherits:
-
Object
- Object
- DataScope::Api
- Defined in:
- lib/data_scope_api.rb
Instance Attribute Summary collapse
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Instance Method Summary collapse
- #extract_with_isin(isin_code, type = :composite, fields = nil, condition = nil) ⇒ Object
- #extract_with_location(location) ⇒ Object
- #extract_with_ric(ric_code, type = :composite, fields = nil, condition = nil) ⇒ Object
- #get_user ⇒ Object
-
#initialize ⇒ Api
constructor
A new instance of Api.
Constructor Details
Instance Attribute Details
#session ⇒ Object (readonly)
Returns the value of attribute session.
157 158 159 |
# File 'lib/data_scope_api.rb', line 157 def session @session end |
Instance Method Details
#extract_with_isin(isin_code, type = :composite, fields = nil, condition = nil) ⇒ Object
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/data_scope_api.rb', line 171 def extract_with_isin(isin_code, type=:composite, fields=nil, condition=nil) fields ||= [ "Close Price", "Contributor Code Description", "Currency Code Description", "Dividend Yield", "Main Index", "Market Capitalization", "Market Capitalization - Local Currency", "Percent Change - Close Price - 1 Day", "Universal Close Price Date" ] identifiers = [ { "Identifier" => isin_code, "IdentifierType" => "Isin" } ] OnDemandExtract.new(@session, identifiers, type, fields, condition) end |
#extract_with_location(location) ⇒ Object
167 168 169 |
# File 'lib/data_scope_api.rb', line 167 def extract_with_location(location) OnDemandExtract.init_with_location(@session, location) end |
#extract_with_ric(ric_code, type = :composite, fields = nil, condition = nil) ⇒ Object
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/data_scope_api.rb', line 192 def extract_with_ric(ric_code, type=:composite, fields=nil, condition=nil) fields ||= [ "Close Price", "Contributor Code Description", "Currency Code Description", "Dividend Yield", "Main Index", "Market Capitalization", "Market Capitalization - Local Currency", "Percent Change - Close Price - 1 Day", "Universal Close Price Date" ] identifiers = [ { "Identifier" => ric_code, "IdentifierType" => "Ric" } ] OnDemandExtract.new(@session, identifiers, type, fields, condition) end |