Skip to content

Commit

Permalink
fix service contact
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaomingqiang committed Mar 16, 2021
1 parent bf68a7f commit e47cc2e
Show file tree
Hide file tree
Showing 7 changed files with 1,102 additions and 441 deletions.
19 changes: 5 additions & 14 deletions sample/api/contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ import (
var contactService = contact.NewService(configs.TestConfig(constants.DomainFeiShu))

func main() {
testUserServiceList()
testDepartmentServiceUpdate()
//testUserServiceList()
testDepartmentServiceList()
}
func testUserServiceList() {

coreCtx := core.WrapContext(context.Background())
reqCall := contactService.Users.List(coreCtx)
reqCall.SetDepartmentIdType("open_id")
Expand All @@ -40,21 +39,13 @@ func testUserServiceList() {
fmt.Printf("reault:%s", tools.Prettify(result))
}

func testDepartmentServiceUpdate() {
func testDepartmentServiceList() {
coreCtx := core.WrapContext(context.Background())
updateBody := &contact.Department{
Name: "xxxxx",
ParentDepartmentId: "od_xxxxxx",
LeaderUserId: "ou-xxxxxxx",
Order: 666,
CreateGroupChat: false,
}
reqCall := contactService.Departments.Create(coreCtx, updateBody)
reqCall := contactService.Departments.List(coreCtx)
reqCall.SetDepartmentIdType("open_department_id")
reqCall.SetUserIdType("open_id")
reqCall.SetClientToken("xxxxxxx")
result, err := reqCall.Do()
fmt.Printf("request_id:%s", coreCtx.GetRequestID())
fmt.Printf("request_id:%s\n", coreCtx.GetRequestID())
fmt.Printf("http status code:%d", coreCtx.GetHTTPStatusCode())
if err != nil {
e := err.(*response.Error)
Expand Down
172 changes: 86 additions & 86 deletions service/calendar/v4/model.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions service/contact/v3/api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e47cc2e

Please sign in to comment.