parent
ddfe825b01
commit
40776f4c03
13
yapla.go
13
yapla.go
|
@ -44,7 +44,7 @@ type token struct {
|
||||||
type Reply struct {
|
type Reply struct {
|
||||||
// Status of actual request
|
// Status of actual request
|
||||||
//
|
//
|
||||||
// Sucess = true
|
// Success = true
|
||||||
Result bool `json:"result"`
|
Result bool `json:"result"`
|
||||||
|
|
||||||
// Due to inconsistent data structure, this is a map of interface
|
// Due to inconsistent data structure, this is a map of interface
|
||||||
|
@ -65,15 +65,13 @@ type Reply struct {
|
||||||
Data map[string]interface{} `json:"data"`
|
Data map[string]interface{} `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoginMember
|
// LoginMember login to your Yapla account
|
||||||
// Login to your Yapla account
|
|
||||||
// Using for access to all informations about this member
|
// Using for access to all informations about this member
|
||||||
func (api *Api) LoginMember(login, password string) (Reply, error) {
|
func (api *Api) LoginMember(login, password string) (Reply, error) {
|
||||||
return api.login("/member/login", login, password)
|
return api.login("/member/login", login, password)
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoginContact
|
// LoginContact login to your Yapla account
|
||||||
// login to your Yapla account
|
|
||||||
// Using for access to all informations about this contact
|
// Using for access to all informations about this contact
|
||||||
func (api *Api) LoginContact(login, password string) (Reply, error) {
|
func (api *Api) LoginContact(login, password string) (Reply, error) {
|
||||||
return api.login("/contact/login", login, password)
|
return api.login("/contact/login", login, password)
|
||||||
|
@ -127,9 +125,8 @@ func (api *Api) renewToken() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSession
|
// NewSession create a named client connection with Yapla v2.0 API
|
||||||
// Create a named client connection with Yapla v2.0 API
|
// Authenticate admin Yapla and set Session token
|
||||||
// Authenticate admin Yapla and get Session token
|
|
||||||
// You can pass optional configuration options with Config struct:
|
// You can pass optional configuration options with Config struct:
|
||||||
// y := yappla.NewSession(
|
// y := yappla.NewSession(
|
||||||
// "xxxxxxxxxxxxxxx"
|
// "xxxxxxxxxxxxxxx"
|
||||||
|
|
Loading…
Reference in New Issue