Documentation ¶
Index ¶
- Variables
- type Category
- type Client
- func (c *Client) Authorize(code, redirectUri string) (err error)
- func (c *Client) Delete(path string, params map[string]string) ([]byte, error)
- func (c *Client) Get(path string, params map[string]string) ([]byte, error)
- func (c *Client) GetAuthUrl(redirectUri, authUrl string) (authUri string, err error)
- func (c *Client) Post(path string, body interface{}, params map[string]string) ([]byte, error)
- func (c *Client) Put(path string, body interface{}, params map[string]string) ([]byte, error)
- func (c *Client) RefreshAccessToken() (err error)
- type Image
- type MLError
- type MLToken
- type Product
- type Status
Constants ¶
This section is empty.
Variables ¶
View Source
var (
AuthUrls = map[string]string{
"MLA": "https://auth.mercadolibre.com.ar",
"MLB": "https://auth.mercadolivre.com.br",
"MCO": "https://auth.mercadolibre.com.co",
"MCR": "https://auth.mercadolibre.com.cr",
"MEC": "https://auth.mercadolibre.com.ec",
"MLC": "https://auth.mercadolibre.cl",
"MLM": "https://auth.mercadolibre.com.mx",
"MLU": "https://auth.mercadolibre.com.uy",
"MLV": "https://auth.mercadolibre.com.ve",
"MPA": "https://auth.mercadolibre.com.pa",
"MPE": "https://auth.mercadolibre.com.pe",
"MPT": "https://auth.mercadolibre.com.pt",
"MRD": "https://auth.mercadolibre.com.do",
}
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { GrantType string `json:"grant_type,omitempty"` Code string `json:"code"` ClientID int `json:"client_id"` ClientSecret string `json:"client_secret"` RedirectUri string `json:"redirect_uri"` MLToken MLToken }
Client struct
func NewWithAccessToken ¶
NewWithAccessToken
func (*Client) GetAuthUrl ¶
getAuthUrl
func (*Client) RefreshAccessToken ¶
RefreshAccessToken
type MLError ¶
type MLError struct { Message string `json:"message"` Error string `json:"error"` Status int `json:"status"` }
MLError struct
type MLToken ¶
type MLToken struct { AccessToken string `json:"access_token,omitempty"` TokenType string `json:"token_type,omitempty"` ExpiresIn int `json:"expires_in,omitempty"` Scope string `json:"scope,omitempty"` UserId int `json:"user_id,omitempty"` RefreshToken string `json:"refresh_token,omitempty"` }
MLToken struct
type Product ¶
type Product struct { ID string `json:"id,omitempty"` ListingTypeID string `json:"listing_type_id"` Title string `json:"title"` Description string `json:"description"` CategoryID string `json:"category_id"` BuyingMode string `json:"buying_mode"` CurrencyID string `json:"currency_id"` Condition string `json:"condition"` Price float32 `json:"price"` AvailableQuantity int32 `json:"available_quantity"` Pictures []Image `json:"pictures"` }
Product struct
Click to show internal directories.
Click to hide internal directories.