Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct { // Api setting, see Config struct. Config Config // contains filtered or unexported fields }
Api denotes the Yapla API client session.
func NewSession ¶
NewSession create a named client connection with Yapla v2.0 API Authenticate admin Yapla and set Session token You can pass optional configuration options with Config struct:
y := yappla.NewSession( "xxxxxxxxxxxxxxx" fiber.Config{ URL: "https://s2.yapla.com/api/2", Timeout: time.Second * 30, }, )
func (*Api) LoginContact ¶
LoginContact login to your Yapla account Using for access to all informations about this contact
type Config ¶
type Config struct { // Base URL to target API server. // // Default: "https://s1.yapla.com/api/2" URL string // The maximum amount of time to wait for the end of the request. // // Default: time.Second * 10 Timeout time.Duration }
Config is a struct holding the api setting.
type Reply ¶
type Reply struct { // Status of actual request // // Success = true Result bool `json:"result"` // Due to inconsistent data structure, this is a map of interface // // Success response can be ... anything // Data: { // string: string/[]interface{}, // } // // Error response are "consistent" // Data: { // "code": 524, // "type": "error_bad_login_pawssord", // "message": "Error's message", // } // // Can be string or sub map Data map[string]interface{} `json:"data"` }
Reply is a struct holding the api response
Click to show internal directories.
Click to hide internal directories.