Go製のChatworkAPIのラッパーライブラリです。
チャットワークAPI公式ドキュメント:
http://developer.chatwork.com/ja/
GET /rooms/{room_id}/tasks
package main
import "./go-chatwork"
import "fmt"
func main(){
client := chatwork.New("token指定")
api := client.RoomTask
api.SetRoomId("部屋ID")
api.SetAccountId("タスクの担当者のアカウントID")
api.SetAssignedByAccountId("タスクの依頼者のアカウントID")
api.SetStatus("タスクのステータス(open / done)")
tasks := api.Execute()
fmt.Println(tasks)
}
GET /rooms
package main
import "./go-chatwork"
import "fmt"
func main(){
client := chatwork.New("token指定")
api := client.GetRoom
room := api.Execute()
fmt.Println(room)
}
GET /rooms/{room_id}/members
package main
import "./go-chatwork"
import "fmt"
func main(){
client := chatwork.New("token指定")
api := client.GetRoomMember
api.SetRoomId("部屋ID")
room := api.Execute()
fmt.Println(room)
}
POST /rooms/{room_id}/messages
package main
import "./go-chatwork"
import "fmt"
func main(){
client := chatwork.New("token指定")
api := client.PostRoomMessage
api.SetBody("メッセージ")
api.SetRoomId("部屋ID")
message := api.Execute()
fmt.Println(message)
}
GET/rooms/{room_id}/messages
package main
import "./go-chatwork"
import "fmt"
func main(){
client := chatwork.New("token指定")
api := client.GetRoomMessage
api.SetRoomId("部屋ID")
message := api.Execute()
fmt.Println(message)
}