Intrinio::MunicipalityApi
All URIs are relative to https://api-v2.intrinio.com
Method | HTTP request | Description |
---|---|---|
get_all_municipalities | GET /municipalities | All Municipalities |
get_municipality_by_id | GET /municipalities/id | Municipality by ID |
get_municipality_financials | GET /municipalities/id/financials | Financials for a Municipality |
get_all_municipalities
View Intrinio API Documentation
ApiResponseMunicipalities get_all_municipalities(opts)
All Municipalities
Returns all Municipalities. When parameters are specified, returns matching municipalities.
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
municipality_api = Intrinio::MunicipalityApi.new
opts = {
has_financials: nil,
government_name: nil,
government_type: nil,
area_name: nil,
area_type: nil,
city: nil,
state: nil,
zipcode: nil,
population_greater_than: nil,
population_less_than: nil,
enrollment_greater_than: nil,
enrollment_less_than: nil,
next_page: nil
}
result = municipality_api.get_all_municipalities(opts)
pp result
Parameters
Name | Type | Description | Notes |
---|---|---|---|
has_financials | BOOLEAN | Return municipalities with financials | [optional] |
government_name | String | Return municipalities with a government name matching the given query | [optional] |
government_type | String | Return municipalities with the given government type | [optional] |
area_name | String | Return municipalities with an area name matching the given query | [optional] |
area_type | String | Return municipalities with the given area type | [optional] |
city | String | Return municipalities in the given city | [optional] |
state | String | Return municipalities in the given state | [optional] |
zipcode | Float | Return municipalities in the given zipcode | [optional] |
population_greater_than | Float | Return municipalities with a population greater than the given number | [optional] |
population_less_than | Float | Return municipalities with a population less than the given number | [optional] |
enrollment_greater_than | Float | Return municipalities with an enrollment greater than the given number | [optional] |
enrollment_less_than | Float | Return municipalities with an enrollment less than the given number | [optional] |
next_page | String | Gets the next page of data from a previous API call | [optional] |
Return type
get_municipality_by_id
View Intrinio API Documentation
Municipality get_municipality_by_id(id)
Municipality by ID
Returns the Municipality with the given ID
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
municipality_api = Intrinio::MunicipalityApi.new
id = "mun_Xn7x4z"
result = municipality_api.get_municipality_by_id(id)
pp result
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | String | An Intrinio ID of a Municipality |
Return type
get_municipality_financials
View Intrinio API Documentation
ApiResponseMunicipalitiyFinancials get_municipality_financials(id, opts)
Financials for a Municipality
Returns financial statement data for the Municipality with the given ID
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
municipality_api = Intrinio::MunicipalityApi.new
id = "mun_Xn7x4z"
opts = {
fiscal_year: 2017
}
result = municipality_api.get_municipality_financials(id, opts)
pp result
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | String | An Intrinio ID of a Municipality | |
fiscal_year | Float | Return financials for the given fiscal year | [optional] |