Documentation ¶
Index ¶
- Constants
- type Account
- type AppengineClient
- func (c *AppengineClient) Contacts() []Contact
- func (c *AppengineClient) CreateRoom(params map[string]string) []byte
- func (c *AppengineClient) Delete(endpoint string, params map[string]string) []byte
- func (c *AppengineClient) DeleteRoom(roomId string, params map[string]string) []byte
- func (c *AppengineClient) Get(endpoint string, params map[string]string) []byte
- func (c *AppengineClient) Me() Me
- func (c *AppengineClient) MyTasks(params map[string]string) []MyTask
- func (c *AppengineClient) Post(endpoint string, params map[string]string) []byte
- func (c *AppengineClient) PostRoomMessage(roomId string, body string) []byte
- func (c *AppengineClient) PostRoomTask(roomId string, params map[string]string) []byte
- func (c *AppengineClient) Put(endpoint string, params map[string]string) []byte
- func (c *AppengineClient) Room(roomId string) Room
- func (c *AppengineClient) RoomFile(roomId, fileId string) File
- func (c *AppengineClient) RoomFiles(roomId string, params map[string]string) []File
- func (c *AppengineClient) RoomMembers(roomId string) []Member
- func (c *AppengineClient) RoomMessage(roomId, messageId string) Message
- func (c *AppengineClient) RoomMessages(roomId string) []Message
- func (c *AppengineClient) RoomTask(roomId, taskId string) Task
- func (c *AppengineClient) RoomTasks(roomId string) []Task
- func (c *AppengineClient) Rooms() []Room
- func (c *AppengineClient) UpdateRoom(roomId string, params map[string]string) []byte
- func (c *AppengineClient) UpdateRoomMembers(roomId string, params map[string]string) []byte
- type Client
- func (c *Client) Contacts() []Contact
- func (c *Client) CreateRoom(params map[string]string) []byte
- func (c *Client) Delete(endpoint string, params map[string]string) []byte
- func (c *Client) DeleteRoom(roomId string, params map[string]string) []byte
- func (c *Client) Get(endpoint string, params map[string]string) []byte
- func (c *Client) Me() Me
- func (c *Client) MyStatus() Status
- func (c *Client) MyTasks(params map[string]string) []MyTask
- func (c *Client) Post(endpoint string, params map[string]string) []byte
- func (c *Client) PostRoomMessage(roomId string, body string) []byte
- func (c *Client) PostRoomTask(roomId string, params map[string]string) []byte
- func (c *Client) Put(endpoint string, params map[string]string) []byte
- func (c *Client) Room(roomId string) Room
- func (c *Client) RoomFile(roomId, fileId string) File
- func (c *Client) RoomFiles(roomId string, params map[string]string) []File
- func (c *Client) RoomMembers(roomId string) []Member
- func (c *Client) RoomMessage(roomId, messageId string) Message
- func (c *Client) RoomMessages(roomId string) []Message
- func (c *Client) RoomTask(roomId, taskId string) Task
- func (c *Client) RoomTasks(roomId string) []Task
- func (c *Client) Rooms() []Room
- func (c *Client) UpdateRoom(roomId string, params map[string]string) []byte
- func (c *Client) UpdateRoomMembers(roomId string, params map[string]string) []byte
- type Contact
- type File
- type Http
- type Me
- type Member
- type Message
- type MyTask
- type Room
- type Status
- type Task
Constants ¶
View Source
const BaseUrl = `https://api.chatwork.com/v2`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppengineClient ¶
type AppengineClient struct { ApiKey string BaseUrl string Http // Ctx appengine.Context Ctx context.Context }
func NewAppengineClient ¶
func NewAppengineClient(apiKey string, ctx context.Context) *AppengineClient
func (*AppengineClient) Contacts ¶
func (c *AppengineClient) Contacts() []Contact
func (*AppengineClient) CreateRoom ¶
func (c *AppengineClient) CreateRoom(params map[string]string) []byte
params keys
- name
- members_admin_ids
- description
- icon_preset
- members_member_ids
- members_readonly_ids
func (*AppengineClient) Delete ¶
func (c *AppengineClient) Delete(endpoint string, params map[string]string) []byte
func (*AppengineClient) DeleteRoom ¶
func (c *AppengineClient) DeleteRoom(roomId string, params map[string]string) []byte
params key
- action_type: [leave, delete]
func (*AppengineClient) Get ¶
func (c *AppengineClient) Get(endpoint string, params map[string]string) []byte
func (*AppengineClient) Me ¶
func (c *AppengineClient) Me() Me
func (*AppengineClient) MyTasks ¶
func (c *AppengineClient) MyTasks(params map[string]string) []MyTask
params keys
- assigned_by_account_id
- status: [open, done]
func (*AppengineClient) Post ¶
func (c *AppengineClient) Post(endpoint string, params map[string]string) []byte
func (*AppengineClient) PostRoomMessage ¶
func (c *AppengineClient) PostRoomMessage(roomId string, body string) []byte
func (*AppengineClient) PostRoomTask ¶
func (c *AppengineClient) PostRoomTask(roomId string, params map[string]string) []byte
params keys
- body
- to_ids
- limit
func (*AppengineClient) Put ¶
func (c *AppengineClient) Put(endpoint string, params map[string]string) []byte
func (*AppengineClient) Room ¶
func (c *AppengineClient) Room(roomId string) Room
func (*AppengineClient) RoomFile ¶
func (c *AppengineClient) RoomFile(roomId, fileId string) File
func (*AppengineClient) RoomFiles ¶
func (c *AppengineClient) RoomFiles(roomId string, params map[string]string) []File
params key
- account_id
func (*AppengineClient) RoomMembers ¶
func (c *AppengineClient) RoomMembers(roomId string) []Member
func (*AppengineClient) RoomMessage ¶
func (c *AppengineClient) RoomMessage(roomId, messageId string) Message
func (*AppengineClient) RoomMessages ¶
func (c *AppengineClient) RoomMessages(roomId string) []Message
func (*AppengineClient) RoomTask ¶
func (c *AppengineClient) RoomTask(roomId, taskId string) Task
func (*AppengineClient) RoomTasks ¶
func (c *AppengineClient) RoomTasks(roomId string) []Task
func (*AppengineClient) Rooms ¶
func (c *AppengineClient) Rooms() []Room
func (*AppengineClient) UpdateRoom ¶
func (c *AppengineClient) UpdateRoom(roomId string, params map[string]string) []byte
params keys
- description
- icon_preset
- name
func (*AppengineClient) UpdateRoomMembers ¶
func (c *AppengineClient) UpdateRoomMembers(roomId string, params map[string]string) []byte
params keys
- members_admin_ids
- members_member_ids
- members_readonly_ids
type Client ¶
func (*Client) CreateRoom ¶
params keys
- name
- members_admin_ids
- description
- icon_preset
- members_member_ids
- members_readonly_ids
func (*Client) PostRoomMessage ¶
func (*Client) RoomMembers ¶
func (*Client) RoomMessage ¶
func (*Client) RoomMessages ¶
type Contact ¶
type Contact struct { AccountId int `json:"account_id"` RoomId int `json:"room_id"` Name string `json:"name"` ChatworkId string `json:"chatwork_id"` OrganizationId int `json:"organization_id"` OrganizationName string `json:"organization_name"` Department string `json:"department"` AvatarImageUrl string `json:"avatar_image_url"` }
type Me ¶
type Me struct { AccountId int `json:"account_id"` RoomId int `json:"room_id"` Name string `json:"name"` ChatworkId string `json:"chatwork_id"` OrganizationId int `json:"organization_id"` OrganizationName string `json:"organization_name"` Department string `json:"department"` Title string `json:"title"` Url string `json:"url"` Introduction string `json:"introduction"` Mail string `json:"mail"` TelOrganization string `json:"tel_organization"` TelExtension string `json:"tel_extension"` TelMobile string `json:"tel_mobile"` Skype string `json:"skype"` Facebook string `json:"facebook"` Twitter string `json:"twitter"` AvatarImageUrl string `json:"avatar_image_url"` }
type Member ¶
type Member struct { AccountId int `json:"account_id"` Role string `json:"role"` Name string `json:"name"` ChatworkId string `json:"chatwork_id"` Organization_Id int `json:"organization_id"` Organization_Name string `json:"organization_name"` Department string `json:"department"` AvatarImageUrl string `json:"avatar_image_url"` }
type Room ¶
type Room struct { RoomId int `json:"room_id"` Name string `json:"name"` Type string `json:"type"` Role string `json:"role"` Sticky bool `json:"sticky"` UnreadNum int `json:"unread_num"` MentionNum int `json:"mention_num"` MytaskNum int `json:"mytask_num"` MessageNum int `json:"message_num"` FileNum int `json:"file_num"` TaskNum int `json:"task_num"` IconPath string `json:"icon_path"` LastUpdateTime int64 `json:"last_update_time"` }
Click to show internal directories.
Click to hide internal directories.