client

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	V2IssuesPath      = "/api/v2/issues"
	V2IssuesCountPath = "/api/v2/issues/count"
)
View Source
const (
	V2SpacePath             = "/api/v2/space"
	V2SpaceActivitiesPath   = "/api/v2/space/activities"
	V2SpaceImagePath        = "/api/v2/space/image"
	V2SpaceNotificationPath = "/api/v2/space/notification"
	V2SpaceDiskUsagePath    = "/api/v2/space/diskUsage"
	V2SpaceAttachmentPath   = "/api/v2/space/attachment"
)
View Source
const (
	V2NotificationsPath = "/api/v2/notifications"
)
View Source
const (
	V2PrioritiesPath = "/api/v2/priorities"
)
View Source
const (
	V2ProjectsPath = "/api/v2/projects"
)
View Source
const (
	V2UsersPath = "/api/v2/users"
)
View Source
const (
	V2WikisPath = "/api/v2/wikis"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides API access.

func New added in v0.1.0

func New(space, token string) (*Client, error)

func (*Client) AddIssue

func (c *Client) AddIssue(issue *Issue, notifiedUsers []*User) (*Issue, error)

AddIssue adds new issue.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/add-issue/#add-issue

func (*Client) AddIssueContext

func (c *Client) AddIssueContext(ctx context.Context, issue *Issue, notifiedUsers []*User) (*Issue, error)

AddIssueContext accepts context.

func (*Client) AddPullRequest

func (c *Client) AddPullRequest(pullRequest *PullRequest, notifiedUsers []*User) (*PullRequest, error)

AddPullRequest Adds pull requests.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/add-pull-request/#add-pull-request

func (*Client) AddPullRequestContext

func (c *Client) AddPullRequestContext(ctx context.Context, pullRequest *PullRequest, notifiedUsers []*User) (*PullRequest, error)

AddPullRequestContext accepts context.

func (*Client) DeleteIssue

func (c *Client) DeleteIssue(issueKeyOrId string) (*Issue, error)

DeleteIssue deletes issue.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/delete-issue/#delete-issue

func (*Client) DeleteIssueContext

func (c *Client) DeleteIssueContext(ctx context.Context, issueKeyOrId string) (*Issue, error)

DeleteIssueContext accepts context.

func (*Client) GetAllIssues added in v0.2.0

func (c *Client) GetAllIssues() ([]*Issue, error)

GetAllIssues returns all issues.

func (*Client) GetAllIssuesContext added in v0.2.0

func (c *Client) GetAllIssuesContext(ctx context.Context) ([]*Issue, error)

GetAllIssuesContext accepts context.

func (*Client) GetAllPullRequests added in v0.2.0

func (c *Client) GetAllPullRequests(projectIdOrKey, repositoryIdOrName string) ([]*PullRequest, error)

GetAllPullRequests returns all pull requests.

func (*Client) GetAllPullRequestsContext added in v0.2.0

func (c *Client) GetAllPullRequestsContext(ctx context.Context, projectIdOrKey, repositoryIdOrName string) ([]*PullRequest, error)

GetAllPullRequestsContext accepts context.

func (*Client) GetIssue

func (c *Client) GetIssue(issueKeyOrId string) (*Issue, error)

GetIssue returns information about issue.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-issue/#get-issue

func (*Client) GetIssueComments

func (c *Client) GetIssueComments(issueIdOrKey string, query url.Values) ([]*Comment, error)

GetIssueComments returns list of comments in issue.

https://developer.nulab.com/docs/backlog/api/2/get-comment-list/#get-comment-list

func (*Client) GetIssueCommentsContext

func (c *Client) GetIssueCommentsContext(ctx context.Context, issueIdOrKey string, query url.Values) ([]*Comment, error)

func (*Client) GetIssueContext

func (c *Client) GetIssueContext(ctx context.Context, issueKeyOrId string) (*Issue, error)

GetIssueContext accepts context.

func (*Client) GetIssueTypes

func (c *Client) GetIssueTypes(projectIdOrKey string) ([]*IssueType, error)

GetIssueTypes returns list of Issue Types in the project.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-issue-type-list/#get-issue-type-list

func (*Client) GetIssueTypesContext

func (c *Client) GetIssueTypesContext(ctx context.Context, projectIdOrKey string) ([]*IssueType, error)

GetIssueTypesContext accepts context.

func (*Client) GetIssues

func (c *Client) GetIssues(query url.Values) ([]*Issue, error)

GetIssues returns list of issues.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-issue-list/#get-issue-list

func (*Client) GetIssuesContext

func (c *Client) GetIssuesContext(ctx context.Context, query url.Values) ([]*Issue, error)

GetIssuesContext accepts context.

func (*Client) GetIssuesCount

func (c *Client) GetIssuesCount(query url.Values) (int64, error)

GetIssuesCount returns number of issues.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/count-issue/#count-issue

func (*Client) GetIssuesCountContext

func (c *Client) GetIssuesCountContext(ctx context.Context, query url.Values) (int64, error)

GetIssuesCountContext accepts context.

func (*Client) GetMyself

func (c *Client) GetMyself() (*User, error)

GetMyself returns own information about user.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-own-user/#get-own-user

func (*Client) GetMyselfContext

func (c *Client) GetMyselfContext(ctx context.Context) (*User, error)

GetMyselfContext accepts context.

func (*Client) GetNotifications

func (c *Client) GetNotifications(query url.Values) ([]*Notification, error)

GetNotifications returns own notifications.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-notification/#get-notification

func (*Client) GetNotificationsContext

func (c *Client) GetNotificationsContext(ctx context.Context, query url.Values) ([]*Notification, error)

GetNotificationsContext accepts context.

func (*Client) GetPriorities

func (c *Client) GetPriorities() ([]*Priority, error)

GetPriorities returns list of priorities.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-priority-list/#get-priority-list

func (*Client) GetPrioritiesContext

func (c *Client) GetPrioritiesContext(ctx context.Context) ([]*Priority, error)

GetPrioritiesContext accepts context.

func (*Client) GetProject

func (c *Client) GetProject(projectKeyOrId string) (*Project, error)

GetProject returns information about project.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-project/#get-project

func (*Client) GetProjectContext

func (c *Client) GetProjectContext(ctx context.Context, projectKeyOrId string) (*Project, error)

GetProjectContext accepts context.

func (*Client) GetProjectStatuses

func (c *Client) GetProjectStatuses(projectIdOrKey string) ([]*ProjectStatus, error)

GetProjectStatuses returns list of status in the project.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-status-list-of-project/#get-status-list-of-project

func (*Client) GetProjectStatusesContext

func (c *Client) GetProjectStatusesContext(ctx context.Context, projectIdOrKey string) ([]*ProjectStatus, error)

GetProjectStatuses accepts context.

func (*Client) GetProjects

func (c *Client) GetProjects(query url.Values) ([]*Project, error)

GetProjects returns list of projects.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-project-list/#get-project-list

func (*Client) GetProjectsContext

func (c *Client) GetProjectsContext(ctx context.Context, query url.Values) ([]*Project, error)

GetProjectsContext accepts context.

func (*Client) GetPullRequest

func (c *Client) GetPullRequest(projectIdOrKey, repositoryIdOrName string, number int64) (*PullRequest, error)

GetPullRequest returns pull reuqest.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-pull-request/#get-pull-request

func (*Client) GetPullRequestComments

func (c *Client) GetPullRequestComments(projectKeyOrId, repositoryNameOrId, number string, query url.Values) ([]*Comment, error)

func (*Client) GetPullRequestCommentsContext

func (c *Client) GetPullRequestCommentsContext(ctx context.Context, projectKeyOrId, repositoryNameOrId string, number string, query url.Values) ([]*Comment, error)

func (*Client) GetPullRequestContext

func (c *Client) GetPullRequestContext(ctx context.Context, projectIdOrKey, repositoryIdOrName string, number int64) (*PullRequest, error)

GetPullRequestContext accepts context.

func (*Client) GetPullRequests

func (c *Client) GetPullRequests(projectIdOrKey, repositoryIdOrName string, query url.Values) ([]*PullRequest, error)

GetPullRequests returns list of pull requests.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-pull-request-list/#get-pull-request-list

func (*Client) GetPullRequestsContext

func (c *Client) GetPullRequestsContext(ctx context.Context, projectIdOrKey, repositoryIdOrName string, query url.Values) ([]*PullRequest, error)

GetPullRequestsContext accepts context.

func (*Client) GetPullRequestsCount

func (c *Client) GetPullRequestsCount(projectIdOrKey, repositoryIdOrName string, query url.Values) (int64, error)

GetPullRequestsCount returns number of pull requests.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-number-of-pull-requests/#get-number-of-pull-requests

func (*Client) GetPullRequestsCountContext

func (c *Client) GetPullRequestsCountContext(ctx context.Context, projectIdOrKey, repositoryIdOrName string, query url.Values) (int64, error)

GetPullRequestsCountContext accepts context.

func (*Client) GetRepositories

func (c *Client) GetRepositories(projectKeyOrId string, query url.Values) ([]*Repository, error)

GetRepositories returns list of Git repositories.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-list-of-git-repositories/#get-list-of-git-repositories

func (*Client) GetRepositoriesContext

func (c *Client) GetRepositoriesContext(ctx context.Context, projectKeyOrId string, query url.Values) ([]*Repository, error)

GetRepositoriesContext accepts context.

func (*Client) GetRepository

func (c *Client) GetRepository(projectKeyOrId, repositoryNameOrId string) (*Repository, error)

GetRepository returns Git repository.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-git-repository/

func (*Client) GetRepositoryContext

func (c *Client) GetRepositoryContext(ctx context.Context, projectKeyOrId, repositoryNameOrId string) (*Repository, error)

getRepositoryContext accepts context.

func (*Client) GetSpace

func (c *Client) GetSpace() (*Space, error)

GetSpace returns information about your space.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-space/#get-space

func (*Client) GetSpaceContext

func (c *Client) GetSpaceContext(ctx context.Context) (*Space, error)

GetSpaceContext accepts context.

func (*Client) GetUsers

func (c *Client) GetUsers() ([]*User, error)

GetUsers returns list of users in your space.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-user-list/#get-user-list

func (*Client) GetUsersContext

func (c *Client) GetUsersContext(ctx context.Context) ([]*User, error)

GetUsersContext accepts context.

func (*Client) GetWiki

func (c *Client) GetWiki(wikiId uint64) (*Wiki, error)

GetWiki returns information about Wiki page.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-wiki-page/

func (*Client) GetWikiContext

func (c *Client) GetWikiContext(ctx context.Context, wikiId uint64) (*Wiki, error)

GetWikiContext accepts context.

func (*Client) GetWikis

func (c *Client) GetWikis(projectIdOrKey string, query url.Values) ([]*Wiki, error)

GetWikis returns list of Wiki pages.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/get-wiki-page-list/#get-wiki-page-list

func (*Client) GetWikisContext

func (c *Client) GetWikisContext(ctx context.Context, projectIdOrKey string, query url.Values) ([]*Wiki, error)

GetWikisContext accepts context.

func (*Client) SetHTTPClient

func (c *Client) SetHTTPClient(hc HTTPClient)

SetHTTPClient sets default HTTP client.

func (*Client) UpdateIssue

func (c *Client) UpdateIssue(issue *Issue, notifiedUsers []*User, comment string) (*Issue, error)

UpdateIssue updates information about issue.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/update-issue/#update-issue

func (*Client) UpdateIssueContext

func (c *Client) UpdateIssueContext(ctx context.Context, issue *Issue, notifiedUsers []*User, comment string) (*Issue, error)

UpdateIssueContext accepts context.

func (*Client) UpdatePullRequest

func (c *Client) UpdatePullRequest(pullRequest *PullRequest, notifiedUsers []*User, comment string) (*PullRequest, error)

UpdatePullRequest updates pull requests.

For more details, see the API document.

https://developer.nulab.com/docs/backlog/api/2/update-pull-request/#update-pull-request

func (*Client) UpdatePullRequestContext

func (c *Client) UpdatePullRequestContext(ctx context.Context, pullRequest *PullRequest, notifiedUsers []*User, comment string) (*PullRequest, error)

UpdatePullRequestContext accepts context.

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient is an interface which performs http.Client.Do method.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL