From dd3d4f1376f585a99d3a444725c52fe072d7b3c6 Mon Sep 17 00:00:00 2001 From: xcx Date: Tue, 7 Apr 2020 16:36:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/api/api.go b/api/api.go index ed91317..04595bb 100644 --- a/api/api.go +++ b/api/api.go @@ -48,6 +48,23 @@ func GroupCreate(r *GroupCreateReq) (*GroupCreateAns, error) { 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 { host := fmt.Sprintf("https://%s/%s/%s/%s", API_HOST, API_VERSION, servicename, command)