kiwitaxi

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2017 License: MIT Imports: 8 Imported by: 0

README

go-kiwitaxi-api

Golang implementation KiwiTaxi API.

GoDoc

This package implements the API partner for the service of the order of transfers across the world - kiwitaxi.

Installation

go get github.com/liderman/go-kiwitaxi-api

Usage

Getting places:

kiwitaxiApi := kiwitaxi.NewKiwitaxiApi("TOKEN")
places, err := kiwitaxiApi.Places()

Requirements

  • Need at least go1.5 or newer.

Documentation

You can read package documentation here.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Country

type Country struct {
	Id         int    `csv:"id" json:"id" bson:"id"`
	Iata       string `csv:"iata" json:"iata" bson:"iata"`
	Published  int    `csv:"published" json:"published" bson:"published"`
	NameEn     string `csv:"name_en" json:"name_en" bson:"name_en"`
	NameRu     string `csv:"name_ru" json:"name_ru" bson:"name_ru"`
	CurrencyId int    `csv:"currency_id" json:"currency_id" bson:"currency_id"`
	TimeZone   string `csv:"time_zone" json:"time_zone" bson:"time_zone"`
}

type Currency

type Currency struct {
	Id   int    `csv:"id" json:"id" bson:"id"`
	Code string `csv:"code" json:"code" bson:"code"`
	Iso  int    `csv:"iso" json:"iso" bson:"iso"`
}

type FixerReader

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

func NewFixerReader

func NewFixerReader(r io.Reader) *FixerReader

func (*FixerReader) Read

func (f *FixerReader) Read(p []byte) (n int, err error)

type KiwitaxiApi

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

func NewKiwitaxiApi

func NewKiwitaxiApi(token string) *KiwitaxiApi

NewKiwitaxiApi creates a new instance KiwitaxiApi.

func (*KiwitaxiApi) Countries

func (a *KiwitaxiApi) Countries() (countries []*Country, err error)

func (*KiwitaxiApi) Currencies

func (a *KiwitaxiApi) Currencies() (currencies []*Currency, err error)

func (*KiwitaxiApi) PlaceTypes

func (a *KiwitaxiApi) PlaceTypes() (placeTypes []*PlaceType, err error)

func (*KiwitaxiApi) Places

func (a *KiwitaxiApi) Places() (places []*Place, err error)

func (*KiwitaxiApi) Regions

func (a *KiwitaxiApi) Regions() (regions []*Region, err error)

func (*KiwitaxiApi) Routes

func (a *KiwitaxiApi) Routes() (routes []*Route, err error)

func (*KiwitaxiApi) SetLogger

func (a *KiwitaxiApi) SetLogger(logger LoggerInterface)

func (*KiwitaxiApi) TransferTypes

func (a *KiwitaxiApi) TransferTypes() (transferTypes []*TransferType, err error)

func (*KiwitaxiApi) Transfers

func (a *KiwitaxiApi) Transfers(paymentType string) (transfers []*Transfer, err error)

func (*KiwitaxiApi) UrlDomains

func (a *KiwitaxiApi) UrlDomains() (urlDomains []*UrlDomain, err error)

type LoggerInterface

type LoggerInterface interface {
	Debug(...interface{})
}

type Place

type Place struct {
	Id           int    `csv:"id" json:"id" bson:"id"`
	CountryId    int    `csv:"country_id" json:"country_id" bson:"country_id"`
	RegionId     int    `csv:"region_id" json:"region_id" bson:"region_id"`
	TypeId       int    `csv:"type_id" json:"type_id" bson:"type_id"`
	NameEn       string `csv:"name_en" json:"name_en" bson:"name_en"`
	NameRu       string `csv:"name_ru" json:"name_ru" bson:"name_ru"`
	Iata         string `csv:"iata" json:"iata" bson:"iata"`
	PlacePolygon string `csv:"place_polygon" json:"place_polygon" bson:"place_polygon"`
}

type PlaceType

type PlaceType struct {
	Id     int    `csv:"id" json:"id" bson:"id"`
	NameEn string `csv:"name_en" json:"name_en" bson:"name_en"`
	NameRu string `csv:"name_ru" json:"name_ru" bson:"name_ru"`
}

type Region

type Region struct {
	Id        int    `csv:"id" json:"id" bson:"id"`
	CountryId int    `csv:"country_id" json:"country_id" bson:"country_id"`
	NameEn    string `csv:"name_en" json:"name_en" bson:"name_en"`
	NameRu    string `csv:"name_ru" json:"name_ru" bson:"name_ru"`
}

type Route

type Route struct {
	Id          int     `csv:"id" json:"id" bson:"id"`
	CountryId   int     `csv:"country_id" json:"country_id" bson:"country_id"`
	PlaceFromId int     `csv:"place_from_id" json:"place_from_id" bson:"place_from_id"`
	PlaceToId   int     `csv:"place_to_id" json:"place_to_id" bson:"place_to_id"`
	Distance    int     `csv:"distance" json:"distance" bson:"distance"`
	Timeinway   int     `csv:"timeinway" json:"timeinway" bson:"timeinway"`
	Weight      float64 `csv:"weight" json:"weight" bson:"weight"`
	Url         string  `csv:"url" json:"url" bson:"url"`
}

type Transfer

type Transfer struct {
	Id       int     `csv:"id" json:"id" bson:"id"`
	RouteId  int     `csv:"route_id" json:"route_id" bson:"route_id"`
	TypeId   int     `csv:"type_id" json:"type_id" bson:"type_id"`
	PriceRub float64 `csv:"price_rub" json:"price_rub" bson:"price_rub"`
	PriceEur float64 `csv:"price_eur" json:"price_eur" bson:"price_eur"`
	PriceUsd float64 `csv:"price_usd" json:"price_usd" bson:"price_usd"`
	Url      string  `csv:"url" json:"url" bson:"url"`
}

type TransferType

type TransferType struct {
	Id            int    `csv:"id" json:"id" bson:"id"`
	NameEn        string `csv:"name_en" json:"name_en" bson:"name_en"`
	NameRu        string `csv:"name_ru" json:"name_ru" bson:"name_ru"`
	Pax           int    `csv:"pax" json:"pax" bson:"pax"`
	Baggage       int    `csv:"baggage" json:"baggage" bson:"baggage"`
	DescriptionEn string `csv:"description_en" json:"description_en" bson:"description_en"`
	DescriptionRu string `csv:"description_ru" json:"description_ru" bson:"description_ru"`
	Photo         string `csv:"photo" json:"photo" bson:"photo"`
	Sortno        int    `csv:"sortno" json:"sortno" bson:"sortno"`
}

type UrlDomain

type UrlDomain struct {
	Id     int    `csv:"id" json:"id" bson:"id"`
	Locale string `csv:"locale" json:"locale" bson:"locale"`
	Value  string `csv:"value" json:"value" bson:"value"`
}

Jump to

Keyboard shortcuts

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