接口新增
This commit is contained in:
parent
7caa89c7a4
commit
dd3d4f1376
17
api/api.go
17
api/api.go
|
@ -48,6 +48,23 @@ func GroupCreate(r *GroupCreateReq) (*GroupCreateAns, error) {
|
||||||
return &a, err
|
return &a, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ProfileSetReq struct {
|
||||||
|
FromAccount string `json:"From_Account"`
|
||||||
|
ProfileItem []*ProfileSetReqItem `json:"ProfileItem"`
|
||||||
|
}
|
||||||
|
type ProfileSetReqItem struct {
|
||||||
|
Tag string `json:"tag"`
|
||||||
|
Value interface{} `json:"value"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ProfileSetAns struct{}
|
||||||
|
|
||||||
|
func ProfileSet(r *ProfileSetReq) (*ProfileSetAns, error) {
|
||||||
|
a := ProfileSetAns{}
|
||||||
|
err := Api("profile", "portrait_set", r, &a)
|
||||||
|
return &a, err
|
||||||
|
}
|
||||||
|
|
||||||
func Api(servicename, command string, in, out interface{}) error {
|
func Api(servicename, command string, in, out interface{}) error {
|
||||||
host := fmt.Sprintf("https://%s/%s/%s/%s", API_HOST, API_VERSION, servicename, command)
|
host := fmt.Sprintf("https://%s/%s/%s/%s", API_HOST, API_VERSION, servicename, command)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue