Documentation ¶
Index ¶
- Constants
- Variables
- func DownloadIndex(opts IndexOpts, client *Client, f *os.File) (err error)
- func GetConcept(w io.Writer, client *Client, cik int, taxonomy Taxonomy, concept string) error
- func GetFacts(w io.Writer, client *Client, cik int) error
- func GetFrame(w io.Writer, client *Client, taxonomy Taxonomy, concept string, units string, ...) error
- func GetReport(w io.Writer, cik int, accessionNumber string, client *Client) (err error)
- type Client
- type EnumQuarter
- type IndexEntry
- type IndexOpts
- type Limiter
- type Period
- type RequestError
- type Taxonomy
Constants ¶
const ( TaxonomyGaap = "us-gaap" TaxonomyDei = "dei" TaxonomyIfrs = "ifrs-full" TaxonomySrt = "srt" )
Variables ¶
var AllQuarters = []EnumQuarter{FirstQuarter, SecondQuarter, ThirdQuarter, FourthQuarter}
Functions ¶
func DownloadIndex ¶
DownloadIndex downloads an index based on opts and writes the file to f. If the "Current" option is true, the index for the current quarter is downloaded. Otherwise, the Year and Quarter options are used.
func GetConcept ¶
GetConcept accesses the Company Concept endpoint. The resulting json file is written to w. Returns RequestError on non-200 status.
func GetFacts ¶
GetFacts accesses the Company Facts endpoint. The resulting json file is written to w. Returns RequestError on non-200 status.
func GetFrame ¶
func GetFrame(w io.Writer, client *Client, taxonomy Taxonomy, concept string, units string, period Period) error
GetFrame accesses the Frames endpoint. The resulting json file is written to w. Returns RequestError on non-200 status.
Types ¶
type EnumQuarter ¶
type EnumQuarter int
const ( FirstQuarter EnumQuarter = iota SecondQuarter ThirdQuarter FourthQuarter )
func (EnumQuarter) String ¶
func (q EnumQuarter) String() string
type IndexEntry ¶
type IndexEntry struct { FormType string CompanyName string CIK int DateFiled time.Time AccessionNumber string }
IndexEntry represents report found in the index.
func ProcessIndex ¶
func ProcessIndex(f *os.File) (entries []IndexEntry)
ProcessIndex reads the index file and generates a list of 10-K and 10-Q entries. The file is not closed after processing! It is the user's responsibility to close the file after processing is complete!
type IndexOpts ¶
type IndexOpts struct { Year int Quarter EnumQuarter Current bool }
type RequestError ¶
type RequestError struct {
StatusCode int
}
func (*RequestError) Error ¶
func (e *RequestError) Error() string