data_scope

package
v0.0.0-...-eb01247 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Init provides setup for interacting with Reuters/Refinitiv DATA_SCOPE_USERNAME and DATA_SCOPE_PASSWORD credentials must be provided in ENV Saves access token for future requests.

TODO: Handle Token expiration

Types

type ExtractRequest

type ExtractRequest struct {
	ReqType    RequestType
	Fields     []string
	IdType     IdentifierType
	Identifier string
	Condition  map[string]string
	Status     RequestStatus
	Location   string
	Result     []byte
}

func (*ExtractRequest) CheckResult

func (er *ExtractRequest) CheckResult()

CheckResult tries to retrieve the result of an extraction request Result is saved in the ExtractRequest

func (*ExtractRequest) Extract

func (er *ExtractRequest) Extract()

Extract sends an extract:on request to Reuters(Refinitiv) Returns location, status and body. Location is the URL which must be polled to retrieve the etraction result.

func (*ExtractRequest) TypeString

func (er *ExtractRequest) TypeString() string

type IdentifierType

type IdentifierType int
const (
	RIC IdentifierType = iota
	ISIN
)

type LoginResponse

type LoginResponse struct {
	Context string `json:"@odata.context"`
	Token   string `json:"value"`
}

type RequestStatus

type RequestStatus int
const (
	INIT RequestStatus = iota
	IN_PROGRESS
	COMPLETED
	FAILED
)

type RequestType

type RequestType int
const (
	COMPOSITE RequestType = iota
	TECHNICAL_INDICATORS
	TIMESERIES
	INTRADAY_PRICING
)

Jump to

Keyboard shortcuts

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