traQ v3 API
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 3.0
- Package version: 1.0.0
- Generator version: 7.14.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://github.com/traPtitech/traQ
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/contextPut the package under your project folder and add the following in import:
import traq "github.com/traPtitech/go-traq"To use a proxy, set the environment variable HTTP_PROXY:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value traq.ContextServerIndex of type int.
ctx := context.WithValue(context.Background(), traq.ContextServerIndex, 1)Templated server URL is formatted using default variables from configuration or from context value traq.ContextServerVariables of type map[string]string.
ctx := context.WithValue(context.Background(), traq.ContextServerVariables, map[string]string{
"basePath": "v2",
})Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers map in the Configuration.
An operation is uniquely identified by "{classname}Service.{nickname}" string.
Similar rules for overriding default operation server index and variables applies by using traq.ContextOperationServerIndices and traq.ContextOperationServerVariables context maps.
ctx := context.WithValue(context.Background(), traq.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), traq.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})All URIs are relative to https://q.trap.jp/api/v3
| Class | Method | HTTP request | Description |
|---|---|---|---|
| ActivityAPI | GetActivityTimeline | Get /activity/timeline | アクテビティタイムラインを取得 |
| ActivityAPI | GetOnlineUsers | Get /activity/onlines | オンラインユーザーリストを取得 |
| AuthenticationAPI | GetMyExternalAccounts | Get /users/me/ex-accounts | 外部ログインアカウント一覧を取得 |
| AuthenticationAPI | GetMySessions | Get /users/me/sessions | 自分のログインセッションリストを取得 |
| AuthenticationAPI | LinkExternalAccount | Post /users/me/ex-accounts/link | 外部ログインアカウントを紐付ける |
| AuthenticationAPI | Login | Post /login | ログイン |
| AuthenticationAPI | Logout | Post /logout | ログアウト |
| AuthenticationAPI | RevokeMySession | Delete /users/me/sessions/{sessionId} | セッションを無効化 |
| AuthenticationAPI | UnlinkExternalAccount | Post /users/me/ex-accounts/unlink | 外部ログインアカウントの紐付けを解除 |
| BotAPI | ActivateBot | Post /bots/{botId}/actions/activate | BOTをアクティベート |
| BotAPI | ChangeBotIcon | Put /bots/{botId}/icon | BOTのアイコン画像を変更 |
| BotAPI | ConnectBotWS | Get /bots/ws | WebSocket Mode BOT用通知ストリームに接続します |
| BotAPI | CreateBot | Post /bots | BOTを作成 |
| BotAPI | DeleteBot | Delete /bots/{botId} | BOTを削除 |
| BotAPI | EditBot | Patch /bots/{botId} | BOT情報を変更 |
| BotAPI | GetBot | Get /bots/{botId} | BOT情報を取得 |
| BotAPI | GetBotIcon | Get /bots/{botId}/icon | BOTのアイコン画像を取得 |
| BotAPI | GetBotLogs | Get /bots/{botId}/logs | BOTのイベントログを取得 |
| BotAPI | GetBots | Get /bots | BOTリストを取得 |
| BotAPI | GetChannelBots | Get /channels/{channelId}/bots | チャンネル参加中のBOTのリストを取得 |
| BotAPI | InactivateBot | Post /bots/{botId}/actions/inactivate | BOTをインアクティベート |
| BotAPI | LetBotJoinChannel | Post /bots/{botId}/actions/join | BOTをチャンネルに参加させる |
| BotAPI | LetBotLeaveChannel | Post /bots/{botId}/actions/leave | BOTをチャンネルから退出させる |
| BotAPI | ReissueBot | Post /bots/{botId}/actions/reissue | BOTのトークンを再発行 |
| ChannelAPI | CreateChannel | Post /channels | チャンネルを作成 |
| ChannelAPI | EditChannel | Patch /channels/{channelId} | チャンネル情報を変更 |
| ChannelAPI | EditChannelSubscribers | Patch /channels/{channelId}/subscribers | チャンネルの通知購読者を編集 |
| ChannelAPI | EditChannelTopic | Put /channels/{channelId}/topic | チャンネルトピックを編集 |
| ChannelAPI | GetChannel | Get /channels/{channelId} | チャンネル情報を取得 |
| ChannelAPI | GetChannelBots | Get /channels/{channelId}/bots | チャンネル参加中のBOTのリストを取得 |
| ChannelAPI | GetChannelEvents | Get /channels/{channelId}/events | チャンネルイベントのリストを取得 |
| ChannelAPI | GetChannelPath | Get /channels/{channelId}/path | 指定したチャンネルパスを取得 |
| ChannelAPI | GetChannelPins | Get /channels/{channelId}/pins | チャンネルピンのリストを取得 |
| ChannelAPI | GetChannelStats | Get /channels/{channelId}/stats | チャンネル統計情報を取得 |
| ChannelAPI | GetChannelSubscribers | Get /channels/{channelId}/subscribers | チャンネルの通知購読者のリストを取得 |
| ChannelAPI | GetChannelTopic | Get /channels/{channelId}/topic | チャンネルトピックを取得 |
| ChannelAPI | GetChannelViewers | Get /channels/{channelId}/viewers | チャンネル閲覧者リストを取得 |
| ChannelAPI | GetChannels | Get /channels | チャンネルリストを取得 |
| ChannelAPI | GetMessages | Get /channels/{channelId}/messages | チャンネルメッセージのリストを取得 |
| ChannelAPI | GetUserDMChannel | Get /users/{userId}/dm-channel | DMチャンネル情報を取得 |
| ChannelAPI | PostMessage | Post /channels/{channelId}/messages | チャンネルにメッセージを投稿 |
| ChannelAPI | SetChannelSubscribers | Put /channels/{channelId}/subscribers | チャンネルの通知購読者を設定 |
| ClipAPI | ClipMessage | Post /clip-folders/{folderId}/messages | メッセージをクリップフォルダに追加 |
| ClipAPI | CreateClipFolder | Post /clip-folders | クリップフォルダを作成 |
| ClipAPI | DeleteClipFolder | Delete /clip-folders/{folderId} | クリップフォルダを削除 |
| ClipAPI | EditClipFolder | Patch /clip-folders/{folderId} | クリップフォルダ情報を編集 |
| ClipAPI | GetClipFolder | Get /clip-folders/{folderId} | クリップフォルダ情報を取得 |
| ClipAPI | GetClipFolders | Get /clip-folders | クリップフォルダのリストを取得 |
| ClipAPI | GetClips | Get /clip-folders/{folderId}/messages | フォルダ内のクリップのリストを取得 |
| ClipAPI | GetMessageClips | Get /messages/{messageId}/clips | 自分のクリップを取得 |
| ClipAPI | UnclipMessage | Delete /clip-folders/{folderId}/messages/{messageId} | メッセージをクリップフォルダから除外 |
| FileAPI | DeleteFile | Delete /files/{fileId} | ファイルを削除 |
| FileAPI | GetFile | Get /files/{fileId} | ファイルをダウンロード |
| FileAPI | GetFileMeta | Get /files/{fileId}/meta | ファイルメタを取得 |
| FileAPI | GetFiles | Get /files | ファイルメタのリストを取得 |
| FileAPI | GetThumbnailImage | Get /files/{fileId}/thumbnail | サムネイル画像を取得 |
| FileAPI | PostFile | Post /files | ファイルをアップロード |
| GroupAPI | AddUserGroupAdmin | Post /groups/{groupId}/admins | グループ管理者を追加 |
| GroupAPI | AddUserGroupMember | Post /groups/{groupId}/members | グループメンバーを追加 |
| GroupAPI | ChangeUserGroupIcon | Put /groups/{groupId}/icon | ユーザーグループのアイコンを変更 |
| GroupAPI | CreateUserGroup | Post /groups | ユーザーグループを作成 |
| GroupAPI | DeleteUserGroup | Delete /groups/{groupId} | ユーザーグループを削除 |
| GroupAPI | EditUserGroup | Patch /groups/{groupId} | ユーザーグループを編集 |
| GroupAPI | EditUserGroupMember | Patch /groups/{groupId}/members/{userId} | グループメンバーを編集 |
| GroupAPI | GetUserGroup | Get /groups/{groupId} | ユーザーグループを取得 |
| GroupAPI | GetUserGroupAdmins | Get /groups/{groupId}/admins | グループ管理者を取得 |
| GroupAPI | GetUserGroupMembers | Get /groups/{groupId}/members | グループメンバーを取得 |
| GroupAPI | GetUserGroups | Get /groups | ユーザーグループのリストを取得 |
| GroupAPI | RemoveUserGroupAdmin | Delete /groups/{groupId}/admins/{userId} | グループ管理者を削除 |
| GroupAPI | RemoveUserGroupMember | Delete /groups/{groupId}/members/{userId} | グループメンバーを削除 |
| GroupAPI | RemoveUserGroupMembers | Delete /groups/{groupId}/members | グループメンバーを一括削除 |
| MeAPI | AddMyStar | Post /users/me/stars | チャンネルをスターに追加 |
| MeAPI | AddMyUserTag | Post /users/me/tags | 自分にタグを追加 |
| MeAPI | ChangeMyIcon | Put /users/me/icon | 自分のアイコン画像を変更 |
| MeAPI | ChangeMyNotifyCitation | Put /users/me/settings/notify-citation | メッセージ引用通知の設定情報を変更 |
| MeAPI | ChangeMyPassword | Put /users/me/password | 自分のパスワードを変更 |
| MeAPI | EditMe | Patch /users/me | 自分のユーザー情報を変更 |
| MeAPI | EditMyUserTag | Patch /users/me/tags/{tagId} | 自分のタグを編集 |
| MeAPI | GetMe | Get /users/me | 自分のユーザー詳細を取得 |
| MeAPI | GetMyChannelSubscriptions | Get /users/me/subscriptions | 自分のチャンネル購読状態を取得 |
| MeAPI | GetMyExternalAccounts | Get /users/me/ex-accounts | 外部ログインアカウント一覧を取得 |
| MeAPI | GetMyIcon | Get /users/me/icon | 自分のアイコン画像を取得 |
| MeAPI | GetMyNotifyCitation | Get /users/me/settings/notify-citation | メッセージ引用通知の設定情報を取得 |
| MeAPI | GetMyQRCode | Get /users/me/qr-code | QRコードを取得 |
| MeAPI | GetMySessions | Get /users/me/sessions | 自分のログインセッションリストを取得 |
| MeAPI | GetMyStampHistory | Get /users/me/stamp-history | スタンプ履歴を取得 |
| MeAPI | GetMyStampRecommendations | Get /users/me/stamp-recommendations | スタンプレコメンドを取得 |
| MeAPI | GetMyStars | Get /users/me/stars | スターチャンネルリストを取得 |
| MeAPI | GetMyTokens | Get /users/me/tokens | 有効トークンのリストを取得 |
| MeAPI | GetMyUnreadChannels | Get /users/me/unread | 未読チャンネルを取得 |
| MeAPI | GetMyUserTags | Get /users/me/tags | 自分のタグリストを取得 |
| MeAPI | GetMyViewStates | Get /users/me/view-states | 自身のチャンネル閲覧状態一覧を取得 |
| MeAPI | GetOIDCUserInfo | Get /users/me/oidc | 自分のユーザー詳細を取得 (OIDC UserInfo) |
| MeAPI | GetUserSettings | Get /users/me/settings | ユーザー設定を取得 |
| MeAPI | LinkExternalAccount | Post /users/me/ex-accounts/link | 外部ログインアカウントを紐付ける |
| MeAPI | ReadChannel | Delete /users/me/unread/{channelId} | チャンネルを既読にする |
| MeAPI | RegisterFCMDevice | Post /users/me/fcm-device | FCMデバイスを登録 |
| MeAPI | RemoveMyStar | Delete /users/me/stars/{channelId} | チャンネルをスターから削除します |
| MeAPI | RemoveMyUserTag | Delete /users/me/tags/{tagId} | 自分からタグを削除します |
| MeAPI | RevokeMySession | Delete /users/me/sessions/{sessionId} | セッションを無効化 |
| MeAPI | RevokeMyToken | Delete /users/me/tokens/{tokenId} | トークンの認可を取り消す |
| MeAPI | SetChannelSubscribeLevel | Put /users/me/subscriptions/{channelId} | チャンネル購読レベルを設定 |
| MeAPI | UnlinkExternalAccount | Post /users/me/ex-accounts/unlink | 外部ログインアカウントの紐付けを解除 |
| MessageAPI | AddMessageStamp | Post /messages/{messageId}/stamps/{stampId} | スタンプを押す |
| MessageAPI | CreatePin | Post /messages/{messageId}/pin | ピン留めする |
| MessageAPI | DeleteMessage | Delete /messages/{messageId} | メッセージを削除 |
| MessageAPI | EditMessage | Put /messages/{messageId} | メッセージを編集 |
| MessageAPI | GetDirectMessages | Get /users/{userId}/messages | ダイレクトメッセージのリストを取得 |
| MessageAPI | GetMessage | Get /messages/{messageId} | メッセージを取得 |
| MessageAPI | GetMessageClips | Get /messages/{messageId}/clips | 自分のクリップを取得 |
| MessageAPI | GetMessageStamps | Get /messages/{messageId}/stamps | メッセージのスタンプリストを取得 |
| MessageAPI | GetMessages | Get /channels/{channelId}/messages | チャンネルメッセージのリストを取得 |
| MessageAPI | GetPin | Get /messages/{messageId}/pin | ピン留めを取得 |
| MessageAPI | PostDirectMessage | Post /users/{userId}/messages | ダイレクトメッセージを送信 |
| MessageAPI | PostMessage | Post /channels/{channelId}/messages | チャンネルにメッセージを投稿 |
| MessageAPI | RemoveMessageStamp | Delete /messages/{messageId}/stamps/{stampId} | スタンプを消す |
| MessageAPI | RemovePin | Delete /messages/{messageId}/pin | ピン留めを外す |
| MessageAPI | SearchMessages | Get /messages | メッセージを検索 |
| NotificationAPI | EditChannelSubscribers | Patch /channels/{channelId}/subscribers | チャンネルの通知購読者を編集 |
| NotificationAPI | GetChannelSubscribers | Get /channels/{channelId}/subscribers | チャンネルの通知購読者のリストを取得 |
| NotificationAPI | GetMyChannelSubscriptions | Get /users/me/subscriptions | 自分のチャンネル購読状態を取得 |
| NotificationAPI | GetMyUnreadChannels | Get /users/me/unread | 未読チャンネルを取得 |
| NotificationAPI | GetMyViewStates | Get /users/me/view-states | 自身のチャンネル閲覧状態一覧を取得 |
| NotificationAPI | ReadChannel | Delete /users/me/unread/{channelId} | チャンネルを既読にする |
| NotificationAPI | RegisterFCMDevice | Post /users/me/fcm-device | FCMデバイスを登録 |
| NotificationAPI | SetChannelSubscribeLevel | Put /users/me/subscriptions/{channelId} | チャンネル購読レベルを設定 |
| NotificationAPI | SetChannelSubscribers | Put /channels/{channelId}/subscribers | チャンネルの通知購読者を設定 |
| NotificationAPI | Ws | Get /ws | WebSocket通知ストリームに接続します |
| Oauth2API | CreateClient | Post /clients | OAuth2クライアントを作成 |
| Oauth2API | DeleteClient | Delete /clients/{clientId} | OAuth2クライアントを削除 |
| Oauth2API | EditClient | Patch /clients/{clientId} | OAuth2クライアント情報を変更 |
| Oauth2API | GetClient | Get /clients/{clientId} | OAuth2クライアント情報を取得 |
| Oauth2API | GetClients | Get /clients | OAuth2クライアントのリストを取得 |
| Oauth2API | GetMyTokens | Get /users/me/tokens | 有効トークンのリストを取得 |
| Oauth2API | GetOAuth2Authorize | Get /oauth2/authorize | OAuth2 認可エンドポイント |
| Oauth2API | PostOAuth2Authorize | Post /oauth2/authorize | OAuth2 認可エンドポイント |
| Oauth2API | PostOAuth2AuthorizeDecide | Post /oauth2/authorize/decide | OAuth2 認可承諾API |
| Oauth2API | PostOAuth2Token | Post /oauth2/token | OAuth2 トークンエンドポイント |
| Oauth2API | RevokeClientTokens | Delete /clients/{clientId}/tokens | OAuthクライアントのトークンを削除 |
| Oauth2API | RevokeMyToken | Delete /users/me/tokens/{tokenId} | トークンの認可を取り消す |
| Oauth2API | RevokeOAuth2Token | Post /oauth2/revoke | OAuth2 トークン無効化エンドポイント |
| OgpAPI | DeleteOgpCache | Delete /ogp/cache | OGP情報のキャッシュを削除 |
| OgpAPI | GetOgp | Get /ogp | OGP情報を取得 |
| PinAPI | CreatePin | Post /messages/{messageId}/pin | ピン留めする |
| PinAPI | GetChannelPins | Get /channels/{channelId}/pins | チャンネルピンのリストを取得 |
| PinAPI | GetPin | Get /messages/{messageId}/pin | ピン留めを取得 |
| PinAPI | RemovePin | Delete /messages/{messageId}/pin | ピン留めを外す |
| PublicAPI | GetPublicUserIcon | Get /public/icon/{username} | ユーザーのアイコン画像を取得 |
| PublicAPI | GetServerVersion | Get /version | バージョンを取得 |
| QallAPI | ChangeParticipantRole | Patch /qall/rooms/{roomId}/participants | ルームでの発言権限を変更 |
| QallAPI | GetLiveKitToken | Get /qall/token | LiveKitトークンを取得 |
| QallAPI | GetQallEndpoints | Get /qall/endpoints | LiveKitエンドポイントを取得 |
| QallAPI | GetRoomMetadata | Get /qall/rooms/{roomId}/metadata | ルームのメタデータを取得 |
| QallAPI | GetRooms | Get /qall/rooms | ルームと参加者の一覧を取得 |
| QallAPI | GetSoundboardList | Get /qall/soundboard | サウンドボード用の音声一覧を取得 |
| QallAPI | LiveKitWebhook | Post /qall/webhook | LiveKit Webhook受信 |
| QallAPI | PostSoundboard | Post /qall/soundboard | サウンドボード用の短い音声ファイルをアップロード |
| QallAPI | PostSoundboardPlay | Post /qall/soundboard/play | アップロード済み音声を LiveKit ルームで再生 |
| QallAPI | UpdateRoomMetadata | Patch /qall/rooms/{roomId}/metadata | ルームのメタデータを更新 |
| StampAPI | AddMessageStamp | Post /messages/{messageId}/stamps/{stampId} | スタンプを押す |
| StampAPI | ChangeStampImage | Put /stamps/{stampId}/image | スタンプ画像を変更 |
| StampAPI | CreateStamp | Post /stamps | スタンプを作成 |
| StampAPI | CreateStampPalette | Post /stamp-palettes | スタンプパレットを作成 |
| StampAPI | DeleteStamp | Delete /stamps/{stampId} | スタンプを削除 |
| StampAPI | DeleteStampPalette | Delete /stamp-palettes/{paletteId} | スタンプパレットを削除 |
| StampAPI | EditStamp | Patch /stamps/{stampId} | スタンプ情報を変更 |
| StampAPI | EditStampPalette | Patch /stamp-palettes/{paletteId} | スタンプパレットを編集 |
| StampAPI | GetMessageStamps | Get /messages/{messageId}/stamps | メッセージのスタンプリストを取得 |
| StampAPI | GetMyStampHistory | Get /users/me/stamp-history | スタンプ履歴を取得 |
| StampAPI | GetMyStampRecommendations | Get /users/me/stamp-recommendations | スタンプレコメンドを取得 |
| StampAPI | GetStamp | Get /stamps/{stampId} | スタンプ情報を取得 |
| StampAPI | GetStampImage | Get /stamps/{stampId}/image | スタンプ画像を取得 |
| StampAPI | GetStampPalette | Get /stamp-palettes/{paletteId} | スタンプパレットを取得 |
| StampAPI | GetStampPalettes | Get /stamp-palettes | スタンプパレットのリストを取得 |
| StampAPI | GetStampStats | Get /stamps/{stampId}/stats | スタンプ統計情報を取得 |
| StampAPI | GetStamps | Get /stamps | スタンプリストを取得 |
| StampAPI | RemoveMessageStamp | Delete /messages/{messageId}/stamps/{stampId} | スタンプを消す |
| StarAPI | AddMyStar | Post /users/me/stars | チャンネルをスターに追加 |
| StarAPI | GetMyStars | Get /users/me/stars | スターチャンネルリストを取得 |
| StarAPI | RemoveMyStar | Delete /users/me/stars/{channelId} | チャンネルをスターから削除します |
| UserAPI | AddUserTag | Post /users/{userId}/tags | ユーザーにタグを追加 |
| UserAPI | ChangeUserIcon | Put /users/{userId}/icon | ユーザーのアイコン画像を変更します |
| UserAPI | ChangeUserPassword | Put /users/{userId}/password | ユーザーのパスワードを変更 |
| UserAPI | CreateUser | Post /users | ユーザーを登録 |
| UserAPI | EditUser | Patch /users/{userId} | ユーザー情報を変更 |
| UserAPI | EditUserTag | Patch /users/{userId}/tags/{tagId} | ユーザーのタグを編集 |
| UserAPI | GetDirectMessages | Get /users/{userId}/messages | ダイレクトメッセージのリストを取得 |
| UserAPI | GetUser | Get /users/{userId} | ユーザー詳細情報を取得 |
| UserAPI | GetUserDMChannel | Get /users/{userId}/dm-channel | DMチャンネル情報を取得 |
| UserAPI | GetUserIcon | Get /users/{userId}/icon | ユーザーのアイコン画像を取得 |
| UserAPI | GetUserStats | Get /users/{userId}/stats | ユーザー統計情報を取得 |
| UserAPI | GetUserTags | Get /users/{userId}/tags | ユーザーのタグリストを取得 |
| UserAPI | GetUsers | Get /users | ユーザーのリストを取得 |
| UserAPI | PostDirectMessage | Post /users/{userId}/messages | ダイレクトメッセージを送信 |
| UserAPI | RemoveUserTag | Delete /users/{userId}/tags/{tagId} | ユーザーからタグを削除します |
| UserTagAPI | AddMyUserTag | Post /users/me/tags | 自分にタグを追加 |
| UserTagAPI | AddUserTag | Post /users/{userId}/tags | ユーザーにタグを追加 |
| UserTagAPI | EditMyUserTag | Patch /users/me/tags/{tagId} | 自分のタグを編集 |
| UserTagAPI | EditUserTag | Patch /users/{userId}/tags/{tagId} | ユーザーのタグを編集 |
| UserTagAPI | GetMyUserTags | Get /users/me/tags | 自分のタグリストを取得 |
| UserTagAPI | GetTag | Get /tags/{tagId} | タグ情報を取得 |
| UserTagAPI | GetUserTags | Get /users/{userId}/tags | ユーザーのタグリストを取得 |
| UserTagAPI | RemoveMyUserTag | Delete /users/me/tags/{tagId} | 自分からタグを削除します |
| UserTagAPI | RemoveUserTag | Delete /users/{userId}/tags/{tagId} | ユーザーからタグを削除します |
| WebhookAPI | ChangeWebhookIcon | Put /webhooks/{webhookId}/icon | Webhookのアイコンを変更 |
| WebhookAPI | CreateWebhook | Post /webhooks | Webhookを新規作成 |
| WebhookAPI | DeleteWebhook | Delete /webhooks/{webhookId} | Webhookを削除 |
| WebhookAPI | DeleteWebhookMessage | Delete /webhooks/:webhookID/messages/:messageID | Webhookの投稿メッセージを削除 |
| WebhookAPI | EditWebhook | Patch /webhooks/{webhookId} | Webhook情報を変更 |
| WebhookAPI | GetWebhook | Get /webhooks/{webhookId} | Webhook情報を取得 |
| WebhookAPI | GetWebhookIcon | Get /webhooks/{webhookId}/icon | Webhookのアイコンを取得 |
| WebhookAPI | GetWebhookMessages | Get /webhooks/{webhookId}/messages | Webhookの投稿メッセージのリストを取得 |
| WebhookAPI | GetWebhooks | Get /webhooks | Webhook情報のリストを取得します |
| WebhookAPI | PostWebhook | Post /webhooks/{webhookId} | Webhookを送信 |
| WebrtcAPI | GetWebRTCState | Get /webrtc/state | WebRTC状態を取得 |
| WebrtcAPI | PostWebRTCAuthenticate | Post /webrtc/authenticate | Skyway用認証API |
- ActiveOAuth2Token
- ActivityTimelineMessage
- AddUserGroupMemberRequest
- Bot
- BotDetail
- BotEventLog
- BotEventResult
- BotMode
- BotState
- BotTokens
- BotUser
- Channel
- ChannelEvent
- ChannelEventDetail
- ChannelList
- ChannelPath
- ChannelStats
- ChannelStatsStamp
- ChannelStatsUser
- ChannelSubscribeLevel
- ChannelTopic
- ChannelViewState
- ChannelViewer
- ChildCreatedEvent
- ClipFolder
- ClippedMessage
- DMChannel
- ExternalProviderUser
- FileInfo
- FileInfoThumbnail
- ForcedNotificationChangedEvent
- GetBot200Response
- GetClient200Response
- GetMyStampRecommendations200ResponseInner
- GetNotifyCitation
- LoginSession
- Message
- MessageClip
- MessagePin
- MessageSearchResult
- MessageStamp
- MyChannelViewState
- MyUserDetail
- NameChangedEvent
- OAuth2Client
- OAuth2ClientDetail
- OAuth2Prompt
- OAuth2ResponseType
- OAuth2Scope
- OAuth2Token
- OIDCTraqUserInfo
- OIDCUserInfo
- Ogp
- OgpMedia
- ParentChangedEvent
- PatchBotRequest
- PatchChannelRequest
- PatchChannelSubscribersRequest
- PatchClientRequest
- PatchClipFolderRequest
- PatchGroupMemberRequest
- PatchMeRequest
- PatchStampPaletteRequest
- PatchStampRequest
- PatchUserGroupRequest
- PatchUserRequest
- PatchUserTagRequest
- PatchWebhookRequest
- Pin
- PinAddedEvent
- PinRemovedEvent
- PostBotActionJoinRequest
- PostBotActionLeaveRequest
- PostBotRequest
- PostChannelRequest
- PostClientRequest
- PostClipFolderMessageRequest
- PostClipFolderRequest
- PostLinkExternalAccount
- PostLoginRequest
- PostMessageRequest
- PostMessageStampRequest
- PostMyFCMDeviceRequest
- PostStampPaletteRequest
- PostStarRequest
- PostUnlinkExternalAccount
- PostUserGroupAdminRequest
- PostUserGroupRequest
- PostUserRequest
- PostUserTagRequest
- PostWebRTCAuthenticateRequest
- PostWebhookRequest
- PutChannelSubscribeLevelRequest
- PutChannelSubscribersRequest
- PutChannelTopicRequest
- PutMyPasswordRequest
- PutNotifyCitationRequest
- PutUserPasswordRequest
- QallEndpointResponse
- QallMetadataRequest
- QallMetadataResponse
- QallParticipant
- QallParticipantRequest
- QallParticipantRequestUsersInner
- QallParticipantResponse
- QallParticipantResponseResultsInner
- QallRoomStateChangedEvent
- QallRoomStateChangedEventRoomStatesInner
- QallRoomStateChangedEventRoomStatesInnerParticipantsInner
- QallRoomWithParticipants
- QallSoundboardItemCreatedEvent
- QallSoundboardItemDeletedEvent
- QallTokenResponse
- Session
- SoundboardItem
- SoundboardPlayRequest
- SoundboardPlayResponse
- SoundboardUploadResponse
- Stamp
- StampHistoryEntry
- StampPalette
- StampStats
- StampWithThumbnail
- SubscribersChangedEvent
- Tag
- ThumbnailInfo
- ThumbnailType
- TopicChangedEvent
- UnreadChannel
- User
- UserAccountState
- UserDetail
- UserGroup
- UserGroupMember
- UserPermission
- UserSettings
- UserStats
- UserStatsStamp
- UserSubscribeState
- UserTag
- Version
- VersionFlags
- VisibilityChangedEvent
- WebRTCAuthenticateResult
- WebRTCUserState
- Webhook
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: r_session
- Location:
Note, each API key must be added to a map of map[string]APIKey where the key is: cookieAuth and passed in as the auth context for each request.
Example
auth := context.WithValue(
context.Background(),
traq.ContextAPIKeys,
map[string]traq.APIKey{
"cookieAuth": {Key: "API_KEY_STRING"},
},
)
r, err := client.Service.Operation(auth, args)- Type: OAuth
- Flow: accessCode
- Authorization URL: /api/v3/oauth2/authorize
- Scopes:
- read: 読み取りスコープ
- write: 書き込みスコープ
- manage_bot: bot関連読み書きスコープ
Example
auth := context.WithValue(context.Background(), traq.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)Or via OAuth2 module to automatically refresh tokens and perform user authentication.
import "golang.org/x/oauth2"
/* Perform OAuth2 round trip request and obtain a token */
tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, traq.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)- Type: HTTP Bearer token authentication
Example
auth := context.WithValue(context.Background(), traq.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBoolPtrIntPtrInt32PtrInt64PtrFloatPtrFloat32PtrFloat64PtrStringPtrTime