Documentation ¶
Index ¶
- func CheckResponse(r *http.Response) error
- type AttachmentService
- func (s *AttachmentService) Create(caseId string, attach *Attachment) (*Attachment, *http.Response, error)
- func (s *AttachmentService) Delete(caseId string, attachId string) (*http.Response, error)
- func (s *AttachmentService) Get(caseId string, attachId string) (*Attachment, *http.Response, error)
- func (s *AttachmentService) List(caseId string) (*Page, *http.Response, error)
- type CaseService
- func (s *CaseService) Create(cse *Case) (*Case, *http.Response, error)
- func (s *CaseService) Delete(id string) (*http.Response, error)
- func (s *CaseService) Feed(id string, params *url.Values) (*Page, *http.Response, error)
- func (s *CaseService) Forward(id string, recipients string, note string) (*http.Response, error)
- func (s *CaseService) Get(id string) (*Case, *http.Response, error)
- func (s *CaseService) History(id string, params *url.Values) (*Page, *http.Response, error)
- func (s *CaseService) Labels(id string, params *url.Values) (*Page, *http.Response, error)
- func (s *CaseService) List(params *url.Values) (*Page, *http.Response, error)
- func (s *CaseService) Search(params *url.Values, q *string) (*Page, *http.Response, error)
- func (s *CaseService) Update(cse *Case) (*Case, *http.Response, error)
- type Client
- type CompanyService
- func (c *CompanyService) Cases(id string, params *url.Values) (*Page, *http.Response, error)
- func (c *CompanyService) Create(company *Company) (*Company, *http.Response, error)
- func (c *CompanyService) Customers(id string, params *url.Values) (*Page, *http.Response, error)
- func (c *CompanyService) Get(id string) (*Company, *http.Response, error)
- func (c *CompanyService) List(params *url.Values) (*Page, *http.Response, error)
- func (c *CompanyService) Search(params *url.Values, q *string) (*Page, *http.Response, error)
- func (c *CompanyService) Update(company *Company) (*Company, *http.Response, error)
- type CustomerService
- func (c *CustomerService) Cases(id string, params *url.Values) (*Page, *http.Response, error)
- func (c *CustomerService) Create(customer *Customer) (*Customer, *http.Response, error)
- func (c *CustomerService) Get(id string) (*Customer, *http.Response, error)
- func (c *CustomerService) List(params *url.Values) (*Page, *http.Response, error)
- func (c *CustomerService) Search(params *url.Values, q *string) (*Page, *http.Response, error)
- func (c *CustomerService) Update(customer *Customer) (*Customer, *http.Response, error)
- type DraftService
- type ErrorResponse
- type GroupService
- type InsightsV3Service
- type MessageService
- type NoteService
- func (s *NoteService) Create(caseId string, note *Note) (*Note, *http.Response, error)
- func (s *NoteService) Delete(caseId string, noteId string) (*http.Response, error)
- func (s *NoteService) Get(caseId string, noteId string) (*Note, *http.Response, error)
- func (s *NoteService) List(caseId string, params *url.Values) (*Page, *http.Response, error)
- func (s *NoteService) Update(caseId string, note *Note) (*Note, *http.Response, error)
- type ReplyService
- func (c *ReplyService) Create(caseId string, reply *Reply) (*Reply, *http.Response, error)
- func (c *ReplyService) Delete(caseId string, replyId string) (*http.Response, error)
- func (c *ReplyService) Get(caseId string, replyId string) (*Reply, *http.Response, error)
- func (c *ReplyService) List(caseId string, params *url.Values) (*Page, *http.Response, error)
- func (c *ReplyService) Update(caseId string, reply *Reply) (*Reply, *http.Response, error)
- type Restful
- func (r *Restful) Body(b interface{}) *Restful
- func (r *Restful) Client(c *Client) *Restful
- func (r *Restful) Delete(p string) *Restful
- func (r *Restful) Do() (*http.Response, error)
- func (r *Restful) Get(p string) *Restful
- func (r *Restful) Json(j interface{}) *Restful
- func (r *Restful) Method(m string) *Restful
- func (r *Restful) Params(p *url.Values) *Restful
- func (r *Restful) Patch(p string) *Restful
- func (r *Restful) Path(p string) *Restful
- func (r *Restful) Post(p string) *Restful
- func (r *Restful) Put(p string) *Restful
- func (r *Restful) Query(q *string) *Restful
- func (r Restful) String() string
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckResponse ¶
Types ¶
type AttachmentService ¶
type AttachmentService struct {
// contains filtered or unexported fields
}
func (*AttachmentService) Create ¶
func (s *AttachmentService) Create(caseId string, attach *Attachment) (*Attachment, *http.Response, error)
type CaseService ¶
type CaseService struct { Message *MessageService Reply *ReplyService Draft *DraftService Note *NoteService Attachment *AttachmentService // contains filtered or unexported fields }
func NewCaseService ¶
func NewCaseService(httpClient *Client) *CaseService
func (*CaseService) Create ¶
func (s *CaseService) Create(cse *Case) (*Case, *http.Response, error)
Create a case.(does not route through customer cases path) See Desk API: http://dev.desk.com/API/cases/#create
func (*CaseService) Delete ¶
func (s *CaseService) Delete(id string) (*http.Response, error)
Delete a case by ID. See Desk API: http://dev.desk.com/API/cases/#delete
func (*CaseService) Forward ¶
Forward a case See Desk API: http://dev.desk.com/API/cases/#forward
func (*CaseService) Get ¶
func (s *CaseService) Get(id string) (*Case, *http.Response, error)
Get retrieves a single case by ID. See Desk API method show (http://dev.desk.com/API/cases/#show)
func (*CaseService) List ¶
List cases with filtering and pagination. See Desk API method list (http://dev.desk.com/API/cases/#list)
func (*CaseService) Search ¶
Search for cases with filtering and pagination. See Desk API method list (http://dev.desk.com/API/cases/#search)
func (*CaseService) Update ¶
func (s *CaseService) Update(cse *Case) (*Case, *http.Response, error)
Update a case. See Desk API: http://dev.desk.com/API/cases/#update
type Client ¶
type Client struct { BaseURL *url.URL UserEmail string UserPassword string Case *CaseService Customer *CustomerService Company *CompanyService User *UserService Group *GroupService InsightsV3 *InsightsV3Service // contains filtered or unexported fields }
func (*Client) Do ¶
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it.
type CompanyService ¶
type CompanyService struct {
// contains filtered or unexported fields
}
func (*CompanyService) Cases ¶
Cases provides a list of companies associated with a company. See Desk API: http://dev.desk.com/API/companies/#list-cases
func (*CompanyService) Create ¶
func (c *CompanyService) Create(company *Company) (*Company, *http.Response, error)
Create a company. See Desk API: http://dev.desk.com/API/companies/#create
func (*CompanyService) Customers ¶
Customers provides a list of companies associated with a company. See Desk API: http://dev.desk.com/API/companies/#customers-list
func (*CompanyService) Get ¶
func (c *CompanyService) Get(id string) (*Company, *http.Response, error)
Get retrieves a company. See Desk API: http://dev.desk.com/API/companies/#show
func (*CompanyService) List ¶
List companies with filtering and pagination. See Desk API: http://dev.desk.com/API/companies/#list
func (*CompanyService) Search ¶
Search companies with filtering and pagination. See Desk API: http://dev.desk.com/API/companies/#search
func (*CompanyService) Update ¶
func (c *CompanyService) Update(company *Company) (*Company, *http.Response, error)
Update a company. See Desk API: http://dev.desk.com/API/companies/#update
type CustomerService ¶
type CustomerService struct {
// contains filtered or unexported fields
}
func (*CustomerService) Cases ¶
Cases provides a list of cases associated with a customer. See Desk API: http://dev.desk.com/API/customers/#list-cases
func (*CustomerService) Create ¶
func (c *CustomerService) Create(customer *Customer) (*Customer, *http.Response, error)
Create a customer. See Desk API: http://dev.desk.com/API/customers/#create
func (*CustomerService) Get ¶
func (c *CustomerService) Get(id string) (*Customer, *http.Response, error)
Get retrieves a customer. See Desk API: http://dev.desk.com/API/customers/#show
func (*CustomerService) List ¶
List customers with filtering and pagination. See Desk API: http://dev.desk.com/API/customers/#list
func (*CustomerService) Search ¶
Search customers with filtering and pagination. See Desk API: http://dev.desk.com/API/customers/#search
func (*CustomerService) Update ¶
func (c *CustomerService) Update(customer *Customer) (*Customer, *http.Response, error)
Update a customer. See Desk API: http://dev.desk.com/API/customers/#update
type DraftService ¶
type DraftService struct {
// contains filtered or unexported fields
}
func (*DraftService) Create ¶
func (c *DraftService) Create(id string, draft *Draft) (*Draft, *http.Response, error)
Create a draft. See Desk API: http://dev.desk.com/API/cases/#drafts-create
func (*DraftService) Get ¶
func (c *DraftService) Get(id string) (*Draft, *http.Response, error)
Get retrieves the draft reply for a case. See Desk API: http://dev.desk.com/API/cases/#drafts-show
func (*DraftService) Update ¶
func (c *DraftService) Update(id string, draft *Draft) (*Draft, *http.Response, error)
Update a draft. See Desk API: http://dev.desk.com/API/replies/#update
type ErrorResponse ¶
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type GroupService ¶
type GroupService struct {
// contains filtered or unexported fields
}
func NewGroupService ¶
func NewGroupService(httpClient *Client) *GroupService
func (*GroupService) Get ¶
func (c *GroupService) Get(id string) (*Group, *http.Response, error)
Get retrieves a group. See Desk API: http://dev.desk.com/API/groups/#show
func (*GroupService) GetUserGroups ¶
func (c *GroupService) GetUserGroups(id string) (*Page, *http.Response, error)
func (*GroupService) List ¶
List group with filtering and pagination. See Desk API: http://dev.desk.com/API/groups/#list
type InsightsV3Service ¶
type InsightsV3Service struct {
// contains filtered or unexported fields
}
type MessageService ¶
type MessageService struct {
// contains filtered or unexported fields
}
func (*MessageService) Delete ¶
func (s *MessageService) Delete(caseId string) (*http.Response, error)
Delete the case message. See Desk API: http://dev.desk.com/API/cases/#message-delete
func (*MessageService) Get ¶
func (s *MessageService) Get(caseId string) (*Message, *http.Response, error)
Get retrieves the message for a case. See Desk API: http://dev.desk.com/API/cases/#message-show
func (*MessageService) Update ¶
func (s *MessageService) Update(caseId string, msg *Message, params *url.Values) (*Message, *http.Response, error)
Update the case message. See Desk API: http://dev.desk.com/API/cases/#message-update
type NoteService ¶
type NoteService struct {
// contains filtered or unexported fields
}
func NewNoteService ¶
func NewNoteService(httpClient *Client) *NoteService
func (*NoteService) Create ¶
func (s *NoteService) Create(caseId string, note *Note) (*Note, *http.Response, error)
type ReplyService ¶
type ReplyService struct {
// contains filtered or unexported fields
}
func (*ReplyService) Create ¶
func (c *ReplyService) Create(caseId string, reply *Reply) (*Reply, *http.Response, error)
Create a reply. See Desk API: http://dev.desk.com/API/cases/#replies-create
func (*ReplyService) Delete ¶
Delete a reply for a case. See Desk API: http://dev.desk.com/API/cases/#replies-show
func (*ReplyService) Get ¶
Get retrieves a reply for a case. See Desk API: http://dev.desk.com/API/cases/#replies-show
func (*ReplyService) List ¶
List replies with filtering and pagination. See Desk API: http://dev.desk.com/API/cases/#replies-list
func (*ReplyService) Update ¶
func (c *ReplyService) Update(caseId string, reply *Reply) (*Reply, *http.Response, error)
Update a reply. See Desk API: http://dev.desk.com/API/replies/#update
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func (*UserService) Get ¶
func (c *UserService) Get(id string) (*User, *http.Response, error)
Get retrieves a user. See Desk API: http://dev.desk.com/API/users/#show
func (*UserService) List ¶
List users with filtering and pagination. See Desk API: http://dev.desk.com/API/users/#list
func (*UserService) Update ¶
func (c *UserService) Update(user *User) (*User, *http.Response, error)
Update a user. See Desk API: http://dev.desk.com/API/users/#update