Documentation ¶
Overview ¶
Package company provides functionality for interacting with company data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeneralSearch ¶
type GeneralSearch []struct { Symbol string `json:"symbol"` Name string `json:"name"` Currency string `json:"currency"` StockExchange string `json:"stockExchange"` ExchangeShortName string `json:"exchangeShortName"` }
GeneralSearch represents the response structure for a general search query. @see https://site.financialmodelingprep.com/developer/docs/stock-ticker-symbol-lookup-api
type NameSearch ¶
type NameSearch []struct { Symbol string `json:"symbol"` Name string `json:"name"` Currency string `json:"currency"` StockExchange string `json:"stockExchange"` ExchangeShortName string `json:"exchangeShortName"` }
NameSearch represents the response structure for a search by name query. @see https://site.financialmodelingprep.com/developer/docs/name-search-company-search
type Repository ¶
type Repository struct {
HTTPClient api.ClientInterface
}
Repository represents a repository for interacting with API company search endpoints
func (*Repository) Search ¶
func (repository *Repository) Search(query Query) (*GeneralSearch, error)
Search performs a search for companies based on the provided query data.
func (*Repository) SearchByName ¶
func (repository *Repository) SearchByName(query Query) (*NameSearch, error)
SearchByName performs a search for a company based on the provided ticker symbol.
func (*Repository) SearchByTicker ¶
func (repository *Repository) SearchByTicker(query Query) (*TickerSearch, error)
SearchByTicker performs a search for a company based on the provided ticker symbol.
type Search ¶
type Search interface { GeneralSearch | TickerSearch | NameSearch }
Search interface for a common response structures Symbol: represents the symbol of the company. Name: represents the name of the company. Currency: represents the currency that use the company. StockExchange: represents the company stock exchange. ExchangeShortName: represents the short name of the company exchange.
type TickerSearch ¶
type TickerSearch []struct { Symbol string `json:"symbol"` Name string `json:"name"` Currency string `json:"currency"` StockExchange string `json:"stockExchange"` ExchangeShortName string `json:"exchangeShortName"` }
TickerSearch represents the response structure for a search by ticker query. @see https://site.financialmodelingprep.com/developer/docs/ticker-search-company-search