Documentation ¶
Index ¶
- func CheckResponse(resp *http.Response) error
- type Client
- type CustomField
- type Dates
- type DetailedTask
- type Folder
- type FolderService
- type GetTaskOptions
- type Metadata
- type Project
- type QueryTasksOptions
- type Response
- type Task
- type TaskResponse
- type TaskService
- type TasksResponse
- type Time
- type Timelog
- type TimelogService
- type Timelogs
- type TimelogsParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckResponse ¶
CheckResponse check response returned
Types ¶
type Client ¶
type Client struct { Folders *FolderService Timelogs *TimelogService Tasks *TaskService // contains filtered or unexported fields }
Client Wrike API client
func (*Client) NewRequest ¶
NewRequest build request
func (*Client) SetBaseURL ¶
SetBaseURL sets the base URL for API requests to a custom endpoint. urlStr should always be specified with a trailing slash.
type CustomField ¶
CustomField struct
type Dates ¶
type Dates struct { Type string `json:"type"` Duration int `json:"duration"` Start string `json:"start"` Due string `json:"due"` }
Dates are dates
type DetailedTask ¶
type DetailedTask struct { ID string `json:"id"` AccountID string `json:"accountID"` Title string `json:"title"` Description string `json:"description"` BriefDescription string `json:"briefDescription"` ParentIDs []string `json:"parentIds"` SuperParentIDs []string `json:"superParentIds"` ResponsibleIDs []string `json:"responsibleIds"` Status string `json:"status"` Importance string `json:"importance"` CreatedDate Time `json:"createdDate"` UpdatedDate Time `json:"updatedDate"` Dates Dates `json:"dates"` Scope string `json:"scope"` AuthorIds []string `json:"authorIds"` CustomStatusID string `json:"customStatusId"` HasAttachments bool `json:"hasAttachments"` Permalink string `json:"permalink"` Priority string `json:"priority"` FollowedByMe bool `json:"followedByMe"` FollowerIDs []string `json:"followerIds"` SuperTaskIDs []string `json:"superTaskIds"` SubTaskIDs []string `json:"subTaskIds"` DependencyIDs []string `json:"dependencyIds"` Metadata []Metadata `json:"metadata"` CustomFields []CustomField `json:"customFields"` }
DetailedTask represents task return fron /tasks/{id} endpoint
type Folder ¶
type Folder struct { Kind string `json:"kind"` Data []struct { ID string `json:"id"` AccountID string `json:"accountId"` Title string `json:"title"` CreatedDate string `json:"createdAt"` UpdatedDate string `json:"updatedAt"` Description string `json:"description"` SharedIds []string `json:"sharedIds,omitempty"` ParentIds []string `json:"parentIds,omitempty"` ChildIds []string `json:"childIds,omitempty"` SuperParentIds []string `json:"superParentIds,omitempty"` Scope string `json:"scope"` HasAttachments bool `json:"hasAttachments"` Permalink string `json:"permalink"` WorkflowID string `json:"workflowId"` Metadata []Metadata `json:"metadata,omitempty"` CustomFields []CustomField `json:"customFields"` Project Project `json:"project"` } `json:"data,omitempty"` }
Folder struct, also known as Project
type FolderService ¶
type FolderService struct {
// contains filtered or unexported fields
}
FolderService endpoint, see Wrike API docs: https://developers.wrike.com/documentation/api/methods/get-folder-tree
func (*FolderService) GetFolder ¶
func (s *FolderService) GetFolder(id string) (*Folder, *Response, error)
GetFolder from id, see Wrike API: https://developers.wrike.com/documentation/api/methods/get-folder
type GetTaskOptions ¶
type GetTaskOptions struct { }
GetTaskOptions represents options for /tasks/{id} endpoint
type Project ¶
type Project struct { AuthorID string `json:"authorId"` OwnerIds []string `json:"ownerIds"` Status string `json:"status"` StartDate string `json:"startDate"` EndDate string `json:"endDate"` CreatedDate string `json:"createdDate"` CompletedDate string `json:"completedDate"` }
Project struct
type QueryTasksOptions ¶
QueryTasksOptions to add params to query
type Task ¶
type Task struct { ID string `json:"id"` AccountID string `json:"accountId"` Title string `json:"title"` Status string `json:"status"` Importance string `json:"importance"` CreatedDate Time `json:"createdDate"` UpdatedDate Time `json:"updatedDate"` Dates Dates `json:"dates"` Scope string `json:"scope"` CustomStatusID string `json:"customStatusId"` Permalink string `json:"permalink"` Priority string `json:"priority"` Description string `json:"description"` }
Task is a task
type TaskResponse ¶
type TaskResponse struct { Kind string `json:"kind"` Data []DetailedTask `json:"data"` }
TaskResponse represents /tasks/{id} response
type TaskService ¶
type TaskService struct {
// contains filtered or unexported fields
}
TaskService is Tasks endpoint, see https://developers.wrike.com/documentation/api/methods/query-tasks
func (*TaskService) GetTask ¶
func (t *TaskService) GetTask(id string, options GetTaskOptions) (*TaskResponse, *Response, error)
GetTask get task by id
func (*TaskService) QueryTasks ¶
func (t *TaskService) QueryTasks(options QueryTasksOptions) (*TasksResponse, *Response, error)
QueryTasks query tasks
type TasksResponse ¶
TasksResponse is Response from /tasks query
type Timelog ¶
type Timelog struct { ID string `json:"id"` TaskID string `json:"taskId"` UserID string `json:"userId"` CategoryID string `json:"categoryId"` Hours float64 `json:"hours"` CreatedDate string `json:"createdDate"` UpdatedDate string `json:"updatedDate"` TrackedDate string `json:"trackedDate"` Comment string `json:"comment"` }
Timelog represents a timelog
type TimelogService ¶
type TimelogService struct {
// contains filtered or unexported fields
}
TimelogService is Timelog endpoint, see https://developers.wrike.com/documentation/api/methods/query-timelogs
func (*TimelogService) GetTimelogs ¶
func (s *TimelogService) GetTimelogs(id string) (*Timelogs, *Response, error)
GetTimelogs get folder timelogs
type TimelogsParams ¶
type TimelogsParams struct { }
TimelogsParams represents params passed to query timelogs