lazada

package module
v0.0.0-...-127dba3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

README

go-lazada

port lazada open api with golfing

Documentation

Index

Constants

View Source
const (
	Version = "lazop-sdk-go-20180830"

	ApiGatewaySG = "https://api.lazada.sg/rest"
	ApiGatewayMY = "https://api.lazada.com.my/rest"
	ApiGatewayVN = "https://api.lazada.vn/rest"
	ApiGatewayTH = "https://api.lazada.co.th/rest"
	ApiGatewayPH = "https://api.lazada.com.ph/rest"
	ApiGatewayID = "https://api.lazada.co.id/rest"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

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

func NewRequest

func NewRequest(apiKey, secret, serverUrl string) *Request

func (*Request) AccessToken

func (r *Request) AccessToken(accessToken string) *Request

func (*Request) AddApiParam

func (r *Request) AddApiParam(key string, val string) *Request

func (*Request) AddFileParam

func (r *Request) AddFileParam(key string, val []byte) *Request

func (*Request) ApiPath

func (r *Request) ApiPath(path string) *Request

func (*Request) Debug

func (r *Request) Debug(enableDebug bool) *Request

func (*Request) Do

func (r *Request) Do() (*Response, error)

Do sends the request though http.request and collect the response

func (*Request) Method

func (r *Request) Method(method string) *Request

type Response

type Response struct {
	Code      string          `json:"code"`
	Type      string          `json:"type"`
	Message   string          `json:"message"`
	RequestId string          `json:"request_id"`
	Data      json.RawMessage `json:"data"`
}

Jump to

Keyboard shortcuts

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