Documentation
¶
Index ¶
- type Account
- type Client
- func (c *Client) DeleteRooms(roomID int64, actionType string) error
- func (c *Client) GetContacts() ([]Account, error)
- func (c *Client) GetContactsRaw() ([]byte, error)
- func (c *Client) GetFiles(roomID int64, accountID int64) ([]File, error)
- func (c *Client) GetFilesRaw(roomID int64, accountID int64) ([]byte, error)
- func (c *Client) GetMembers(roomID int64) ([]Account, error)
- func (c *Client) GetMembersRaw(roomID int64) ([]byte, error)
- func (c *Client) GetMessage(roomID int64, force bool) ([]Message, error)
- func (c *Client) GetMessageRaw(roomID int64, force bool) ([]byte, error)
- func (c *Client) GetRooms() ([]Room, error)
- func (c *Client) GetRoomsRaw() ([]byte, error)
- func (c *Client) GetSpecificFiles(roomID int64, fileID int64, createDownloadURL bool) (File, error)
- func (c *Client) GetSpecificFilesRaw(roomID int64, fileID int64, createDownloadURL bool) ([]byte, error)
- func (c *Client) GetSpecificMessage(roomID int64, messageID int64) (Message, error)
- func (c *Client) GetSpecificMessageRaw(roomID int64, messageID int64) ([]byte, error)
- func (c *Client) GetSpecificRooms(roomID int64) (Room, error)
- func (c *Client) GetSpecificRoomsRaw(roomID int64) ([]byte, error)
- func (c *Client) GetSpecificTask(roomID int64, taskID int64) (Task, error)
- func (c *Client) GetSpecificTaskRaw(roomID int64, taskID int64) ([]byte, error)
- func (c *Client) GetTasks(roomID int64, accountID int64, assignedByAccountID int64, status string) ([]Task, error)
- func (c *Client) GetTasksRaw(roomID int64, accountID int64, assignedByAccountID int64, status string) ([]byte, error)
- func (c *Client) Me() (Me, error)
- func (c *Client) MeRaw() ([]byte, error)
- func (c *Client) MyStatus() (Status, error)
- func (c *Client) MyStatusRaw() ([]byte, error)
- func (c *Client) MyTasks(params url.Values) ([]Task, error)
- func (c *Client) MyTasksRaw(params url.Values) ([]byte, error)
- func (c *Client) PostMessage(roomID int64, message string) (int64, error)
- func (c *Client) PostMessageRaw(roomID int64, message string) ([]byte, error)
- func (c *Client) PostRooms(description string, iconPreset string, membersAdminIDs []int64, ...) (int64, error)
- func (c *Client) PostRoomsRaw(description string, iconPreset string, membersAdminIDs []int64, ...) ([]byte, error)
- func (c *Client) PostTasks(roomID int64, body string, limit time.Time, toIDs []int64) ([]int64, error)
- func (c *Client) PostTasksRaw(roomID int64, body string, limit time.Time, toIDs []int64) ([]byte, error)
- func (c *Client) PutMembers(roomID int64, membersAdminIDs []int64, membersMemberIDs []int64, ...) (admin []int64, member []int64, readonly []int64, err error)
- func (c *Client) PutMembersRaw(roomID int64, membersAdminIDs []int64, membersMemberIDs []int64, ...) ([]byte, error)
- func (c *Client) PutRooms(roomID int64, description string, iconPreset string, name string) (int64, error)
- func (c *Client) PutRoomsRaw(roomID int64, description string, iconPreset string, name string) ([]byte, error)
- type Errors
- type File
- type Me
- type Message
- type Room
- type Status
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
AccountID int64 `json:"account_id"`
Name string
Role string
ChatworkID string `json:"chatwork_id"`
OrganizationID int64 `json:"organization_id"`
OrganizationName string `json:"organization_name"`
Department string
AvatarImageURL string `json:"avatar_image_url"`
}
Account is task struct
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is chatwork api client
func (*Client) DeleteRooms ¶
DeleteRooms send DELETE rooms/room_id response, this api don't return response
func (*Client) GetContacts ¶
GetContacts return GET /contacts response by []Account
func (*Client) GetContactsRaw ¶
GetContactsRaw return GET /contacts response by []byte
func (*Client) GetFilesRaw ¶
GetFilesRaw return /rooms/{room_id}/files response by []byte
func (*Client) GetMembers ¶
GetMembers return rooms/room_id/members response by []Account
func (*Client) GetMembersRaw ¶
GetMembersRaw return rooms/room_id/members response by []byte
func (*Client) GetMessage ¶
GetMessage get message to rooms/room_id/messages and response by []Message
func (*Client) GetMessageRaw ¶
GetMessageRaw get message to rooms/room_id/messages and response by []byte
func (*Client) GetRoomsRaw ¶
GetRoomsRaw return rooms response by []byte
func (*Client) GetSpecificFiles ¶
GetSpecificFiles return /rooms/{room_id}/files/file_id response by File
func (*Client) GetSpecificFilesRaw ¶
func (c *Client) GetSpecificFilesRaw(roomID int64, fileID int64, createDownloadURL bool) ([]byte, error)
GetSpecificFilesRaw return /rooms/{room_id}/files/file_id response by []byte
func (*Client) GetSpecificMessage ¶
GetSpecificMessage get message to rooms/room_id/messages/message_id and response by Message
func (*Client) GetSpecificMessageRaw ¶
GetSpecificMessageRaw get message to rooms/room_id/messages/message_id and response by []byte
func (*Client) GetSpecificRooms ¶
GetSpecificRooms return rooms/room_id response by Room
func (*Client) GetSpecificRoomsRaw ¶
GetSpecificRoomsRaw return rooms/room_id response by []byte
func (*Client) GetSpecificTask ¶
GetSpecificTask get tasks to rooms/room_id/tasks/task_id and response by Task
func (*Client) GetSpecificTaskRaw ¶
GetSpecificTaskRaw get tasks to rooms/room_id/tasks/task_id and response by []byte
func (*Client) GetTasks ¶
func (c *Client) GetTasks(roomID int64, accountID int64, assignedByAccountID int64, status string) ([]Task, error)
GetTasks get tasks to rooms/room_id/tasks and response by []tasks
func (*Client) GetTasksRaw ¶
func (c *Client) GetTasksRaw(roomID int64, accountID int64, assignedByAccountID int64, status string) ([]byte, error)
GetTasksRaw get tasks to rooms/room_id/tasks and response by []tasks
func (*Client) MyStatusRaw ¶
MyStatusRaw return my/status response by []byte
func (*Client) MyTasksRaw ¶
MyTasksRaw return my/tasks response by []byte
func (*Client) PostMessage ¶
PostMessage post message to rooms/room_id/messages and response by int64
func (*Client) PostMessageRaw ¶
PostMessageRaw post message to rooms/room_id/messages and response by []byte
func (*Client) PostRooms ¶
func (c *Client) PostRooms(description string, iconPreset string, membersAdminIDs []int64, membersMemberIDs []int64, membersReadonlyIDs []int64, name string) (int64, error)
PostRooms return POST rooms response by int64
func (*Client) PostRoomsRaw ¶
func (c *Client) PostRoomsRaw(description string, iconPreset string, membersAdminIDs []int64, membersMemberIDs []int64, membersReadonlyIDs []int64, name string) ([]byte, error)
PostRoomsRaw return POST rooms response by []byte
func (*Client) PostTasks ¶
func (c *Client) PostTasks(roomID int64, body string, limit time.Time, toIDs []int64) ([]int64, error)
PostTasks post tasks to rooms/room_id/tasks and response by []int64
func (*Client) PostTasksRaw ¶
func (c *Client) PostTasksRaw(roomID int64, body string, limit time.Time, toIDs []int64) ([]byte, error)
PostTasksRaw post tasks to rooms/room_id/tasks and response by []byte
func (*Client) PutMembers ¶
func (c *Client) PutMembers(roomID int64, membersAdminIDs []int64, membersMemberIDs []int64, membersReadonlyIDs []int64) (admin []int64, member []int64, readonly []int64, err error)
PutMembers return PUT rooms/room_id/members response
func (*Client) PutMembersRaw ¶
func (c *Client) PutMembersRaw(roomID int64, membersAdminIDs []int64, membersMemberIDs []int64, membersReadonlyIDs []int64) ([]byte, error)
PutMembersRaw return PUT rooms/room_id/members response by []byte
type File ¶
type File struct {
FileID int64 `json:"file_id"`
Account Account
MessageID int64 `json:"message_id"`
Filename string
Filesize int64
UploadTime int64 `json:"upload_time"`
DownloadURL string `json:"download_url"`
}
File is file struct
type Me ¶
type Me struct {
AccountID int64 `json:"account_id"`
RoomID int64 `json:"room_id"`
Name string
ChatworkID string `json:"chatwork_id"`
OrganizationID int64 `json:"organization_id"`
OrganizationName string `json:"organization_name"`
Department string
Title string
URL string
Introduction string
Mail string
TelOrganization string `json:"tel_organization"`
TelExtension string `json:"tel_extension"`
TelMobile string `json:"tel_mobile"`
Skype string
Facebook string
Twitter string
AvatarImageURL string `json:"avatar_image_url"`
}
Me is /me response struct
type Message ¶
type Message struct {
MessageID int64 `json:"message_id"`
Account Account
Body string
SendTime int64 `json:"send_time"`
UpdateTime int64 `json:"update_time"`
}
Message is message struct
type Room ¶
type Room struct {
RoomID int64 `json:"room_id"`
Name string
Type string
Role string
Sticky bool
UnreadNum int64 `json:"unread_num"`
MentionNum int64 `json:"mention_num"`
MytaskNum int64 `json:"mytask_num"`
MessageNum int64 `json:"message_num"`
FileNum int64 `json:"file_num"`
TaskNum int64 `json:"task_num"`
IconPath string `json:"icon_path"`
Description string
LastUpdateTime int64 `json:"last_update_time"`
}
Room is room struct
type Status ¶
type Status struct {
UnreadRoomNum int64 `json:"unread_room_num"`
MentionRoomNum int64 `json:"mention_room_num"`
MytaskRoomNum int64 `json:"mytask_room_num"`
UnreadNum int64 `json:"unread_num"`
MentionNum int64 `json:"mention_num"`
MytaskNum int64 `json:"mytask_num"`
}
Status is /me response struct