Documentation
¶
Index ¶
Constants ¶
View Source
const APIURL = "https://www.calcbench.com"
APIURL the base API URL for CalcBench API
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CalcBench ¶
CalcBench is the CalcBench API
func (CalcBench) Login ¶
Login authenticates the API using https://www.calcbench.com/api#authentication
func (CalcBench) StandardizedData ¶
func (c CalcBench) StandardizedData(Query StandardizedDataRequest) (StandardizedDataResponse, error)
StandardizedData calls https://www.calcbench.com/api#normalizedData
type CompaniesParameters ¶
type CompaniesParameters struct {
CompanyIdentifiers []string `json:"companyIdentifiers"`
EntireUniverse bool `json:"entireUniverse,omitempty"`
}
CompaniesParameters specifies the companies to include
type PeriodParameters ¶
type PeriodParameters struct {
Year int32 `json:"year"`
Period int8 `json:"period"`
EndYear int `json:"endYear,omitempty"`
EndPeriod int `json:"endPeriod"`
AllHistory bool `json:"allHistory,omitempty"`
UpdateDate string `json:"updateDate,omitempty"`
}
PeriodParameters specifies the periods to include
type StandardizedDataPageParameters ¶
type StandardizedDataPageParameters struct {
Metrics []string `json:"metrics"`
}
StandardizedDataPageParameters specifies the metrics to search for
type StandardizedDataRequest ¶
type StandardizedDataRequest struct {
CompaniesParameters CompaniesParameters `json:"companiesParameters"`
PeriodParameters PeriodParameters `json:"periodParameters"`
PageParameters StandardizedDataPageParameters `json:"pageParameters"`
}
StandardizedDataRequest for comparisons between companies
type StandardizedDataResponse ¶
type StandardizedDataResponse []StandardizedDataResponseObject
StandardizedDataResponse is a slice of StandardizedDataResponseObject
type StandardizedDataResponseObject ¶
type StandardizedDataResponseObject struct {
Ticker string `json:"ticker"`
CalendarYear int `json:"calendar_year"`
CalendarPeriod int `json:"calendar_period"`
Metric string `json:"metric"`
Value interface{} `json:"value"`
}
StandardizedDataResponseObject result object
Click to show internal directories.
Click to hide internal directories.