Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update API version (v2) #8

Merged
merged 2 commits into from Jan 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions api.go
Expand Up @@ -6,7 +6,7 @@ import (
)

// BaseURL ChatWork API endpooint URL
const BaseURL = `https://api.chatwork.com/v1`
const BaseURL = `https://api.chatwork.com/v2`

// Me model
type Me struct {
Expand Down Expand Up @@ -211,7 +211,7 @@ type Account struct {

// Message model
type Message struct {
MessageID int `json:"message_id"`
MessageID string `json:"message_id"`
Account Account `json:"account"`
Body string `json:"body"`
SendTime int64 `json:"send_time"`
Expand Down Expand Up @@ -261,7 +261,7 @@ type Task struct {
TaskID int `json:"task_id"`
Account Account `json:"account"`
AssignedByAccount Account `json:"assigned_by_account"`
MessageID int `json:"message_id"`
MessageID string `json:"message_id"`
Body string `json:"body"`
LimitTime int64 `json:"limit_time"`
Status string `json:"status"`
Expand Down Expand Up @@ -309,7 +309,7 @@ func (c *Client) RoomTask(roomID, taskID string) (task Task, err error) {
type File struct {
FileID int `json:"file_id"`
Account Account `json:"account"`
MessageID int `json:"message_id"`
MessageID string `json:"message_id"`
Filename string `json:"filename"`
Filesize int `json:"filesize"`
UploadTime int64 `json:"upload_time"`
Expand Down