Go client library for Nulab Backlog API
- You can request each API endpoint using the Backlog API client created from the API base URL and token.
- Converts API responses to idiomatic Go structs.
- Structs are provided for all API endpoints and responses.
- Go >= 1.23
go get github.com/nattokin/go-backlog
c, err := backlog.NewClient(
os.Getenv("BACKLOG_BASE_URL"),
os.Getenv("BACKLOG_TOKEN"),
)
// Get all Wiki pages in a project.
wikis, err := c.Wiki.All(context.Background(), "MYPROJECT")
// Filter by keyword using an option.
wikis, err = c.Wiki.All(context.Background(), "MYPROJECT",
c.Wiki.Option.WithKeyword("design"),
)More examples can be found in the examples/ directory and on pkg.go.dev.
Client.Space.Activity
- Get Recent Updates - Returns recent updates in the space.
Client.Space.Attachment
- Post Attachment File - Posts an attachment file for issue or wiki, and returns its ID.
Client.User
- Get User List - Returns a list of users in your space.
- Get User - Returns information about a specific user.
- Add User - Adds new user to the space. "Project Administrator" cannot add "Admin" user. You can't use this API at
backlog.comspace. - Update User - Updates information about a user (Note: Not available at backlog.com).
- Delete User - Deletes a user from the space (Note: Not available at backlog.com).
- Get Own User - Returns information about the currently authenticated user.
Client.User.Activity
- Get User Recent Updates - Returns a user's recent updates.
Client.Project
- Get Project List - Returns a list of projects.
- Add Project - Adds a new project.
- Get Project - Returns information about a project.
- Update Project - Updates information about project.
- Delete Project - Deletes a project.
Client.Project.Activity
- Get Project Recent Updates - Returns recent updates in the project.
Client.Project.User
- Add Project User - Adds a user to the list of project members.
- Get Project User List - Returns a list of project members.
- Delete Project User - Removes a user from the list of project members.
- Add Project Administrator - Adds the Project Administrator role to a user.
- Get List of Project Administrators - Returns a list of users with the Project Administrator role.
- Delete Project Administrator - Removes the Project Administrator role from a user.
Client.Wiki
- Get Wiki Page List - Returns a list of Wiki pages.
- Get Wiki Page Tag List - Returns a list of tags used in the project.
- Count Wiki Page - Returns the number of Wiki pages.
- Get Wiki Page - Returns information about a Wiki page.
- Add Wiki Page - Adds a new Wiki page.
- Delete Wiki Page - Deletes a Wiki page.
Client.Wiki.Attachment
- Get List of Wiki attachments - Gets a list of files attached to a Wiki.
- Attach File to Wiki - Attaches file to Wiki
- Remove Wiki Attachment - Removes files attached to a Wiki.
The license of this project is MIT license.