edinet

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Base            string = "https://disclosure.edinet-fsa.go.jp/api/"
	SubscriptionKey string = "Subscription-Key"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(i *do.Injector) (*Client, error)

func (*Client) RequestDocument

func (c *Client) RequestDocument(docId core.DocumentId, fileType FileType) (DocumentFile, error)

func (*Client) RequestDocuments added in v0.0.5

func (c *Client) RequestDocuments(date core.Date, requestType RequestType) (EdinetDocumentResponse, error)

func (*Client) URL

func (c *Client) URL() *url.URL

type DocumentFile added in v0.0.3

type DocumentFile struct {
	Name        string
	Extension   string
	DocumentId  string
	ContentType string
	Content     []byte
}

func (*DocumentFile) NameWithExtension added in v0.0.3

func (f *DocumentFile) NameWithExtension() string

type DocumentListRequestParameter

type DocumentListRequestParameter struct {
	FileDate core.Date
	Type     RequestType
}

type EdinetDocumentResponse added in v0.0.2

type EdinetDocumentResponse struct {
	Metadata Metadata `json:"metadata,omitempty"`
	Results  []Result `json:"results,omitempty"`
}

type EdinetResponses added in v0.0.2

type EdinetResponses struct {
	Items []EdinetDocumentResponse `json:"items"`
}

EdinetResponses must be generated struct "EdinetDocumentResponse" gen_edinet_response.go

type FileType

type FileType int
const (
	Unknown FileType = iota
	XBRL
	PDF
	AlternativeDoc
	EnglishDoc
	CSV
	ALL
)

func AllFileType added in v0.0.5

func AllFileType() []FileType

func NewFileTypeByName

func NewFileTypeByName(name string) FileType

func (FileType) String

func (f FileType) String() string

type HttpClient

type HttpClient struct {
	// contains filtered or unexported fields
}

func NewHttpClient

func NewHttpClient() *HttpClient

func (*HttpClient) DecodeByte

func (r *HttpClient) DecodeByte(resp *http.Response) ([]byte, error)

func (*HttpClient) DecodeJsonBody

func (r *HttpClient) DecodeJsonBody(resp *http.Response, out interface{}) error

func (*HttpClient) ExecuteGetJsonWithDecodeString

func (r *HttpClient) ExecuteGetJsonWithDecodeString(
	ctx context.Context,
	url *url.URL,
) (responseBody string, statusCode int, err error)

func (*HttpClient) ExecuteGetWithDecodeJson

func (r *HttpClient) ExecuteGetWithDecodeJson(
	ctx context.Context,
	u *url.URL,
	out interface{},
) (statusCode int, err error)

func (*HttpClient) NewRequest

func (r *HttpClient) NewRequest(
	ctx context.Context,
	method string,
	u *url.URL,
	contentType string,
	body io.Reader,
) (*http.Request, error)

type Metadata

type Metadata struct {
	Message         string    `json:"message,omitempty"`
	Parameter       Parameter `json:"parameter,omitempty"`
	ProcessDateTime string    `json:"processDateTime,omitempty"`
	Resultset       Resultset `json:"resultset,omitempty"`
	Status          string    `json:"status,omitempty"`
	Title           string    `json:"title,omitempty"`
}

type Parameter

type Parameter struct {
	Date string `json:"date,omitempty"`
	Type string `json:"type,omitempty"`
}

type RequestType

type RequestType int
const (
	MetaDataOnly RequestType = iota + 1
	MetaDataAndDocuments
)

func (RequestType) String

func (r RequestType) String() string

type Result

type Result struct {
	AttachDocFlag        string `json:"attachDocFlag,omitempty"`
	CsvFlag              string `json:"csvFlag,omitempty"`
	CurrentReportReason  string `json:"currentReportReason,omitempty"`
	DisclosureStatus     string `json:"disclosureStatus,omitempty"`
	DocDescription       string `json:"docDescription,omitempty"`
	DocID                string `json:"docID,omitempty"`
	DocInfoEditStatus    string `json:"docInfoEditStatus,omitempty"`
	DocTypeCode          string `json:"docTypeCode,omitempty"`
	EdinetCode           string `json:"edinetCode,omitempty"`
	EnglishDocFlag       string `json:"englishDocFlag,omitempty"`
	FilerName            string `json:"filerName,omitempty"`
	FormCode             string `json:"formCode,omitempty"`
	FundCode             string `json:"fundCode,omitempty"`
	IssuerEdinetCode     string `json:"issuerEdinetCode,omitempty"`
	Jcn                  string `json:"JCN,omitempty"`
	LegalStatus          string `json:"legalStatus,omitempty"`
	OpeDateTime          string `json:"opeDateTime,omitempty"`
	OrdinanceCode        string `json:"ordinanceCode,omitempty"`
	ParentDocID          string `json:"parentDocID,omitempty"`
	PdfFlag              string `json:"pdfFlag,omitempty"`
	PeriodEnd            string `json:"periodEnd,omitempty"`
	PeriodStart          string `json:"periodStart,omitempty"`
	SecCode              string `json:"secCode,omitempty"`
	SeqNumber            int    `json:"seqNumber,omitempty"`
	SubjectEdinetCode    string `json:"subjectEdinetCode,omitempty"`
	SubmitDateTime       string `json:"submitDateTime,omitempty"`
	SubsidiaryEdinetCode string `json:"subsidiaryEdinetCode,omitempty"`
	WithdrawalStatus     string `json:"withdrawalStatus,omitempty"`
	XbrlFlag             string `json:"xbrlFlag,omitempty"`
}

type Resultset

type Resultset struct {
	Count int `json:"count,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL