Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
hayashiki committed Aug 21, 2020
1 parent a7dd91b commit 8dad12c
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ func main() {
}
posts, resp, err := client.Posts.List(opts)
fmt.Printf("%+v", posts)
if err != nil {
return
}
fmt.Printf("resp: %+v, posts: %+v", posts)
}
```
Expand All @@ -59,10 +62,10 @@ post, resp, err := client.Posts.Create(&docbase.PostRequest{})
// Update the information about the post
post, resp, err := client.Posts.Update(1234567, &docbase.PostRequest{})

// Archive the post list
// Archive the post
resp, err := client.Posts.Archive(1234567)

// Unarchive the post list
// Unarchive the post
resp, err := client.Posts.Unarchive(1234567)


Expand All @@ -76,32 +79,42 @@ resp, err := client.Posts.Unarchive(1234567)
groups, resp, err := client.Groups.List(&docbase.GroupListOptions{})

// Get the information about the group detail
group, _, _ := client.Groups.Get(12345)
group, resp, err := client.Groups.Get(12345)

// Add the user to the group
resp, err := client.Groups.AddUser(12345, &docbase.GroupAddRequest{})
resp, err := client.GroupUsers.Create(12345, &docbase.GroupUserCreateRequest{})

// Remove the user to the group
resp, err := client.Groups.RemoveUser(17769, req)
resp, err := client.GroupUsers.Delete(12345, &docbase.GroupUserCreateRequest{})

```

# Tags
## Tags

``` go
// Get the information about the tag list
tags, resp, err := client.Tags.List()

```

# Users
## Users

``` go
// Get the information about the tag list
users, resp, err := client.Users.List(&docbase.UserListOptions{})

```

## Attachments

``` go
// Download an attachment
file, resp, err := client.Attachments.Download("8babf378-1234-5678-b62b-5a2a6c536b2b.png")

// Upload an attachment, select multiple files path
files, resp, err := client.Attachments.Upload([]string{"./testdata/test-image.jpg"})
```

# Note

[Here is the original full API.](https://help.docbase.io/posts/45703)
Expand Down

0 comments on commit 8dad12c

Please sign in to comment.