Documentation ¶
Index ¶
- Constants
- func BuildBody(params map[string]string) url.Values
- func BuildURL(endpoint *url.URL, params map[string]string) *url.URL
- type Client
- func (c Client) Contacts() ([]cw.Contact, error)
- func (c Client) ContactsContext(ctx context.Context) (contacts []cw.Contact, err error)
- func (c Client) CreateRoom(params map[string]string) ([]byte, error)
- func (c Client) CreateRoomContext(ctx context.Context, params map[string]string) ([]byte, error)
- func (c Client) DeleteRoom(roomId string, params map[string]string) ([]byte, error)
- func (c Client) DeleteRoomContext(ctx context.Context, roomId string, params map[string]string) ([]byte, error)
- func (c Client) Me() (me cw.Me, err error)
- func (c Client) MeContext(ctx context.Context) (me cw.Me, err error)
- func (c Client) MyStatus() (cw.Status, error)
- func (c Client) MyStatusContext(ctx context.Context) (status cw.Status, err error)
- func (c Client) MyTasks(params map[string]string) ([]cw.MyTask, error)
- func (c Client) MyTasksContext(ctx context.Context, params map[string]string) (tasks []cw.MyTask, err error)
- func (c Client) PostRoomMessage(roomId string, body string) ([]byte, error)
- func (c Client) PostRoomMessageContext(ctx context.Context, roomId string, body string) ([]byte, error)
- func (c Client) PostRoomTask(roomId string, params map[string]string) ([]byte, error)
- func (c Client) PostRoomTaskContext(ctx context.Context, roomId string, params map[string]string) ([]byte, error)
- func (c Client) RateLimit() *RateLimit
- func (c Client) RoomFileContext(ctx context.Context, roomId, fileId string, params map[string]string) (file cw.File, err error)
- func (c Client) RoomFiles(roomId string, params map[string]string) ([]cw.File, error)
- func (c Client) RoomFilesContext(ctx context.Context, roomId string, params map[string]string) (files []cw.File, err error)
- func (c Client) RoomMembers(roomId string) ([]cw.Member, error)
- func (c Client) RoomMembersContext(ctx context.Context, roomId string) (members []cw.Member, err error)
- func (c Client) RoomMessage(roomId, messageId string) (Message, error)
- func (c Client) RoomMessageContext(ctx context.Context, roomId, messageId string) (msg Message, err error)
- func (c Client) RoomMessages(roomId string, params map[string]string) ([]Message, error)
- func (c Client) RoomMessagesContext(ctx context.Context, roomId string, params map[string]string) (msgs []Message, err error)
- func (c Client) RoomTask(roomId, taskId string) (Task, error)
- func (c Client) RoomTaskContext(ctx context.Context, roomId, taskId string) (task Task, err error)
- func (c Client) RoomTasks(roomId string, params map[string]string) ([]Task, error)
- func (c Client) RoomTasksContext(ctx context.Context, roomId string, params map[string]string) (tasks []Task, err error)
- func (c Client) Rooms() ([]cw.Room, error)
- func (c Client) RoomsContext(ctx context.Context) (rooms []cw.Room, err error)
- func (c *Client) SetBaseURL(baseURL string) (err error)
- func (c Client) UpdateRoom(roomId string, params map[string]string) ([]byte, error)
- func (c Client) UpdateRoomContext(ctx context.Context, roomId string, params map[string]string) ([]byte, error)
- func (c Client) UpdateRoomMembers(roomId string, params map[string]string) ([]byte, error)
- func (c Client) UpdateRoomMembersContext(ctx context.Context, roomId string, params map[string]string) ([]byte, error)
- type File
- type HTTPHeader
- type Message
- type RateLimit
- type Task
Constants ¶
View Source
const CHATWORK_API = "https://api.chatwork.com/v2/"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { APIKey string BaseURL *url.URL Debug bool HTTPClient *http.Client Logger *log.Logger // contains filtered or unexported fields }
func (Client) ContactsContext ¶
func (Client) CreateRoomContext ¶
func (Client) DeleteRoom ¶
func (Client) DeleteRoomContext ¶
func (Client) MyStatusContext ¶
func (Client) MyTasksContext ¶
func (Client) PostRoomMessage ¶
func (Client) PostRoomMessageContext ¶
func (Client) PostRoomTask ¶
func (Client) PostRoomTaskContext ¶
func (Client) RoomFileContext ¶
func (Client) RoomFilesContext ¶
func (Client) RoomMembersContext ¶
func (Client) RoomMessageContext ¶
func (Client) RoomMessages ¶
func (Client) RoomMessagesContext ¶
func (Client) RoomTaskContext ¶
func (Client) RoomTasksContext ¶
func (Client) RoomsContext ¶
func (*Client) SetBaseURL ¶
func (Client) UpdateRoom ¶
func (Client) UpdateRoomContext ¶
func (Client) UpdateRoomMembers ¶
type File ¶
type File struct { FileID int `json:"file_id"` Account cw.Account `json:"account"` MessageID string `json:"message_id"` Filename string `json:"filename"` Filesize int `json:"filesize"` UploadTime time.Time `json:"upload_time"` DownloadURL *url.URL `json:"download_url"` }
func (*File) UnmarshalJSON ¶
type HTTPHeader ¶
type Message ¶
type Message struct { MessageID string `json:"message_id"` Account cw.Account `json:"account"` Body string `json:"body"` SendTime time.Time `json:"send_time"` UpdateTime time.Time `json:"update_time"` }
func (*Message) UnmarshalJSON ¶
type Task ¶
type Task struct { TaskID int `json:"task_id"` Account cw.Account `json:"account"` AssignedByAccount cw.Account `json:"assigned_by_account"` MessageID string `json:"message_id"` Body string `json:"body"` LimitTime time.Time `json:"limit_time"` Status string `json:"status"` }
func (*Task) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.