mirror of
https://github.com/interviewstreet/go-jira.git
synced 2025-06-06 23:16:21 +02:00
Fix of documentation urls
This commit is contained in:
parent
5a7988ae5c
commit
889618d979
8
role.go
8
role.go
@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
// RoleService handles roles for the JIRA instance / API.
|
// RoleService handles roles for the JIRA instance / API.
|
||||||
//
|
//
|
||||||
// JIRA API docs: https://docs.atlassian.com/jira/REST/latest/#api/3/role
|
// JIRA API docs: https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-group-Role
|
||||||
type RoleService struct {
|
type RoleService struct {
|
||||||
client *Client
|
client *Client
|
||||||
}
|
}
|
||||||
@ -20,7 +20,7 @@ type Role struct {
|
|||||||
Actors []*Actor `json:"actors" structs:"actors"`
|
Actors []*Actor `json:"actors" structs:"actors"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actor represents a JIRA user
|
// Actor represents a JIRA actor
|
||||||
type Actor struct {
|
type Actor struct {
|
||||||
ID int `json:"id" structs:"id"`
|
ID int `json:"id" structs:"id"`
|
||||||
DisplayName string `json:"displayName" structs:"displayName"`
|
DisplayName string `json:"displayName" structs:"displayName"`
|
||||||
@ -36,6 +36,8 @@ type ActorUser struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetList returns a list of all available project roles
|
// GetList returns a list of all available project roles
|
||||||
|
//
|
||||||
|
// JIRA API docs: https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-api-3-role-get
|
||||||
func (s *RoleService) GetList() (*[]Role, *Response, error) {
|
func (s *RoleService) GetList() (*[]Role, *Response, error) {
|
||||||
apiEndpoint := "rest/api/3/role"
|
apiEndpoint := "rest/api/3/role"
|
||||||
req, err := s.client.NewRequest("GET", apiEndpoint, nil)
|
req, err := s.client.NewRequest("GET", apiEndpoint, nil)
|
||||||
@ -52,6 +54,8 @@ func (s *RoleService) GetList() (*[]Role, *Response, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get retreives a single Role from Jira
|
// Get retreives a single Role from Jira
|
||||||
|
//
|
||||||
|
// JIRA API docs: https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-api-3-role-id-get
|
||||||
func (s *RoleService) Get(roleID int) (*Role, *Response, error) {
|
func (s *RoleService) Get(roleID int) (*Role, *Response, error) {
|
||||||
apiEndpoint := fmt.Sprintf("rest/api/3/role/%d", roleID)
|
apiEndpoint := fmt.Sprintf("rest/api/3/role/%d", roleID)
|
||||||
req, err := s.client.NewRequest("GET", apiEndpoint, nil)
|
req, err := s.client.NewRequest("GET", apiEndpoint, nil)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user