matchbook

package module
v0.0.0-...-eff8453 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: MIT Imports: 10 Imported by: 0

README

go-matchbook

API access to Matchbook exchange from go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountDetails

type AccountDetails struct {
	Id       int         `json:"id"`
	Username string      `json:"username"`
	Name     NameDetails `json:"name"`
}

type AddressDetails

type AddressDetails struct {
}

type BaseResponse

type BaseResponse struct {
	Total   int `json:"total"`
	PerPage int `json:"per-page"`
	Offset  int `json:"offset"`
}

type Config

type Config struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

func (*Config) NewSession

func (c *Config) NewSession() (*Session, error)

Create a new session.

type Event

type Event struct {
	Id               int       `json:"id"`
	Name             string    `json:"name"`
	SportId          int       `json:"sport-id"`
	Start            time.Time `json:"start"`
	InRunningFlag    bool      `json:"in-running-flag"`
	AllowLiveBetting bool      `json:"allow-live-betting"`
	CategoryId       []int     `json:"category-id"`
	Status           string    `json:"status"`
	Volume           float32   `json:"volume"`
	Markets          []Market  `json:"markets"`
	MetaTags         []MetaTag `json:"meta-tags"`
}

type EventsResult

type EventsResult struct {
	BaseResponse
	Events []Event `json:"events"`
}

type LoginResponse

type LoginResponse struct {
	SessionToken string         `json:"session-token"`
	UserId       string         `json:"user-id"`
	Role         string         `json:"role"`
	Account      AccountDetails `json:"account"`
	Email        string         `json:"email"`
	PhoneNumber  string         `json:"phone-number"`
	Address      AddressDetails `json:"address"`
}

type Market

type Market struct {
	Live             bool      `json:"live"`
	EventId          int       `json:"event-id"`
	Id               int       `json:"id"`
	Name             string    `json:"name"`
	Runners          []Runner  `json:"runners"`
	Start            time.Time `json:"start"`
	InRunningFlag    bool      `json:"in-running-flag"`
	AllowLiveBetting bool      `json:"allow-live-betting"`
	Status           string    `json:"status"`
	MarketType       string    `json:"market-type"`
	Type             string    `json:"type"`
	Volume           float32   `json:"volume"`
	BackOverround    float32   `json:"back-overround"`
	LayOverround     float32   `json:"lay-overround"`
}

type MetaTag

type MetaTag struct {
	Id      int    `json:"id"`
	Name    string `json:"name"`
	Type    string `json:"type"`
	UrlName string `json:"url-names"`
}

type NameDetails

type NameDetails struct {
	FirstName string `json:"first"`
	LastName  string `json:"last"`
}

type PriceDetail

type PriceDetail struct {
	AvailableAmount float32 `json:"available-amount"`
	Currency        string  `json:"currency"`
	OddsType        string  `json:"odds-type"`
	Odds            float32 `json:"odds"`
	DecimalOdds     float32 `json:"decimal-odds"`
	Side            string  `json:"side"`
	ExchangeType    string  `json:"exchange-type"`
}

type RequestSpecification

type RequestSpecification struct {
	Url  string
	Type string
}

type Runner

type Runner struct {
	Prices             []PriceDetail `json:"prices"`
	EventId            int           `json:"event-id"`
	Id                 int           `json:"id"`
	MarketId           int           `json:"market-id"`
	Name               string        `json:"name"`
	Status             string        `json:"status"`
	Volume             float32       `json:"volume"`
	EventParticipantId int           `json:"event-participant-id"`
}

type Session

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

func (*Session) Login

func (s *Session) Login() ([]byte, error)

type Sport

type Sport struct {
	Name string `json:"name"`
	Type string `json:"type"`
	Id   int    `json:"id"`
}

type SportsResult

type SportsResult struct {
	BaseResponse
	Sports []Sport `json:"sports"`
}

Jump to

Keyboard shortcuts

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