Skip to content

Latest commit

 

History

History
262 lines (154 loc) · 5.29 KB

DataTagApi.md

File metadata and controls

262 lines (154 loc) · 5.29 KB

Intrinio::DataTagApi

All URIs are relative to https://api-v2.intrinio.com

Method HTTP request Description
get_all_data_tags GET /data_tags All Data Tags
get_data_tag_by_id GET /data_tags/{identifier} Lookup Data Tag
search_data_tags GET /data_tags/search Search Data Tags

get_all_data_tags

View Intrinio API Documentation

ApiResponseDataTags get_all_data_tags(opts)

All Data Tags

Returns all Data Tags. Returns Data Tags matching parameters when specified.

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

dataTag_api = Intrinio::DataTagApi.new

opts = {
  tag: nil,
  type: nil,
  parent: nil,
  statement_code: "income_statement",
  fs_template: "industrial",
  page_size: 100,
  next_page: nil
}

result = dataTag_api.get_all_data_tags(opts)
pp result

Parameters

Name Type Description Notes
tag String Tag [optional]  
type String Type [optional]  
parent String ID of tag parent [optional]  
statement_code String Statement Code [optional]  
fs_template String Template [optional] [default to industrial]  
page_size Integer The number of results to return [optional] [default to 100]  
next_page String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseDataTags

get_data_tag_by_id

View Intrinio API Documentation

DataTag get_data_tag_by_id(identifier)

Lookup Data Tag

Returns the Data Tag with the given identifier

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

dataTag_api = Intrinio::DataTagApi.new
identifier = "marketcap"

result = dataTag_api.get_data_tag_by_id(identifier)
pp result

Parameters

Name Type Description Notes
identifier String The Intrinio ID or the code-name of the Data Tag  

Return type

DataTag

search_data_tags

View Intrinio API Documentation

ApiResponseDataTagsSearch search_data_tags(query, opts)

Search Data Tags

Searches for Data Tags matching the text query

Example

# Load the gem
require 'intrinio-sdk'
require 'pp'

# Setup authorization
Intrinio.configure do |config|
  config.api_key['api_key'] = 'YOUR_API_KEY'
  config.allow_retries = true
end

dataTag_api = Intrinio::DataTagApi.new
query = "revenue"

opts = {
  page_size: 100
}

result = dataTag_api.search_data_tags(query, opts)
pp result

Parameters

Name Type Description Notes
query String  
page_size Integer The number of results to return [optional] [default to 100]  

Return type

ApiResponseDataTagsSearch