diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index bf3c3ae..a703cf3 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -24,12 +24,12 @@ api_webrtc.go client.go configuration.go docs/ActiveOAuth2Token.md -docs/ActivityApi.md +docs/ActivityAPI.md docs/ActivityTimelineMessage.md docs/AddUserGroupMemberRequest.md -docs/AuthenticationApi.md +docs/AuthenticationAPI.md docs/Bot.md -docs/BotApi.md +docs/BotAPI.md docs/BotDetail.md docs/BotEventLog.md docs/BotEventResult.md @@ -38,7 +38,7 @@ docs/BotState.md docs/BotTokens.md docs/BotUser.md docs/Channel.md -docs/ChannelApi.md +docs/ChannelAPI.md docs/ChannelEvent.md docs/ChannelEventDetail.md docs/ChannelList.md @@ -51,23 +51,23 @@ docs/ChannelTopic.md docs/ChannelViewState.md docs/ChannelViewer.md docs/ChildCreatedEvent.md -docs/ClipApi.md +docs/ClipAPI.md docs/ClipFolder.md docs/ClippedMessage.md docs/DMChannel.md docs/ExternalProviderUser.md -docs/FileApi.md +docs/FileAPI.md docs/FileInfo.md docs/FileInfoThumbnail.md docs/ForcedNotificationChangedEvent.md docs/GetBot200Response.md docs/GetClient200Response.md docs/GetNotifyCitation.md -docs/GroupApi.md +docs/GroupAPI.md docs/LoginSession.md -docs/MeApi.md +docs/MeAPI.md docs/Message.md -docs/MessageApi.md +docs/MessageAPI.md docs/MessageClip.md docs/MessagePin.md docs/MessageSearchResult.md @@ -75,7 +75,7 @@ docs/MessageStamp.md docs/MyChannelViewState.md docs/MyUserDetail.md docs/NameChangedEvent.md -docs/NotificationApi.md +docs/NotificationAPI.md docs/OAuth2Client.md docs/OAuth2ClientDetail.md docs/OAuth2Prompt.md @@ -84,9 +84,9 @@ docs/OAuth2Scope.md docs/OAuth2Token.md docs/OIDCTraqUserInfo.md docs/OIDCUserInfo.md -docs/Oauth2Api.md +docs/Oauth2API.md docs/Ogp.md -docs/OgpApi.md +docs/OgpAPI.md docs/OgpMedia.md docs/ParentChangedEvent.md docs/PatchBotRequest.md @@ -103,8 +103,8 @@ docs/PatchUserRequest.md docs/PatchUserTagRequest.md docs/PatchWebhookRequest.md docs/Pin.md +docs/PinAPI.md docs/PinAddedEvent.md -docs/PinApi.md docs/PinRemovedEvent.md docs/PostBotActionJoinRequest.md docs/PostBotActionLeaveRequest.md @@ -127,14 +127,14 @@ docs/PostUserRequest.md docs/PostUserTagRequest.md docs/PostWebRTCAuthenticateRequest.md docs/PostWebhookRequest.md -docs/PublicApi.md +docs/PublicAPI.md docs/PutChannelSubscribeLevelRequest.md docs/PutChannelSubscribersRequest.md docs/PutChannelTopicRequest.md docs/PutMyPasswordRequest.md docs/PutNotifyCitationRequest.md docs/PutUserPasswordRequest.md -docs/QallApi.md +docs/QallAPI.md docs/QallEndpointResponse.md docs/QallMetadataRequest.md docs/QallMetadataResponse.md @@ -156,12 +156,12 @@ docs/SoundboardPlayRequest.md docs/SoundboardPlayResponse.md docs/SoundboardUploadResponse.md docs/Stamp.md -docs/StampApi.md +docs/StampAPI.md docs/StampHistoryEntry.md docs/StampPalette.md docs/StampStats.md docs/StampWithThumbnail.md -docs/StarApi.md +docs/StarAPI.md docs/SubscribersChangedEvent.md docs/Tag.md docs/ThumbnailInfo.md @@ -169,8 +169,8 @@ docs/ThumbnailType.md docs/TopicChangedEvent.md docs/UnreadChannel.md docs/User.md +docs/UserAPI.md docs/UserAccountState.md -docs/UserApi.md docs/UserDetail.md docs/UserGroup.md docs/UserGroupMember.md @@ -180,15 +180,15 @@ docs/UserStats.md docs/UserStatsStamp.md docs/UserSubscribeState.md docs/UserTag.md -docs/UserTagApi.md +docs/UserTagAPI.md docs/Version.md docs/VersionFlags.md docs/VisibilityChangedEvent.md docs/WebRTCAuthenticateResult.md docs/WebRTCUserState.md docs/Webhook.md -docs/WebhookApi.md -docs/WebrtcApi.md +docs/WebhookAPI.md +docs/WebrtcAPI.md model_active_o_auth2_token.go model_activity_timeline_message.go model_add_user_group_member_request.go diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index cd802a1..e465da4 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -6.6.0 \ No newline at end of file +7.14.0 diff --git a/api_activity.go b/api_activity.go index 4cf9c33..ca3b24b 100644 --- a/api_activity.go +++ b/api_activity.go @@ -18,36 +18,36 @@ import ( "net/url" ) -// ActivityApiService ActivityApi service -type ActivityApiService service +// ActivityAPIService ActivityAPI service +type ActivityAPIService service -type ActivityApiGetActivityTimelineRequest struct { +type ActivityAPIGetActivityTimelineRequest struct { ctx context.Context - ApiService *ActivityApiService + ApiService *ActivityAPIService limit *int32 all *bool perChannel *bool } // 取得する件数 -func (r ActivityApiGetActivityTimelineRequest) Limit(limit int32) ActivityApiGetActivityTimelineRequest { +func (r ActivityAPIGetActivityTimelineRequest) Limit(limit int32) ActivityAPIGetActivityTimelineRequest { r.limit = &limit return r } // 全てのチャンネルのタイムラインを取得する -func (r ActivityApiGetActivityTimelineRequest) All(all bool) ActivityApiGetActivityTimelineRequest { +func (r ActivityAPIGetActivityTimelineRequest) All(all bool) ActivityAPIGetActivityTimelineRequest { r.all = &all return r } // 同じチャンネルのメッセージは最新のもののみ取得するか -func (r ActivityApiGetActivityTimelineRequest) PerChannel(perChannel bool) ActivityApiGetActivityTimelineRequest { +func (r ActivityAPIGetActivityTimelineRequest) PerChannel(perChannel bool) ActivityAPIGetActivityTimelineRequest { r.perChannel = &perChannel return r } -func (r ActivityApiGetActivityTimelineRequest) Execute() ([]ActivityTimelineMessage, *http.Response, error) { +func (r ActivityAPIGetActivityTimelineRequest) Execute() ([]ActivityTimelineMessage, *http.Response, error) { return r.ApiService.GetActivityTimelineExecute(r) } @@ -58,10 +58,10 @@ GetActivityTimeline アクテビティタイムラインを取得 `all`が`true`でない場合、購読チャンネルのみのタイムラインを取得します @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ActivityApiGetActivityTimelineRequest + @return ActivityAPIGetActivityTimelineRequest */ -func (a *ActivityApiService) GetActivityTimeline(ctx context.Context) ActivityApiGetActivityTimelineRequest { - return ActivityApiGetActivityTimelineRequest{ +func (a *ActivityAPIService) GetActivityTimeline(ctx context.Context) ActivityAPIGetActivityTimelineRequest { + return ActivityAPIGetActivityTimelineRequest{ ApiService: a, ctx: ctx, } @@ -70,7 +70,7 @@ func (a *ActivityApiService) GetActivityTimeline(ctx context.Context) ActivityAp // Execute executes the request // // @return []ActivityTimelineMessage -func (a *ActivityApiService) GetActivityTimelineExecute(r ActivityApiGetActivityTimelineRequest) ([]ActivityTimelineMessage, *http.Response, error) { +func (a *ActivityAPIService) GetActivityTimelineExecute(r ActivityAPIGetActivityTimelineRequest) ([]ActivityTimelineMessage, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -78,7 +78,7 @@ func (a *ActivityApiService) GetActivityTimelineExecute(r ActivityApiGetActivity localVarReturnValue []ActivityTimelineMessage ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ActivityApiService.GetActivityTimeline") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ActivityAPIService.GetActivityTimeline") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -90,13 +90,22 @@ func (a *ActivityApiService) GetActivityTimelineExecute(r ActivityApiGetActivity localVarFormParams := url.Values{} if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } else { + var defaultValue int32 = 50 + r.limit = &defaultValue } if r.all != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "all", r.all, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "all", r.all, "form", "") + } else { + var defaultValue bool = false + r.all = &defaultValue } if r.perChannel != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "per_channel", r.perChannel, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "per_channel", r.perChannel, "form", "") + } else { + var defaultValue bool = false + r.perChannel = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -152,12 +161,12 @@ func (a *ActivityApiService) GetActivityTimelineExecute(r ActivityApiGetActivity return localVarReturnValue, localVarHTTPResponse, nil } -type ActivityApiGetOnlineUsersRequest struct { +type ActivityAPIGetOnlineUsersRequest struct { ctx context.Context - ApiService *ActivityApiService + ApiService *ActivityAPIService } -func (r ActivityApiGetOnlineUsersRequest) Execute() ([]string, *http.Response, error) { +func (r ActivityAPIGetOnlineUsersRequest) Execute() ([]string, *http.Response, error) { return r.ApiService.GetOnlineUsersExecute(r) } @@ -167,10 +176,10 @@ GetOnlineUsers オンラインユーザーリストを取得 現在オンラインな(SSEまたはWSが接続中)ユーザーのUUIDのリストを返します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ActivityApiGetOnlineUsersRequest + @return ActivityAPIGetOnlineUsersRequest */ -func (a *ActivityApiService) GetOnlineUsers(ctx context.Context) ActivityApiGetOnlineUsersRequest { - return ActivityApiGetOnlineUsersRequest{ +func (a *ActivityAPIService) GetOnlineUsers(ctx context.Context) ActivityAPIGetOnlineUsersRequest { + return ActivityAPIGetOnlineUsersRequest{ ApiService: a, ctx: ctx, } @@ -179,7 +188,7 @@ func (a *ActivityApiService) GetOnlineUsers(ctx context.Context) ActivityApiGetO // Execute executes the request // // @return []string -func (a *ActivityApiService) GetOnlineUsersExecute(r ActivityApiGetOnlineUsersRequest) ([]string, *http.Response, error) { +func (a *ActivityAPIService) GetOnlineUsersExecute(r ActivityAPIGetOnlineUsersRequest) ([]string, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -187,7 +196,7 @@ func (a *ActivityApiService) GetOnlineUsersExecute(r ActivityApiGetOnlineUsersRe localVarReturnValue []string ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ActivityApiService.GetOnlineUsers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ActivityAPIService.GetOnlineUsers") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_authentication.go b/api_authentication.go index b3d1383..d630b10 100644 --- a/api_authentication.go +++ b/api_authentication.go @@ -19,15 +19,15 @@ import ( "strings" ) -// AuthenticationApiService AuthenticationApi service -type AuthenticationApiService service +// AuthenticationAPIService AuthenticationAPI service +type AuthenticationAPIService service -type AuthenticationApiGetMyExternalAccountsRequest struct { +type AuthenticationAPIGetMyExternalAccountsRequest struct { ctx context.Context - ApiService *AuthenticationApiService + ApiService *AuthenticationAPIService } -func (r AuthenticationApiGetMyExternalAccountsRequest) Execute() ([]ExternalProviderUser, *http.Response, error) { +func (r AuthenticationAPIGetMyExternalAccountsRequest) Execute() ([]ExternalProviderUser, *http.Response, error) { return r.ApiService.GetMyExternalAccountsExecute(r) } @@ -37,10 +37,10 @@ GetMyExternalAccounts 外部ログインアカウント一覧を取得 自分に紐付けられている外部ログインアカウント一覧を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return AuthenticationApiGetMyExternalAccountsRequest + @return AuthenticationAPIGetMyExternalAccountsRequest */ -func (a *AuthenticationApiService) GetMyExternalAccounts(ctx context.Context) AuthenticationApiGetMyExternalAccountsRequest { - return AuthenticationApiGetMyExternalAccountsRequest{ +func (a *AuthenticationAPIService) GetMyExternalAccounts(ctx context.Context) AuthenticationAPIGetMyExternalAccountsRequest { + return AuthenticationAPIGetMyExternalAccountsRequest{ ApiService: a, ctx: ctx, } @@ -49,7 +49,7 @@ func (a *AuthenticationApiService) GetMyExternalAccounts(ctx context.Context) Au // Execute executes the request // // @return []ExternalProviderUser -func (a *AuthenticationApiService) GetMyExternalAccountsExecute(r AuthenticationApiGetMyExternalAccountsRequest) ([]ExternalProviderUser, *http.Response, error) { +func (a *AuthenticationAPIService) GetMyExternalAccountsExecute(r AuthenticationAPIGetMyExternalAccountsRequest) ([]ExternalProviderUser, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -57,7 +57,7 @@ func (a *AuthenticationApiService) GetMyExternalAccountsExecute(r Authentication localVarReturnValue []ExternalProviderUser ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthenticationApiService.GetMyExternalAccounts") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthenticationAPIService.GetMyExternalAccounts") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -122,12 +122,12 @@ func (a *AuthenticationApiService) GetMyExternalAccountsExecute(r Authentication return localVarReturnValue, localVarHTTPResponse, nil } -type AuthenticationApiGetMySessionsRequest struct { +type AuthenticationAPIGetMySessionsRequest struct { ctx context.Context - ApiService *AuthenticationApiService + ApiService *AuthenticationAPIService } -func (r AuthenticationApiGetMySessionsRequest) Execute() ([]LoginSession, *http.Response, error) { +func (r AuthenticationAPIGetMySessionsRequest) Execute() ([]LoginSession, *http.Response, error) { return r.ApiService.GetMySessionsExecute(r) } @@ -137,10 +137,10 @@ GetMySessions 自分のログインセッションリストを取得 自分のログインセッションのリストを取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return AuthenticationApiGetMySessionsRequest + @return AuthenticationAPIGetMySessionsRequest */ -func (a *AuthenticationApiService) GetMySessions(ctx context.Context) AuthenticationApiGetMySessionsRequest { - return AuthenticationApiGetMySessionsRequest{ +func (a *AuthenticationAPIService) GetMySessions(ctx context.Context) AuthenticationAPIGetMySessionsRequest { + return AuthenticationAPIGetMySessionsRequest{ ApiService: a, ctx: ctx, } @@ -149,7 +149,7 @@ func (a *AuthenticationApiService) GetMySessions(ctx context.Context) Authentica // Execute executes the request // // @return []LoginSession -func (a *AuthenticationApiService) GetMySessionsExecute(r AuthenticationApiGetMySessionsRequest) ([]LoginSession, *http.Response, error) { +func (a *AuthenticationAPIService) GetMySessionsExecute(r AuthenticationAPIGetMySessionsRequest) ([]LoginSession, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -157,7 +157,7 @@ func (a *AuthenticationApiService) GetMySessionsExecute(r AuthenticationApiGetMy localVarReturnValue []LoginSession ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthenticationApiService.GetMySessions") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthenticationAPIService.GetMySessions") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -222,18 +222,18 @@ func (a *AuthenticationApiService) GetMySessionsExecute(r AuthenticationApiGetMy return localVarReturnValue, localVarHTTPResponse, nil } -type AuthenticationApiLinkExternalAccountRequest struct { +type AuthenticationAPILinkExternalAccountRequest struct { ctx context.Context - ApiService *AuthenticationApiService + ApiService *AuthenticationAPIService postLinkExternalAccount *PostLinkExternalAccount } -func (r AuthenticationApiLinkExternalAccountRequest) PostLinkExternalAccount(postLinkExternalAccount PostLinkExternalAccount) AuthenticationApiLinkExternalAccountRequest { +func (r AuthenticationAPILinkExternalAccountRequest) PostLinkExternalAccount(postLinkExternalAccount PostLinkExternalAccount) AuthenticationAPILinkExternalAccountRequest { r.postLinkExternalAccount = &postLinkExternalAccount return r } -func (r AuthenticationApiLinkExternalAccountRequest) Execute() (*http.Response, error) { +func (r AuthenticationAPILinkExternalAccountRequest) Execute() (*http.Response, error) { return r.ApiService.LinkExternalAccountExecute(r) } @@ -245,24 +245,24 @@ LinkExternalAccount 外部ログインアカウントを紐付ける リクエストが受理された場合、外部サービスの認証画面にリダイレクトされ、認証される必要があります。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return AuthenticationApiLinkExternalAccountRequest + @return AuthenticationAPILinkExternalAccountRequest */ -func (a *AuthenticationApiService) LinkExternalAccount(ctx context.Context) AuthenticationApiLinkExternalAccountRequest { - return AuthenticationApiLinkExternalAccountRequest{ +func (a *AuthenticationAPIService) LinkExternalAccount(ctx context.Context) AuthenticationAPILinkExternalAccountRequest { + return AuthenticationAPILinkExternalAccountRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *AuthenticationApiService) LinkExternalAccountExecute(r AuthenticationApiLinkExternalAccountRequest) (*http.Response, error) { +func (a *AuthenticationAPIService) LinkExternalAccountExecute(r AuthenticationAPILinkExternalAccountRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthenticationApiService.LinkExternalAccount") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthenticationAPIService.LinkExternalAccount") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -320,25 +320,25 @@ func (a *AuthenticationApiService) LinkExternalAccountExecute(r AuthenticationAp return localVarHTTPResponse, nil } -type AuthenticationApiLoginRequest struct { +type AuthenticationAPILoginRequest struct { ctx context.Context - ApiService *AuthenticationApiService + ApiService *AuthenticationAPIService redirect *string postLoginRequest *PostLoginRequest } // リダイレクト先 -func (r AuthenticationApiLoginRequest) Redirect(redirect string) AuthenticationApiLoginRequest { +func (r AuthenticationAPILoginRequest) Redirect(redirect string) AuthenticationAPILoginRequest { r.redirect = &redirect return r } -func (r AuthenticationApiLoginRequest) PostLoginRequest(postLoginRequest PostLoginRequest) AuthenticationApiLoginRequest { +func (r AuthenticationAPILoginRequest) PostLoginRequest(postLoginRequest PostLoginRequest) AuthenticationAPILoginRequest { r.postLoginRequest = &postLoginRequest return r } -func (r AuthenticationApiLoginRequest) Execute() (*http.Response, error) { +func (r AuthenticationAPILoginRequest) Execute() (*http.Response, error) { return r.ApiService.LoginExecute(r) } @@ -348,24 +348,24 @@ Login ログイン ログインします。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return AuthenticationApiLoginRequest + @return AuthenticationAPILoginRequest */ -func (a *AuthenticationApiService) Login(ctx context.Context) AuthenticationApiLoginRequest { - return AuthenticationApiLoginRequest{ +func (a *AuthenticationAPIService) Login(ctx context.Context) AuthenticationAPILoginRequest { + return AuthenticationAPILoginRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *AuthenticationApiService) LoginExecute(r AuthenticationApiLoginRequest) (*http.Response, error) { +func (a *AuthenticationAPIService) LoginExecute(r AuthenticationAPILoginRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthenticationApiService.Login") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthenticationAPIService.Login") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -377,7 +377,7 @@ func (a *AuthenticationApiService) LoginExecute(r AuthenticationApiLoginRequest) localVarFormParams := url.Values{} if r.redirect != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "redirect", r.redirect, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "redirect", r.redirect, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -426,26 +426,26 @@ func (a *AuthenticationApiService) LoginExecute(r AuthenticationApiLoginRequest) return localVarHTTPResponse, nil } -type AuthenticationApiLogoutRequest struct { +type AuthenticationAPILogoutRequest struct { ctx context.Context - ApiService *AuthenticationApiService + ApiService *AuthenticationAPIService redirect *string all *bool } // リダイレクト先 -func (r AuthenticationApiLogoutRequest) Redirect(redirect string) AuthenticationApiLogoutRequest { +func (r AuthenticationAPILogoutRequest) Redirect(redirect string) AuthenticationAPILogoutRequest { r.redirect = &redirect return r } // 全てのセッションでログアウトするかどうか -func (r AuthenticationApiLogoutRequest) All(all bool) AuthenticationApiLogoutRequest { +func (r AuthenticationAPILogoutRequest) All(all bool) AuthenticationAPILogoutRequest { r.all = &all return r } -func (r AuthenticationApiLogoutRequest) Execute() (*http.Response, error) { +func (r AuthenticationAPILogoutRequest) Execute() (*http.Response, error) { return r.ApiService.LogoutExecute(r) } @@ -455,24 +455,24 @@ Logout ログアウト ログアウトします。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return AuthenticationApiLogoutRequest + @return AuthenticationAPILogoutRequest */ -func (a *AuthenticationApiService) Logout(ctx context.Context) AuthenticationApiLogoutRequest { - return AuthenticationApiLogoutRequest{ +func (a *AuthenticationAPIService) Logout(ctx context.Context) AuthenticationAPILogoutRequest { + return AuthenticationAPILogoutRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *AuthenticationApiService) LogoutExecute(r AuthenticationApiLogoutRequest) (*http.Response, error) { +func (a *AuthenticationAPIService) LogoutExecute(r AuthenticationAPILogoutRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthenticationApiService.Logout") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthenticationAPIService.Logout") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -484,10 +484,13 @@ func (a *AuthenticationApiService) LogoutExecute(r AuthenticationApiLogoutReques localVarFormParams := url.Values{} if r.redirect != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "redirect", r.redirect, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "redirect", r.redirect, "form", "") } if r.all != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "all", r.all, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "all", r.all, "form", "") + } else { + var defaultValue bool = false + r.all = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -534,13 +537,13 @@ func (a *AuthenticationApiService) LogoutExecute(r AuthenticationApiLogoutReques return localVarHTTPResponse, nil } -type AuthenticationApiRevokeMySessionRequest struct { +type AuthenticationAPIRevokeMySessionRequest struct { ctx context.Context - ApiService *AuthenticationApiService + ApiService *AuthenticationAPIService sessionId string } -func (r AuthenticationApiRevokeMySessionRequest) Execute() (*http.Response, error) { +func (r AuthenticationAPIRevokeMySessionRequest) Execute() (*http.Response, error) { return r.ApiService.RevokeMySessionExecute(r) } @@ -552,10 +555,10 @@ RevokeMySession セッションを無効化 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param sessionId セッションUUID - @return AuthenticationApiRevokeMySessionRequest + @return AuthenticationAPIRevokeMySessionRequest */ -func (a *AuthenticationApiService) RevokeMySession(ctx context.Context, sessionId string) AuthenticationApiRevokeMySessionRequest { - return AuthenticationApiRevokeMySessionRequest{ +func (a *AuthenticationAPIService) RevokeMySession(ctx context.Context, sessionId string) AuthenticationAPIRevokeMySessionRequest { + return AuthenticationAPIRevokeMySessionRequest{ ApiService: a, ctx: ctx, sessionId: sessionId, @@ -563,14 +566,14 @@ func (a *AuthenticationApiService) RevokeMySession(ctx context.Context, sessionI } // Execute executes the request -func (a *AuthenticationApiService) RevokeMySessionExecute(r AuthenticationApiRevokeMySessionRequest) (*http.Response, error) { +func (a *AuthenticationAPIService) RevokeMySessionExecute(r AuthenticationAPIRevokeMySessionRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthenticationApiService.RevokeMySession") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthenticationAPIService.RevokeMySession") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -627,18 +630,18 @@ func (a *AuthenticationApiService) RevokeMySessionExecute(r AuthenticationApiRev return localVarHTTPResponse, nil } -type AuthenticationApiUnlinkExternalAccountRequest struct { +type AuthenticationAPIUnlinkExternalAccountRequest struct { ctx context.Context - ApiService *AuthenticationApiService + ApiService *AuthenticationAPIService postUnlinkExternalAccount *PostUnlinkExternalAccount } -func (r AuthenticationApiUnlinkExternalAccountRequest) PostUnlinkExternalAccount(postUnlinkExternalAccount PostUnlinkExternalAccount) AuthenticationApiUnlinkExternalAccountRequest { +func (r AuthenticationAPIUnlinkExternalAccountRequest) PostUnlinkExternalAccount(postUnlinkExternalAccount PostUnlinkExternalAccount) AuthenticationAPIUnlinkExternalAccountRequest { r.postUnlinkExternalAccount = &postUnlinkExternalAccount return r } -func (r AuthenticationApiUnlinkExternalAccountRequest) Execute() (*http.Response, error) { +func (r AuthenticationAPIUnlinkExternalAccountRequest) Execute() (*http.Response, error) { return r.ApiService.UnlinkExternalAccountExecute(r) } @@ -648,24 +651,24 @@ UnlinkExternalAccount 外部ログインアカウントの紐付けを解除 自分に紐付けられている外部ログインアカウントの紐付けを解除します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return AuthenticationApiUnlinkExternalAccountRequest + @return AuthenticationAPIUnlinkExternalAccountRequest */ -func (a *AuthenticationApiService) UnlinkExternalAccount(ctx context.Context) AuthenticationApiUnlinkExternalAccountRequest { - return AuthenticationApiUnlinkExternalAccountRequest{ +func (a *AuthenticationAPIService) UnlinkExternalAccount(ctx context.Context) AuthenticationAPIUnlinkExternalAccountRequest { + return AuthenticationAPIUnlinkExternalAccountRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *AuthenticationApiService) UnlinkExternalAccountExecute(r AuthenticationApiUnlinkExternalAccountRequest) (*http.Response, error) { +func (a *AuthenticationAPIService) UnlinkExternalAccountExecute(r AuthenticationAPIUnlinkExternalAccountRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthenticationApiService.UnlinkExternalAccount") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthenticationAPIService.UnlinkExternalAccount") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_bot.go b/api_bot.go index f7da837..6d8a7d6 100644 --- a/api_bot.go +++ b/api_bot.go @@ -20,16 +20,16 @@ import ( "strings" ) -// BotApiService BotApi service -type BotApiService service +// BotAPIService BotAPI service +type BotAPIService service -type BotApiActivateBotRequest struct { +type BotAPIActivateBotRequest struct { ctx context.Context - ApiService *BotApiService + ApiService *BotAPIService botId string } -func (r BotApiActivateBotRequest) Execute() (*http.Response, error) { +func (r BotAPIActivateBotRequest) Execute() (*http.Response, error) { return r.ApiService.ActivateBotExecute(r) } @@ -41,10 +41,10 @@ ActivateBot BOTをアクティベート @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param botId BOTUUID - @return BotApiActivateBotRequest + @return BotAPIActivateBotRequest */ -func (a *BotApiService) ActivateBot(ctx context.Context, botId string) BotApiActivateBotRequest { - return BotApiActivateBotRequest{ +func (a *BotAPIService) ActivateBot(ctx context.Context, botId string) BotAPIActivateBotRequest { + return BotAPIActivateBotRequest{ ApiService: a, ctx: ctx, botId: botId, @@ -52,14 +52,14 @@ func (a *BotApiService) ActivateBot(ctx context.Context, botId string) BotApiAct } // Execute executes the request -func (a *BotApiService) ActivateBotExecute(r BotApiActivateBotRequest) (*http.Response, error) { +func (a *BotAPIService) ActivateBotExecute(r BotAPIActivateBotRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotApiService.ActivateBot") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotAPIService.ActivateBot") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -116,20 +116,20 @@ func (a *BotApiService) ActivateBotExecute(r BotApiActivateBotRequest) (*http.Re return localVarHTTPResponse, nil } -type BotApiChangeBotIconRequest struct { +type BotAPIChangeBotIconRequest struct { ctx context.Context - ApiService *BotApiService + ApiService *BotAPIService botId string file *os.File } // アイコン画像(2MBまでのpng, jpeg, gif) -func (r BotApiChangeBotIconRequest) File(file *os.File) BotApiChangeBotIconRequest { +func (r BotAPIChangeBotIconRequest) File(file *os.File) BotAPIChangeBotIconRequest { r.file = file return r } -func (r BotApiChangeBotIconRequest) Execute() (*http.Response, error) { +func (r BotAPIChangeBotIconRequest) Execute() (*http.Response, error) { return r.ApiService.ChangeBotIconExecute(r) } @@ -141,10 +141,10 @@ ChangeBotIcon BOTのアイコン画像を変更 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param botId BOTUUID - @return BotApiChangeBotIconRequest + @return BotAPIChangeBotIconRequest */ -func (a *BotApiService) ChangeBotIcon(ctx context.Context, botId string) BotApiChangeBotIconRequest { - return BotApiChangeBotIconRequest{ +func (a *BotAPIService) ChangeBotIcon(ctx context.Context, botId string) BotAPIChangeBotIconRequest { + return BotAPIChangeBotIconRequest{ ApiService: a, ctx: ctx, botId: botId, @@ -152,14 +152,14 @@ func (a *BotApiService) ChangeBotIcon(ctx context.Context, botId string) BotApiC } // Execute executes the request -func (a *BotApiService) ChangeBotIconExecute(r BotApiChangeBotIconRequest) (*http.Response, error) { +func (a *BotAPIService) ChangeBotIconExecute(r BotAPIChangeBotIconRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotApiService.ChangeBotIcon") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotAPIService.ChangeBotIcon") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -196,7 +196,6 @@ func (a *BotApiService) ChangeBotIconExecute(r BotApiChangeBotIconRequest) (*htt var fileLocalVarFileBytes []byte fileLocalVarFormFileName = "file" - fileLocalVarFile := r.file if fileLocalVarFile != nil { @@ -235,12 +234,12 @@ func (a *BotApiService) ChangeBotIconExecute(r BotApiChangeBotIconRequest) (*htt return localVarHTTPResponse, nil } -type BotApiConnectBotWSRequest struct { +type BotAPIConnectBotWSRequest struct { ctx context.Context - ApiService *BotApiService + ApiService *BotAPIService } -func (r BotApiConnectBotWSRequest) Execute() (*http.Response, error) { +func (r BotAPIConnectBotWSRequest) Execute() (*http.Response, error) { return r.ApiService.ConnectBotWSExecute(r) } @@ -283,24 +282,24 @@ TextMessageとして各種イベントが`type`、`reqId`、`body`を持つJSON `{"type":"ERROR","body":"message"}` @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return BotApiConnectBotWSRequest + @return BotAPIConnectBotWSRequest */ -func (a *BotApiService) ConnectBotWS(ctx context.Context) BotApiConnectBotWSRequest { - return BotApiConnectBotWSRequest{ +func (a *BotAPIService) ConnectBotWS(ctx context.Context) BotAPIConnectBotWSRequest { + return BotAPIConnectBotWSRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *BotApiService) ConnectBotWSExecute(r BotApiConnectBotWSRequest) (*http.Response, error) { +func (a *BotAPIService) ConnectBotWSExecute(r BotAPIConnectBotWSRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotApiService.ConnectBotWS") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotAPIService.ConnectBotWS") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -356,18 +355,18 @@ func (a *BotApiService) ConnectBotWSExecute(r BotApiConnectBotWSRequest) (*http. return localVarHTTPResponse, nil } -type BotApiCreateBotRequest struct { +type BotAPICreateBotRequest struct { ctx context.Context - ApiService *BotApiService + ApiService *BotAPIService postBotRequest *PostBotRequest } -func (r BotApiCreateBotRequest) PostBotRequest(postBotRequest PostBotRequest) BotApiCreateBotRequest { +func (r BotAPICreateBotRequest) PostBotRequest(postBotRequest PostBotRequest) BotAPICreateBotRequest { r.postBotRequest = &postBotRequest return r } -func (r BotApiCreateBotRequest) Execute() (*BotDetail, *http.Response, error) { +func (r BotAPICreateBotRequest) Execute() (*BotDetail, *http.Response, error) { return r.ApiService.CreateBotExecute(r) } @@ -379,10 +378,10 @@ BOTを作成します。 さらにHTTP Modeの場合はアクティベーションを行う必要があります。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return BotApiCreateBotRequest + @return BotAPICreateBotRequest */ -func (a *BotApiService) CreateBot(ctx context.Context) BotApiCreateBotRequest { - return BotApiCreateBotRequest{ +func (a *BotAPIService) CreateBot(ctx context.Context) BotAPICreateBotRequest { + return BotAPICreateBotRequest{ ApiService: a, ctx: ctx, } @@ -391,7 +390,7 @@ func (a *BotApiService) CreateBot(ctx context.Context) BotApiCreateBotRequest { // Execute executes the request // // @return BotDetail -func (a *BotApiService) CreateBotExecute(r BotApiCreateBotRequest) (*BotDetail, *http.Response, error) { +func (a *BotAPIService) CreateBotExecute(r BotAPICreateBotRequest) (*BotDetail, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -399,7 +398,7 @@ func (a *BotApiService) CreateBotExecute(r BotApiCreateBotRequest) (*BotDetail, localVarReturnValue *BotDetail ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotApiService.CreateBot") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotAPIService.CreateBot") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -466,13 +465,13 @@ func (a *BotApiService) CreateBotExecute(r BotApiCreateBotRequest) (*BotDetail, return localVarReturnValue, localVarHTTPResponse, nil } -type BotApiDeleteBotRequest struct { +type BotAPIDeleteBotRequest struct { ctx context.Context - ApiService *BotApiService + ApiService *BotAPIService botId string } -func (r BotApiDeleteBotRequest) Execute() (*http.Response, error) { +func (r BotAPIDeleteBotRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteBotExecute(r) } @@ -484,10 +483,10 @@ DeleteBot BOTを削除 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param botId BOTUUID - @return BotApiDeleteBotRequest + @return BotAPIDeleteBotRequest */ -func (a *BotApiService) DeleteBot(ctx context.Context, botId string) BotApiDeleteBotRequest { - return BotApiDeleteBotRequest{ +func (a *BotAPIService) DeleteBot(ctx context.Context, botId string) BotAPIDeleteBotRequest { + return BotAPIDeleteBotRequest{ ApiService: a, ctx: ctx, botId: botId, @@ -495,14 +494,14 @@ func (a *BotApiService) DeleteBot(ctx context.Context, botId string) BotApiDelet } // Execute executes the request -func (a *BotApiService) DeleteBotExecute(r BotApiDeleteBotRequest) (*http.Response, error) { +func (a *BotAPIService) DeleteBotExecute(r BotAPIDeleteBotRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotApiService.DeleteBot") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotAPIService.DeleteBot") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -559,19 +558,19 @@ func (a *BotApiService) DeleteBotExecute(r BotApiDeleteBotRequest) (*http.Respon return localVarHTTPResponse, nil } -type BotApiEditBotRequest struct { +type BotAPIEditBotRequest struct { ctx context.Context - ApiService *BotApiService + ApiService *BotAPIService botId string patchBotRequest *PatchBotRequest } -func (r BotApiEditBotRequest) PatchBotRequest(patchBotRequest PatchBotRequest) BotApiEditBotRequest { +func (r BotAPIEditBotRequest) PatchBotRequest(patchBotRequest PatchBotRequest) BotAPIEditBotRequest { r.patchBotRequest = &patchBotRequest return r } -func (r BotApiEditBotRequest) Execute() (*http.Response, error) { +func (r BotAPIEditBotRequest) Execute() (*http.Response, error) { return r.ApiService.EditBotExecute(r) } @@ -584,10 +583,10 @@ BOT開発者UUIDを変更した場合は、変更先ユーザーにBOT管理権 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param botId BOTUUID - @return BotApiEditBotRequest + @return BotAPIEditBotRequest */ -func (a *BotApiService) EditBot(ctx context.Context, botId string) BotApiEditBotRequest { - return BotApiEditBotRequest{ +func (a *BotAPIService) EditBot(ctx context.Context, botId string) BotAPIEditBotRequest { + return BotAPIEditBotRequest{ ApiService: a, ctx: ctx, botId: botId, @@ -595,14 +594,14 @@ func (a *BotApiService) EditBot(ctx context.Context, botId string) BotApiEditBot } // Execute executes the request -func (a *BotApiService) EditBotExecute(r BotApiEditBotRequest) (*http.Response, error) { +func (a *BotAPIService) EditBotExecute(r BotAPIEditBotRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotApiService.EditBot") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotAPIService.EditBot") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -661,20 +660,20 @@ func (a *BotApiService) EditBotExecute(r BotApiEditBotRequest) (*http.Response, return localVarHTTPResponse, nil } -type BotApiGetBotRequest struct { +type BotAPIGetBotRequest struct { ctx context.Context - ApiService *BotApiService + ApiService *BotAPIService botId string detail *bool } // 詳細情報を含めるかどうか -func (r BotApiGetBotRequest) Detail(detail bool) BotApiGetBotRequest { +func (r BotAPIGetBotRequest) Detail(detail bool) BotAPIGetBotRequest { r.detail = &detail return r } -func (r BotApiGetBotRequest) Execute() (*GetBot200Response, *http.Response, error) { +func (r BotAPIGetBotRequest) Execute() (*GetBot200Response, *http.Response, error) { return r.ApiService.GetBotExecute(r) } @@ -686,10 +685,10 @@ BOT詳細情報を取得する場合は、対象のBOTの管理権限が必要 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param botId BOTUUID - @return BotApiGetBotRequest + @return BotAPIGetBotRequest */ -func (a *BotApiService) GetBot(ctx context.Context, botId string) BotApiGetBotRequest { - return BotApiGetBotRequest{ +func (a *BotAPIService) GetBot(ctx context.Context, botId string) BotAPIGetBotRequest { + return BotAPIGetBotRequest{ ApiService: a, ctx: ctx, botId: botId, @@ -699,7 +698,7 @@ func (a *BotApiService) GetBot(ctx context.Context, botId string) BotApiGetBotRe // Execute executes the request // // @return GetBot200Response -func (a *BotApiService) GetBotExecute(r BotApiGetBotRequest) (*GetBot200Response, *http.Response, error) { +func (a *BotAPIService) GetBotExecute(r BotAPIGetBotRequest) (*GetBot200Response, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -707,7 +706,7 @@ func (a *BotApiService) GetBotExecute(r BotApiGetBotRequest) (*GetBot200Response localVarReturnValue *GetBot200Response ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotApiService.GetBot") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotAPIService.GetBot") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -720,7 +719,10 @@ func (a *BotApiService) GetBotExecute(r BotApiGetBotRequest) (*GetBot200Response localVarFormParams := url.Values{} if r.detail != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "detail", r.detail, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "detail", r.detail, "form", "") + } else { + var defaultValue bool = false + r.detail = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -776,13 +778,13 @@ func (a *BotApiService) GetBotExecute(r BotApiGetBotRequest) (*GetBot200Response return localVarReturnValue, localVarHTTPResponse, nil } -type BotApiGetBotIconRequest struct { +type BotAPIGetBotIconRequest struct { ctx context.Context - ApiService *BotApiService + ApiService *BotAPIService botId string } -func (r BotApiGetBotIconRequest) Execute() (*os.File, *http.Response, error) { +func (r BotAPIGetBotIconRequest) Execute() (*os.File, *http.Response, error) { return r.ApiService.GetBotIconExecute(r) } @@ -793,10 +795,10 @@ GetBotIcon BOTのアイコン画像を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param botId BOTUUID - @return BotApiGetBotIconRequest + @return BotAPIGetBotIconRequest */ -func (a *BotApiService) GetBotIcon(ctx context.Context, botId string) BotApiGetBotIconRequest { - return BotApiGetBotIconRequest{ +func (a *BotAPIService) GetBotIcon(ctx context.Context, botId string) BotAPIGetBotIconRequest { + return BotAPIGetBotIconRequest{ ApiService: a, ctx: ctx, botId: botId, @@ -806,7 +808,7 @@ func (a *BotApiService) GetBotIcon(ctx context.Context, botId string) BotApiGetB // Execute executes the request // // @return *os.File -func (a *BotApiService) GetBotIconExecute(r BotApiGetBotIconRequest) (*os.File, *http.Response, error) { +func (a *BotAPIService) GetBotIconExecute(r BotAPIGetBotIconRequest) (*os.File, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -814,7 +816,7 @@ func (a *BotApiService) GetBotIconExecute(r BotApiGetBotIconRequest) (*os.File, localVarReturnValue *os.File ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotApiService.GetBotIcon") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotAPIService.GetBotIcon") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -880,27 +882,27 @@ func (a *BotApiService) GetBotIconExecute(r BotApiGetBotIconRequest) (*os.File, return localVarReturnValue, localVarHTTPResponse, nil } -type BotApiGetBotLogsRequest struct { +type BotAPIGetBotLogsRequest struct { ctx context.Context - ApiService *BotApiService + ApiService *BotAPIService botId string limit *int32 offset *int32 } // 取得する件数 -func (r BotApiGetBotLogsRequest) Limit(limit int32) BotApiGetBotLogsRequest { +func (r BotAPIGetBotLogsRequest) Limit(limit int32) BotAPIGetBotLogsRequest { r.limit = &limit return r } // 取得するオフセット -func (r BotApiGetBotLogsRequest) Offset(offset int32) BotApiGetBotLogsRequest { +func (r BotAPIGetBotLogsRequest) Offset(offset int32) BotAPIGetBotLogsRequest { r.offset = &offset return r } -func (r BotApiGetBotLogsRequest) Execute() ([]BotEventLog, *http.Response, error) { +func (r BotAPIGetBotLogsRequest) Execute() ([]BotEventLog, *http.Response, error) { return r.ApiService.GetBotLogsExecute(r) } @@ -912,10 +914,10 @@ GetBotLogs BOTのイベントログを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param botId BOTUUID - @return BotApiGetBotLogsRequest + @return BotAPIGetBotLogsRequest */ -func (a *BotApiService) GetBotLogs(ctx context.Context, botId string) BotApiGetBotLogsRequest { - return BotApiGetBotLogsRequest{ +func (a *BotAPIService) GetBotLogs(ctx context.Context, botId string) BotAPIGetBotLogsRequest { + return BotAPIGetBotLogsRequest{ ApiService: a, ctx: ctx, botId: botId, @@ -925,7 +927,7 @@ func (a *BotApiService) GetBotLogs(ctx context.Context, botId string) BotApiGetB // Execute executes the request // // @return []BotEventLog -func (a *BotApiService) GetBotLogsExecute(r BotApiGetBotLogsRequest) ([]BotEventLog, *http.Response, error) { +func (a *BotAPIService) GetBotLogsExecute(r BotAPIGetBotLogsRequest) ([]BotEventLog, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -933,7 +935,7 @@ func (a *BotApiService) GetBotLogsExecute(r BotApiGetBotLogsRequest) ([]BotEvent localVarReturnValue []BotEventLog ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotApiService.GetBotLogs") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotAPIService.GetBotLogs") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -946,10 +948,13 @@ func (a *BotApiService) GetBotLogsExecute(r BotApiGetBotLogsRequest) ([]BotEvent localVarFormParams := url.Values{} if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") } if r.offset != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } else { + var defaultValue int32 = 0 + r.offset = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1005,19 +1010,19 @@ func (a *BotApiService) GetBotLogsExecute(r BotApiGetBotLogsRequest) ([]BotEvent return localVarReturnValue, localVarHTTPResponse, nil } -type BotApiGetBotsRequest struct { +type BotAPIGetBotsRequest struct { ctx context.Context - ApiService *BotApiService + ApiService *BotAPIService all *bool } // 全てのBOTを取得するかどうか -func (r BotApiGetBotsRequest) All(all bool) BotApiGetBotsRequest { +func (r BotAPIGetBotsRequest) All(all bool) BotAPIGetBotsRequest { r.all = &all return r } -func (r BotApiGetBotsRequest) Execute() ([]Bot, *http.Response, error) { +func (r BotAPIGetBotsRequest) Execute() ([]Bot, *http.Response, error) { return r.ApiService.GetBotsExecute(r) } @@ -1028,10 +1033,10 @@ BOT情報のリストを取得します。 allを指定しない場合、自分が開発者のBOTのみを返します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return BotApiGetBotsRequest + @return BotAPIGetBotsRequest */ -func (a *BotApiService) GetBots(ctx context.Context) BotApiGetBotsRequest { - return BotApiGetBotsRequest{ +func (a *BotAPIService) GetBots(ctx context.Context) BotAPIGetBotsRequest { + return BotAPIGetBotsRequest{ ApiService: a, ctx: ctx, } @@ -1040,7 +1045,7 @@ func (a *BotApiService) GetBots(ctx context.Context) BotApiGetBotsRequest { // Execute executes the request // // @return []Bot -func (a *BotApiService) GetBotsExecute(r BotApiGetBotsRequest) ([]Bot, *http.Response, error) { +func (a *BotAPIService) GetBotsExecute(r BotAPIGetBotsRequest) ([]Bot, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1048,7 +1053,7 @@ func (a *BotApiService) GetBotsExecute(r BotApiGetBotsRequest) ([]Bot, *http.Res localVarReturnValue []Bot ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotApiService.GetBots") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotAPIService.GetBots") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1060,7 +1065,10 @@ func (a *BotApiService) GetBotsExecute(r BotApiGetBotsRequest) ([]Bot, *http.Res localVarFormParams := url.Values{} if r.all != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "all", r.all, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "all", r.all, "form", "") + } else { + var defaultValue bool = false + r.all = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1116,13 +1124,13 @@ func (a *BotApiService) GetBotsExecute(r BotApiGetBotsRequest) ([]Bot, *http.Res return localVarReturnValue, localVarHTTPResponse, nil } -type BotApiGetChannelBotsRequest struct { +type BotAPIGetChannelBotsRequest struct { ctx context.Context - ApiService *BotApiService + ApiService *BotAPIService channelId string } -func (r BotApiGetChannelBotsRequest) Execute() ([]BotUser, *http.Response, error) { +func (r BotAPIGetChannelBotsRequest) Execute() ([]BotUser, *http.Response, error) { return r.ApiService.GetChannelBotsExecute(r) } @@ -1133,10 +1141,10 @@ GetChannelBots チャンネル参加中のBOTのリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return BotApiGetChannelBotsRequest + @return BotAPIGetChannelBotsRequest */ -func (a *BotApiService) GetChannelBots(ctx context.Context, channelId string) BotApiGetChannelBotsRequest { - return BotApiGetChannelBotsRequest{ +func (a *BotAPIService) GetChannelBots(ctx context.Context, channelId string) BotAPIGetChannelBotsRequest { + return BotAPIGetChannelBotsRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -1146,7 +1154,7 @@ func (a *BotApiService) GetChannelBots(ctx context.Context, channelId string) Bo // Execute executes the request // // @return []BotUser -func (a *BotApiService) GetChannelBotsExecute(r BotApiGetChannelBotsRequest) ([]BotUser, *http.Response, error) { +func (a *BotAPIService) GetChannelBotsExecute(r BotAPIGetChannelBotsRequest) ([]BotUser, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1154,7 +1162,7 @@ func (a *BotApiService) GetChannelBotsExecute(r BotApiGetChannelBotsRequest) ([] localVarReturnValue []BotUser ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotApiService.GetChannelBots") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotAPIService.GetChannelBots") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1220,13 +1228,13 @@ func (a *BotApiService) GetChannelBotsExecute(r BotApiGetChannelBotsRequest) ([] return localVarReturnValue, localVarHTTPResponse, nil } -type BotApiInactivateBotRequest struct { +type BotAPIInactivateBotRequest struct { ctx context.Context - ApiService *BotApiService + ApiService *BotAPIService botId string } -func (r BotApiInactivateBotRequest) Execute() (*http.Response, error) { +func (r BotAPIInactivateBotRequest) Execute() (*http.Response, error) { return r.ApiService.InactivateBotExecute(r) } @@ -1237,10 +1245,10 @@ InactivateBot BOTをインアクティベート @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param botId BOTUUID - @return BotApiInactivateBotRequest + @return BotAPIInactivateBotRequest */ -func (a *BotApiService) InactivateBot(ctx context.Context, botId string) BotApiInactivateBotRequest { - return BotApiInactivateBotRequest{ +func (a *BotAPIService) InactivateBot(ctx context.Context, botId string) BotAPIInactivateBotRequest { + return BotAPIInactivateBotRequest{ ApiService: a, ctx: ctx, botId: botId, @@ -1248,14 +1256,14 @@ func (a *BotApiService) InactivateBot(ctx context.Context, botId string) BotApiI } // Execute executes the request -func (a *BotApiService) InactivateBotExecute(r BotApiInactivateBotRequest) (*http.Response, error) { +func (a *BotAPIService) InactivateBotExecute(r BotAPIInactivateBotRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotApiService.InactivateBot") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotAPIService.InactivateBot") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -1312,19 +1320,19 @@ func (a *BotApiService) InactivateBotExecute(r BotApiInactivateBotRequest) (*htt return localVarHTTPResponse, nil } -type BotApiLetBotJoinChannelRequest struct { +type BotAPILetBotJoinChannelRequest struct { ctx context.Context - ApiService *BotApiService + ApiService *BotAPIService botId string postBotActionJoinRequest *PostBotActionJoinRequest } -func (r BotApiLetBotJoinChannelRequest) PostBotActionJoinRequest(postBotActionJoinRequest PostBotActionJoinRequest) BotApiLetBotJoinChannelRequest { +func (r BotAPILetBotJoinChannelRequest) PostBotActionJoinRequest(postBotActionJoinRequest PostBotActionJoinRequest) BotAPILetBotJoinChannelRequest { r.postBotActionJoinRequest = &postBotActionJoinRequest return r } -func (r BotApiLetBotJoinChannelRequest) Execute() (*http.Response, error) { +func (r BotAPILetBotJoinChannelRequest) Execute() (*http.Response, error) { return r.ApiService.LetBotJoinChannelExecute(r) } @@ -1337,10 +1345,10 @@ LetBotJoinChannel BOTをチャンネルに参加させる @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param botId BOTUUID - @return BotApiLetBotJoinChannelRequest + @return BotAPILetBotJoinChannelRequest */ -func (a *BotApiService) LetBotJoinChannel(ctx context.Context, botId string) BotApiLetBotJoinChannelRequest { - return BotApiLetBotJoinChannelRequest{ +func (a *BotAPIService) LetBotJoinChannel(ctx context.Context, botId string) BotAPILetBotJoinChannelRequest { + return BotAPILetBotJoinChannelRequest{ ApiService: a, ctx: ctx, botId: botId, @@ -1348,14 +1356,14 @@ func (a *BotApiService) LetBotJoinChannel(ctx context.Context, botId string) Bot } // Execute executes the request -func (a *BotApiService) LetBotJoinChannelExecute(r BotApiLetBotJoinChannelRequest) (*http.Response, error) { +func (a *BotAPIService) LetBotJoinChannelExecute(r BotAPILetBotJoinChannelRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotApiService.LetBotJoinChannel") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotAPIService.LetBotJoinChannel") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -1414,19 +1422,19 @@ func (a *BotApiService) LetBotJoinChannelExecute(r BotApiLetBotJoinChannelReques return localVarHTTPResponse, nil } -type BotApiLetBotLeaveChannelRequest struct { +type BotAPILetBotLeaveChannelRequest struct { ctx context.Context - ApiService *BotApiService + ApiService *BotAPIService botId string postBotActionLeaveRequest *PostBotActionLeaveRequest } -func (r BotApiLetBotLeaveChannelRequest) PostBotActionLeaveRequest(postBotActionLeaveRequest PostBotActionLeaveRequest) BotApiLetBotLeaveChannelRequest { +func (r BotAPILetBotLeaveChannelRequest) PostBotActionLeaveRequest(postBotActionLeaveRequest PostBotActionLeaveRequest) BotAPILetBotLeaveChannelRequest { r.postBotActionLeaveRequest = &postBotActionLeaveRequest return r } -func (r BotApiLetBotLeaveChannelRequest) Execute() (*http.Response, error) { +func (r BotAPILetBotLeaveChannelRequest) Execute() (*http.Response, error) { return r.ApiService.LetBotLeaveChannelExecute(r) } @@ -1438,10 +1446,10 @@ LetBotLeaveChannel BOTをチャンネルから退出させる @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param botId BOTUUID - @return BotApiLetBotLeaveChannelRequest + @return BotAPILetBotLeaveChannelRequest */ -func (a *BotApiService) LetBotLeaveChannel(ctx context.Context, botId string) BotApiLetBotLeaveChannelRequest { - return BotApiLetBotLeaveChannelRequest{ +func (a *BotAPIService) LetBotLeaveChannel(ctx context.Context, botId string) BotAPILetBotLeaveChannelRequest { + return BotAPILetBotLeaveChannelRequest{ ApiService: a, ctx: ctx, botId: botId, @@ -1449,14 +1457,14 @@ func (a *BotApiService) LetBotLeaveChannel(ctx context.Context, botId string) Bo } // Execute executes the request -func (a *BotApiService) LetBotLeaveChannelExecute(r BotApiLetBotLeaveChannelRequest) (*http.Response, error) { +func (a *BotAPIService) LetBotLeaveChannelExecute(r BotAPILetBotLeaveChannelRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotApiService.LetBotLeaveChannel") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotAPIService.LetBotLeaveChannel") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -1515,13 +1523,13 @@ func (a *BotApiService) LetBotLeaveChannelExecute(r BotApiLetBotLeaveChannelRequ return localVarHTTPResponse, nil } -type BotApiReissueBotRequest struct { +type BotAPIReissueBotRequest struct { ctx context.Context - ApiService *BotApiService + ApiService *BotAPIService botId string } -func (r BotApiReissueBotRequest) Execute() (*BotTokens, *http.Response, error) { +func (r BotAPIReissueBotRequest) Execute() (*BotTokens, *http.Response, error) { return r.ApiService.ReissueBotExecute(r) } @@ -1533,10 +1541,10 @@ ReissueBot BOTのトークンを再発行 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param botId BOTUUID - @return BotApiReissueBotRequest + @return BotAPIReissueBotRequest */ -func (a *BotApiService) ReissueBot(ctx context.Context, botId string) BotApiReissueBotRequest { - return BotApiReissueBotRequest{ +func (a *BotAPIService) ReissueBot(ctx context.Context, botId string) BotAPIReissueBotRequest { + return BotAPIReissueBotRequest{ ApiService: a, ctx: ctx, botId: botId, @@ -1546,7 +1554,7 @@ func (a *BotApiService) ReissueBot(ctx context.Context, botId string) BotApiReis // Execute executes the request // // @return BotTokens -func (a *BotApiService) ReissueBotExecute(r BotApiReissueBotRequest) (*BotTokens, *http.Response, error) { +func (a *BotAPIService) ReissueBotExecute(r BotAPIReissueBotRequest) (*BotTokens, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -1554,7 +1562,7 @@ func (a *BotApiService) ReissueBotExecute(r BotApiReissueBotRequest) (*BotTokens localVarReturnValue *BotTokens ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotApiService.ReissueBot") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BotAPIService.ReissueBot") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_channel.go b/api_channel.go index b135aec..ec6ae8c 100644 --- a/api_channel.go +++ b/api_channel.go @@ -20,21 +20,21 @@ import ( "time" ) -// ChannelApiService ChannelApi service -type ChannelApiService service +// ChannelAPIService ChannelAPI service +type ChannelAPIService service -type ChannelApiCreateChannelRequest struct { +type ChannelAPICreateChannelRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService postChannelRequest *PostChannelRequest } -func (r ChannelApiCreateChannelRequest) PostChannelRequest(postChannelRequest PostChannelRequest) ChannelApiCreateChannelRequest { +func (r ChannelAPICreateChannelRequest) PostChannelRequest(postChannelRequest PostChannelRequest) ChannelAPICreateChannelRequest { r.postChannelRequest = &postChannelRequest return r } -func (r ChannelApiCreateChannelRequest) Execute() (*Channel, *http.Response, error) { +func (r ChannelAPICreateChannelRequest) Execute() (*Channel, *http.Response, error) { return r.ApiService.CreateChannelExecute(r) } @@ -45,10 +45,10 @@ CreateChannel チャンネルを作成 階層が6以上になるチャンネルは作成できません。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ChannelApiCreateChannelRequest + @return ChannelAPICreateChannelRequest */ -func (a *ChannelApiService) CreateChannel(ctx context.Context) ChannelApiCreateChannelRequest { - return ChannelApiCreateChannelRequest{ +func (a *ChannelAPIService) CreateChannel(ctx context.Context) ChannelAPICreateChannelRequest { + return ChannelAPICreateChannelRequest{ ApiService: a, ctx: ctx, } @@ -57,7 +57,7 @@ func (a *ChannelApiService) CreateChannel(ctx context.Context) ChannelApiCreateC // Execute executes the request // // @return Channel -func (a *ChannelApiService) CreateChannelExecute(r ChannelApiCreateChannelRequest) (*Channel, *http.Response, error) { +func (a *ChannelAPIService) CreateChannelExecute(r ChannelAPICreateChannelRequest) (*Channel, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -65,7 +65,7 @@ func (a *ChannelApiService) CreateChannelExecute(r ChannelApiCreateChannelReques localVarReturnValue *Channel ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.CreateChannel") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.CreateChannel") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -132,19 +132,19 @@ func (a *ChannelApiService) CreateChannelExecute(r ChannelApiCreateChannelReques return localVarReturnValue, localVarHTTPResponse, nil } -type ChannelApiEditChannelRequest struct { +type ChannelAPIEditChannelRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService channelId string patchChannelRequest *PatchChannelRequest } -func (r ChannelApiEditChannelRequest) PatchChannelRequest(patchChannelRequest PatchChannelRequest) ChannelApiEditChannelRequest { +func (r ChannelAPIEditChannelRequest) PatchChannelRequest(patchChannelRequest PatchChannelRequest) ChannelAPIEditChannelRequest { r.patchChannelRequest = &patchChannelRequest return r } -func (r ChannelApiEditChannelRequest) Execute() (*http.Response, error) { +func (r ChannelAPIEditChannelRequest) Execute() (*http.Response, error) { return r.ApiService.EditChannelExecute(r) } @@ -157,10 +157,10 @@ EditChannel チャンネル情報を変更 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return ChannelApiEditChannelRequest + @return ChannelAPIEditChannelRequest */ -func (a *ChannelApiService) EditChannel(ctx context.Context, channelId string) ChannelApiEditChannelRequest { - return ChannelApiEditChannelRequest{ +func (a *ChannelAPIService) EditChannel(ctx context.Context, channelId string) ChannelAPIEditChannelRequest { + return ChannelAPIEditChannelRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -168,14 +168,14 @@ func (a *ChannelApiService) EditChannel(ctx context.Context, channelId string) C } // Execute executes the request -func (a *ChannelApiService) EditChannelExecute(r ChannelApiEditChannelRequest) (*http.Response, error) { +func (a *ChannelAPIService) EditChannelExecute(r ChannelAPIEditChannelRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.EditChannel") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.EditChannel") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -234,19 +234,19 @@ func (a *ChannelApiService) EditChannelExecute(r ChannelApiEditChannelRequest) ( return localVarHTTPResponse, nil } -type ChannelApiEditChannelSubscribersRequest struct { +type ChannelAPIEditChannelSubscribersRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService channelId string patchChannelSubscribersRequest *PatchChannelSubscribersRequest } -func (r ChannelApiEditChannelSubscribersRequest) PatchChannelSubscribersRequest(patchChannelSubscribersRequest PatchChannelSubscribersRequest) ChannelApiEditChannelSubscribersRequest { +func (r ChannelAPIEditChannelSubscribersRequest) PatchChannelSubscribersRequest(patchChannelSubscribersRequest PatchChannelSubscribersRequest) ChannelAPIEditChannelSubscribersRequest { r.patchChannelSubscribersRequest = &patchChannelSubscribersRequest return r } -func (r ChannelApiEditChannelSubscribersRequest) Execute() (*http.Response, error) { +func (r ChannelAPIEditChannelSubscribersRequest) Execute() (*http.Response, error) { return r.ApiService.EditChannelSubscribersExecute(r) } @@ -259,10 +259,10 @@ EditChannelSubscribers チャンネルの通知購読者を編集 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return ChannelApiEditChannelSubscribersRequest + @return ChannelAPIEditChannelSubscribersRequest */ -func (a *ChannelApiService) EditChannelSubscribers(ctx context.Context, channelId string) ChannelApiEditChannelSubscribersRequest { - return ChannelApiEditChannelSubscribersRequest{ +func (a *ChannelAPIService) EditChannelSubscribers(ctx context.Context, channelId string) ChannelAPIEditChannelSubscribersRequest { + return ChannelAPIEditChannelSubscribersRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -270,14 +270,14 @@ func (a *ChannelApiService) EditChannelSubscribers(ctx context.Context, channelI } // Execute executes the request -func (a *ChannelApiService) EditChannelSubscribersExecute(r ChannelApiEditChannelSubscribersRequest) (*http.Response, error) { +func (a *ChannelAPIService) EditChannelSubscribersExecute(r ChannelAPIEditChannelSubscribersRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.EditChannelSubscribers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.EditChannelSubscribers") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -336,19 +336,19 @@ func (a *ChannelApiService) EditChannelSubscribersExecute(r ChannelApiEditChanne return localVarHTTPResponse, nil } -type ChannelApiEditChannelTopicRequest struct { +type ChannelAPIEditChannelTopicRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService channelId string putChannelTopicRequest *PutChannelTopicRequest } -func (r ChannelApiEditChannelTopicRequest) PutChannelTopicRequest(putChannelTopicRequest PutChannelTopicRequest) ChannelApiEditChannelTopicRequest { +func (r ChannelAPIEditChannelTopicRequest) PutChannelTopicRequest(putChannelTopicRequest PutChannelTopicRequest) ChannelAPIEditChannelTopicRequest { r.putChannelTopicRequest = &putChannelTopicRequest return r } -func (r ChannelApiEditChannelTopicRequest) Execute() (*http.Response, error) { +func (r ChannelAPIEditChannelTopicRequest) Execute() (*http.Response, error) { return r.ApiService.EditChannelTopicExecute(r) } @@ -360,10 +360,10 @@ EditChannelTopic チャンネルトピックを編集 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return ChannelApiEditChannelTopicRequest + @return ChannelAPIEditChannelTopicRequest */ -func (a *ChannelApiService) EditChannelTopic(ctx context.Context, channelId string) ChannelApiEditChannelTopicRequest { - return ChannelApiEditChannelTopicRequest{ +func (a *ChannelAPIService) EditChannelTopic(ctx context.Context, channelId string) ChannelAPIEditChannelTopicRequest { + return ChannelAPIEditChannelTopicRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -371,14 +371,14 @@ func (a *ChannelApiService) EditChannelTopic(ctx context.Context, channelId stri } // Execute executes the request -func (a *ChannelApiService) EditChannelTopicExecute(r ChannelApiEditChannelTopicRequest) (*http.Response, error) { +func (a *ChannelAPIService) EditChannelTopicExecute(r ChannelAPIEditChannelTopicRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.EditChannelTopic") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.EditChannelTopic") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -437,13 +437,13 @@ func (a *ChannelApiService) EditChannelTopicExecute(r ChannelApiEditChannelTopic return localVarHTTPResponse, nil } -type ChannelApiGetChannelRequest struct { +type ChannelAPIGetChannelRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService channelId string } -func (r ChannelApiGetChannelRequest) Execute() (*Channel, *http.Response, error) { +func (r ChannelAPIGetChannelRequest) Execute() (*Channel, *http.Response, error) { return r.ApiService.GetChannelExecute(r) } @@ -454,10 +454,10 @@ GetChannel チャンネル情報を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return ChannelApiGetChannelRequest + @return ChannelAPIGetChannelRequest */ -func (a *ChannelApiService) GetChannel(ctx context.Context, channelId string) ChannelApiGetChannelRequest { - return ChannelApiGetChannelRequest{ +func (a *ChannelAPIService) GetChannel(ctx context.Context, channelId string) ChannelAPIGetChannelRequest { + return ChannelAPIGetChannelRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -467,7 +467,7 @@ func (a *ChannelApiService) GetChannel(ctx context.Context, channelId string) Ch // Execute executes the request // // @return Channel -func (a *ChannelApiService) GetChannelExecute(r ChannelApiGetChannelRequest) (*Channel, *http.Response, error) { +func (a *ChannelAPIService) GetChannelExecute(r ChannelAPIGetChannelRequest) (*Channel, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -475,7 +475,7 @@ func (a *ChannelApiService) GetChannelExecute(r ChannelApiGetChannelRequest) (*C localVarReturnValue *Channel ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.GetChannel") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.GetChannel") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -541,13 +541,13 @@ func (a *ChannelApiService) GetChannelExecute(r ChannelApiGetChannelRequest) (*C return localVarReturnValue, localVarHTTPResponse, nil } -type ChannelApiGetChannelBotsRequest struct { +type ChannelAPIGetChannelBotsRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService channelId string } -func (r ChannelApiGetChannelBotsRequest) Execute() ([]BotUser, *http.Response, error) { +func (r ChannelAPIGetChannelBotsRequest) Execute() ([]BotUser, *http.Response, error) { return r.ApiService.GetChannelBotsExecute(r) } @@ -558,10 +558,10 @@ GetChannelBots チャンネル参加中のBOTのリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return ChannelApiGetChannelBotsRequest + @return ChannelAPIGetChannelBotsRequest */ -func (a *ChannelApiService) GetChannelBots(ctx context.Context, channelId string) ChannelApiGetChannelBotsRequest { - return ChannelApiGetChannelBotsRequest{ +func (a *ChannelAPIService) GetChannelBots(ctx context.Context, channelId string) ChannelAPIGetChannelBotsRequest { + return ChannelAPIGetChannelBotsRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -571,7 +571,7 @@ func (a *ChannelApiService) GetChannelBots(ctx context.Context, channelId string // Execute executes the request // // @return []BotUser -func (a *ChannelApiService) GetChannelBotsExecute(r ChannelApiGetChannelBotsRequest) ([]BotUser, *http.Response, error) { +func (a *ChannelAPIService) GetChannelBotsExecute(r ChannelAPIGetChannelBotsRequest) ([]BotUser, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -579,7 +579,7 @@ func (a *ChannelApiService) GetChannelBotsExecute(r ChannelApiGetChannelBotsRequ localVarReturnValue []BotUser ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.GetChannelBots") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.GetChannelBots") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -645,9 +645,9 @@ func (a *ChannelApiService) GetChannelBotsExecute(r ChannelApiGetChannelBotsRequ return localVarReturnValue, localVarHTTPResponse, nil } -type ChannelApiGetChannelEventsRequest struct { +type ChannelAPIGetChannelEventsRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService channelId string limit *int32 offset *int32 @@ -658,42 +658,42 @@ type ChannelApiGetChannelEventsRequest struct { } // 取得する件数 -func (r ChannelApiGetChannelEventsRequest) Limit(limit int32) ChannelApiGetChannelEventsRequest { +func (r ChannelAPIGetChannelEventsRequest) Limit(limit int32) ChannelAPIGetChannelEventsRequest { r.limit = &limit return r } // 取得するオフセット -func (r ChannelApiGetChannelEventsRequest) Offset(offset int32) ChannelApiGetChannelEventsRequest { +func (r ChannelAPIGetChannelEventsRequest) Offset(offset int32) ChannelAPIGetChannelEventsRequest { r.offset = &offset return r } // 取得する時間範囲の開始日時 -func (r ChannelApiGetChannelEventsRequest) Since(since time.Time) ChannelApiGetChannelEventsRequest { +func (r ChannelAPIGetChannelEventsRequest) Since(since time.Time) ChannelAPIGetChannelEventsRequest { r.since = &since return r } // 取得する時間範囲の終了日時 -func (r ChannelApiGetChannelEventsRequest) Until(until time.Time) ChannelApiGetChannelEventsRequest { +func (r ChannelAPIGetChannelEventsRequest) Until(until time.Time) ChannelAPIGetChannelEventsRequest { r.until = &until return r } // 範囲の端を含めるかどうか -func (r ChannelApiGetChannelEventsRequest) Inclusive(inclusive bool) ChannelApiGetChannelEventsRequest { +func (r ChannelAPIGetChannelEventsRequest) Inclusive(inclusive bool) ChannelAPIGetChannelEventsRequest { r.inclusive = &inclusive return r } // 昇順か降順か -func (r ChannelApiGetChannelEventsRequest) Order(order string) ChannelApiGetChannelEventsRequest { +func (r ChannelAPIGetChannelEventsRequest) Order(order string) ChannelAPIGetChannelEventsRequest { r.order = &order return r } -func (r ChannelApiGetChannelEventsRequest) Execute() ([]ChannelEvent, *http.Response, error) { +func (r ChannelAPIGetChannelEventsRequest) Execute() ([]ChannelEvent, *http.Response, error) { return r.ApiService.GetChannelEventsExecute(r) } @@ -704,10 +704,10 @@ GetChannelEvents チャンネルイベントのリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return ChannelApiGetChannelEventsRequest + @return ChannelAPIGetChannelEventsRequest */ -func (a *ChannelApiService) GetChannelEvents(ctx context.Context, channelId string) ChannelApiGetChannelEventsRequest { - return ChannelApiGetChannelEventsRequest{ +func (a *ChannelAPIService) GetChannelEvents(ctx context.Context, channelId string) ChannelAPIGetChannelEventsRequest { + return ChannelAPIGetChannelEventsRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -717,7 +717,7 @@ func (a *ChannelApiService) GetChannelEvents(ctx context.Context, channelId stri // Execute executes the request // // @return []ChannelEvent -func (a *ChannelApiService) GetChannelEventsExecute(r ChannelApiGetChannelEventsRequest) ([]ChannelEvent, *http.Response, error) { +func (a *ChannelAPIService) GetChannelEventsExecute(r ChannelAPIGetChannelEventsRequest) ([]ChannelEvent, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -725,7 +725,7 @@ func (a *ChannelApiService) GetChannelEventsExecute(r ChannelApiGetChannelEvents localVarReturnValue []ChannelEvent ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.GetChannelEvents") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.GetChannelEvents") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -738,22 +738,34 @@ func (a *ChannelApiService) GetChannelEventsExecute(r ChannelApiGetChannelEvents localVarFormParams := url.Values{} if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") } if r.offset != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } else { + var defaultValue int32 = 0 + r.offset = &defaultValue } if r.since != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "form", "") + } else { + var defaultValue time.Time + r.since = &defaultValue } if r.until != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "form", "") } if r.inclusive != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "inclusive", r.inclusive, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "inclusive", r.inclusive, "form", "") + } else { + var defaultValue bool = false + r.inclusive = &defaultValue } if r.order != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "form", "") + } else { + var defaultValue string = "desc" + r.order = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -809,13 +821,13 @@ func (a *ChannelApiService) GetChannelEventsExecute(r ChannelApiGetChannelEvents return localVarReturnValue, localVarHTTPResponse, nil } -type ChannelApiGetChannelPathRequest struct { +type ChannelAPIGetChannelPathRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService channelId string } -func (r ChannelApiGetChannelPathRequest) Execute() (*ChannelPath, *http.Response, error) { +func (r ChannelAPIGetChannelPathRequest) Execute() (*ChannelPath, *http.Response, error) { return r.ApiService.GetChannelPathExecute(r) } @@ -824,10 +836,10 @@ GetChannelPath 指定したチャンネルパスを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return ChannelApiGetChannelPathRequest + @return ChannelAPIGetChannelPathRequest */ -func (a *ChannelApiService) GetChannelPath(ctx context.Context, channelId string) ChannelApiGetChannelPathRequest { - return ChannelApiGetChannelPathRequest{ +func (a *ChannelAPIService) GetChannelPath(ctx context.Context, channelId string) ChannelAPIGetChannelPathRequest { + return ChannelAPIGetChannelPathRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -837,7 +849,7 @@ func (a *ChannelApiService) GetChannelPath(ctx context.Context, channelId string // Execute executes the request // // @return ChannelPath -func (a *ChannelApiService) GetChannelPathExecute(r ChannelApiGetChannelPathRequest) (*ChannelPath, *http.Response, error) { +func (a *ChannelAPIService) GetChannelPathExecute(r ChannelAPIGetChannelPathRequest) (*ChannelPath, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -845,7 +857,7 @@ func (a *ChannelApiService) GetChannelPathExecute(r ChannelApiGetChannelPathRequ localVarReturnValue *ChannelPath ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.GetChannelPath") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.GetChannelPath") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -911,13 +923,13 @@ func (a *ChannelApiService) GetChannelPathExecute(r ChannelApiGetChannelPathRequ return localVarReturnValue, localVarHTTPResponse, nil } -type ChannelApiGetChannelPinsRequest struct { +type ChannelAPIGetChannelPinsRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService channelId string } -func (r ChannelApiGetChannelPinsRequest) Execute() ([]Pin, *http.Response, error) { +func (r ChannelAPIGetChannelPinsRequest) Execute() ([]Pin, *http.Response, error) { return r.ApiService.GetChannelPinsExecute(r) } @@ -928,10 +940,10 @@ GetChannelPins チャンネルピンのリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return ChannelApiGetChannelPinsRequest + @return ChannelAPIGetChannelPinsRequest */ -func (a *ChannelApiService) GetChannelPins(ctx context.Context, channelId string) ChannelApiGetChannelPinsRequest { - return ChannelApiGetChannelPinsRequest{ +func (a *ChannelAPIService) GetChannelPins(ctx context.Context, channelId string) ChannelAPIGetChannelPinsRequest { + return ChannelAPIGetChannelPinsRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -941,7 +953,7 @@ func (a *ChannelApiService) GetChannelPins(ctx context.Context, channelId string // Execute executes the request // // @return []Pin -func (a *ChannelApiService) GetChannelPinsExecute(r ChannelApiGetChannelPinsRequest) ([]Pin, *http.Response, error) { +func (a *ChannelAPIService) GetChannelPinsExecute(r ChannelAPIGetChannelPinsRequest) ([]Pin, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -949,7 +961,7 @@ func (a *ChannelApiService) GetChannelPinsExecute(r ChannelApiGetChannelPinsRequ localVarReturnValue []Pin ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.GetChannelPins") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.GetChannelPins") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1015,20 +1027,20 @@ func (a *ChannelApiService) GetChannelPinsExecute(r ChannelApiGetChannelPinsRequ return localVarReturnValue, localVarHTTPResponse, nil } -type ChannelApiGetChannelStatsRequest struct { +type ChannelAPIGetChannelStatsRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService channelId string excludeDeletedMessages *bool } // 削除されたメッセージを除外するかどうか(デフォルト false) -func (r ChannelApiGetChannelStatsRequest) ExcludeDeletedMessages(excludeDeletedMessages bool) ChannelApiGetChannelStatsRequest { +func (r ChannelAPIGetChannelStatsRequest) ExcludeDeletedMessages(excludeDeletedMessages bool) ChannelAPIGetChannelStatsRequest { r.excludeDeletedMessages = &excludeDeletedMessages return r } -func (r ChannelApiGetChannelStatsRequest) Execute() (*ChannelStats, *http.Response, error) { +func (r ChannelAPIGetChannelStatsRequest) Execute() (*ChannelStats, *http.Response, error) { return r.ApiService.GetChannelStatsExecute(r) } @@ -1039,10 +1051,10 @@ GetChannelStats チャンネル統計情報を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return ChannelApiGetChannelStatsRequest + @return ChannelAPIGetChannelStatsRequest */ -func (a *ChannelApiService) GetChannelStats(ctx context.Context, channelId string) ChannelApiGetChannelStatsRequest { - return ChannelApiGetChannelStatsRequest{ +func (a *ChannelAPIService) GetChannelStats(ctx context.Context, channelId string) ChannelAPIGetChannelStatsRequest { + return ChannelAPIGetChannelStatsRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -1052,7 +1064,7 @@ func (a *ChannelApiService) GetChannelStats(ctx context.Context, channelId strin // Execute executes the request // // @return ChannelStats -func (a *ChannelApiService) GetChannelStatsExecute(r ChannelApiGetChannelStatsRequest) (*ChannelStats, *http.Response, error) { +func (a *ChannelAPIService) GetChannelStatsExecute(r ChannelAPIGetChannelStatsRequest) (*ChannelStats, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1060,7 +1072,7 @@ func (a *ChannelApiService) GetChannelStatsExecute(r ChannelApiGetChannelStatsRe localVarReturnValue *ChannelStats ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.GetChannelStats") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.GetChannelStats") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1073,7 +1085,7 @@ func (a *ChannelApiService) GetChannelStatsExecute(r ChannelApiGetChannelStatsRe localVarFormParams := url.Values{} if r.excludeDeletedMessages != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "exclude-deleted-messages", r.excludeDeletedMessages, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude-deleted-messages", r.excludeDeletedMessages, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1129,13 +1141,13 @@ func (a *ChannelApiService) GetChannelStatsExecute(r ChannelApiGetChannelStatsRe return localVarReturnValue, localVarHTTPResponse, nil } -type ChannelApiGetChannelSubscribersRequest struct { +type ChannelAPIGetChannelSubscribersRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService channelId string } -func (r ChannelApiGetChannelSubscribersRequest) Execute() ([]string, *http.Response, error) { +func (r ChannelAPIGetChannelSubscribersRequest) Execute() ([]string, *http.Response, error) { return r.ApiService.GetChannelSubscribersExecute(r) } @@ -1146,10 +1158,10 @@ GetChannelSubscribers チャンネルの通知購読者のリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return ChannelApiGetChannelSubscribersRequest + @return ChannelAPIGetChannelSubscribersRequest */ -func (a *ChannelApiService) GetChannelSubscribers(ctx context.Context, channelId string) ChannelApiGetChannelSubscribersRequest { - return ChannelApiGetChannelSubscribersRequest{ +func (a *ChannelAPIService) GetChannelSubscribers(ctx context.Context, channelId string) ChannelAPIGetChannelSubscribersRequest { + return ChannelAPIGetChannelSubscribersRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -1159,7 +1171,7 @@ func (a *ChannelApiService) GetChannelSubscribers(ctx context.Context, channelId // Execute executes the request // // @return []string -func (a *ChannelApiService) GetChannelSubscribersExecute(r ChannelApiGetChannelSubscribersRequest) ([]string, *http.Response, error) { +func (a *ChannelAPIService) GetChannelSubscribersExecute(r ChannelAPIGetChannelSubscribersRequest) ([]string, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1167,7 +1179,7 @@ func (a *ChannelApiService) GetChannelSubscribersExecute(r ChannelApiGetChannelS localVarReturnValue []string ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.GetChannelSubscribers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.GetChannelSubscribers") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1233,13 +1245,13 @@ func (a *ChannelApiService) GetChannelSubscribersExecute(r ChannelApiGetChannelS return localVarReturnValue, localVarHTTPResponse, nil } -type ChannelApiGetChannelTopicRequest struct { +type ChannelAPIGetChannelTopicRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService channelId string } -func (r ChannelApiGetChannelTopicRequest) Execute() (*ChannelTopic, *http.Response, error) { +func (r ChannelAPIGetChannelTopicRequest) Execute() (*ChannelTopic, *http.Response, error) { return r.ApiService.GetChannelTopicExecute(r) } @@ -1250,10 +1262,10 @@ GetChannelTopic チャンネルトピックを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return ChannelApiGetChannelTopicRequest + @return ChannelAPIGetChannelTopicRequest */ -func (a *ChannelApiService) GetChannelTopic(ctx context.Context, channelId string) ChannelApiGetChannelTopicRequest { - return ChannelApiGetChannelTopicRequest{ +func (a *ChannelAPIService) GetChannelTopic(ctx context.Context, channelId string) ChannelAPIGetChannelTopicRequest { + return ChannelAPIGetChannelTopicRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -1263,7 +1275,7 @@ func (a *ChannelApiService) GetChannelTopic(ctx context.Context, channelId strin // Execute executes the request // // @return ChannelTopic -func (a *ChannelApiService) GetChannelTopicExecute(r ChannelApiGetChannelTopicRequest) (*ChannelTopic, *http.Response, error) { +func (a *ChannelAPIService) GetChannelTopicExecute(r ChannelAPIGetChannelTopicRequest) (*ChannelTopic, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1271,7 +1283,7 @@ func (a *ChannelApiService) GetChannelTopicExecute(r ChannelApiGetChannelTopicRe localVarReturnValue *ChannelTopic ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.GetChannelTopic") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.GetChannelTopic") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1337,13 +1349,13 @@ func (a *ChannelApiService) GetChannelTopicExecute(r ChannelApiGetChannelTopicRe return localVarReturnValue, localVarHTTPResponse, nil } -type ChannelApiGetChannelViewersRequest struct { +type ChannelAPIGetChannelViewersRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService channelId string } -func (r ChannelApiGetChannelViewersRequest) Execute() ([]ChannelViewer, *http.Response, error) { +func (r ChannelAPIGetChannelViewersRequest) Execute() ([]ChannelViewer, *http.Response, error) { return r.ApiService.GetChannelViewersExecute(r) } @@ -1354,10 +1366,10 @@ GetChannelViewers チャンネル閲覧者リストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return ChannelApiGetChannelViewersRequest + @return ChannelAPIGetChannelViewersRequest */ -func (a *ChannelApiService) GetChannelViewers(ctx context.Context, channelId string) ChannelApiGetChannelViewersRequest { - return ChannelApiGetChannelViewersRequest{ +func (a *ChannelAPIService) GetChannelViewers(ctx context.Context, channelId string) ChannelAPIGetChannelViewersRequest { + return ChannelAPIGetChannelViewersRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -1367,7 +1379,7 @@ func (a *ChannelApiService) GetChannelViewers(ctx context.Context, channelId str // Execute executes the request // // @return []ChannelViewer -func (a *ChannelApiService) GetChannelViewersExecute(r ChannelApiGetChannelViewersRequest) ([]ChannelViewer, *http.Response, error) { +func (a *ChannelAPIService) GetChannelViewersExecute(r ChannelAPIGetChannelViewersRequest) ([]ChannelViewer, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1375,7 +1387,7 @@ func (a *ChannelApiService) GetChannelViewersExecute(r ChannelApiGetChannelViewe localVarReturnValue []ChannelViewer ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.GetChannelViewers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.GetChannelViewers") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1441,26 +1453,26 @@ func (a *ChannelApiService) GetChannelViewersExecute(r ChannelApiGetChannelViewe return localVarReturnValue, localVarHTTPResponse, nil } -type ChannelApiGetChannelsRequest struct { +type ChannelAPIGetChannelsRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService includeDm *bool path *string } // ダイレクトメッセージチャンネルをレスポンスに含めるかどうか -func (r ChannelApiGetChannelsRequest) IncludeDm(includeDm bool) ChannelApiGetChannelsRequest { +func (r ChannelAPIGetChannelsRequest) IncludeDm(includeDm bool) ChannelAPIGetChannelsRequest { r.includeDm = &includeDm return r } // パスが一致するチャンネルのみを取得する -func (r ChannelApiGetChannelsRequest) Path(path string) ChannelApiGetChannelsRequest { +func (r ChannelAPIGetChannelsRequest) Path(path string) ChannelAPIGetChannelsRequest { r.path = &path return r } -func (r ChannelApiGetChannelsRequest) Execute() (*ChannelList, *http.Response, error) { +func (r ChannelAPIGetChannelsRequest) Execute() (*ChannelList, *http.Response, error) { return r.ApiService.GetChannelsExecute(r) } @@ -1470,10 +1482,10 @@ GetChannels チャンネルリストを取得 チャンネルのリストを取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ChannelApiGetChannelsRequest + @return ChannelAPIGetChannelsRequest */ -func (a *ChannelApiService) GetChannels(ctx context.Context) ChannelApiGetChannelsRequest { - return ChannelApiGetChannelsRequest{ +func (a *ChannelAPIService) GetChannels(ctx context.Context) ChannelAPIGetChannelsRequest { + return ChannelAPIGetChannelsRequest{ ApiService: a, ctx: ctx, } @@ -1482,7 +1494,7 @@ func (a *ChannelApiService) GetChannels(ctx context.Context) ChannelApiGetChanne // Execute executes the request // // @return ChannelList -func (a *ChannelApiService) GetChannelsExecute(r ChannelApiGetChannelsRequest) (*ChannelList, *http.Response, error) { +func (a *ChannelAPIService) GetChannelsExecute(r ChannelAPIGetChannelsRequest) (*ChannelList, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1490,7 +1502,7 @@ func (a *ChannelApiService) GetChannelsExecute(r ChannelApiGetChannelsRequest) ( localVarReturnValue *ChannelList ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.GetChannels") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.GetChannels") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1502,10 +1514,13 @@ func (a *ChannelApiService) GetChannelsExecute(r ChannelApiGetChannelsRequest) ( localVarFormParams := url.Values{} if r.includeDm != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "include-dm", r.includeDm, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "include-dm", r.includeDm, "form", "") + } else { + var defaultValue bool = false + r.includeDm = &defaultValue } if r.path != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "path", r.path, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "path", r.path, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1561,9 +1576,9 @@ func (a *ChannelApiService) GetChannelsExecute(r ChannelApiGetChannelsRequest) ( return localVarReturnValue, localVarHTTPResponse, nil } -type ChannelApiGetMessagesRequest struct { +type ChannelAPIGetMessagesRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService channelId string limit *int32 offset *int32 @@ -1574,42 +1589,42 @@ type ChannelApiGetMessagesRequest struct { } // 取得する件数 -func (r ChannelApiGetMessagesRequest) Limit(limit int32) ChannelApiGetMessagesRequest { +func (r ChannelAPIGetMessagesRequest) Limit(limit int32) ChannelAPIGetMessagesRequest { r.limit = &limit return r } // 取得するオフセット -func (r ChannelApiGetMessagesRequest) Offset(offset int32) ChannelApiGetMessagesRequest { +func (r ChannelAPIGetMessagesRequest) Offset(offset int32) ChannelAPIGetMessagesRequest { r.offset = &offset return r } // 取得する時間範囲の開始日時 -func (r ChannelApiGetMessagesRequest) Since(since time.Time) ChannelApiGetMessagesRequest { +func (r ChannelAPIGetMessagesRequest) Since(since time.Time) ChannelAPIGetMessagesRequest { r.since = &since return r } // 取得する時間範囲の終了日時 -func (r ChannelApiGetMessagesRequest) Until(until time.Time) ChannelApiGetMessagesRequest { +func (r ChannelAPIGetMessagesRequest) Until(until time.Time) ChannelAPIGetMessagesRequest { r.until = &until return r } // 範囲の端を含めるかどうか -func (r ChannelApiGetMessagesRequest) Inclusive(inclusive bool) ChannelApiGetMessagesRequest { +func (r ChannelAPIGetMessagesRequest) Inclusive(inclusive bool) ChannelAPIGetMessagesRequest { r.inclusive = &inclusive return r } // 昇順か降順か -func (r ChannelApiGetMessagesRequest) Order(order string) ChannelApiGetMessagesRequest { +func (r ChannelAPIGetMessagesRequest) Order(order string) ChannelAPIGetMessagesRequest { r.order = &order return r } -func (r ChannelApiGetMessagesRequest) Execute() ([]Message, *http.Response, error) { +func (r ChannelAPIGetMessagesRequest) Execute() ([]Message, *http.Response, error) { return r.ApiService.GetMessagesExecute(r) } @@ -1620,10 +1635,10 @@ GetMessages チャンネルメッセージのリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return ChannelApiGetMessagesRequest + @return ChannelAPIGetMessagesRequest */ -func (a *ChannelApiService) GetMessages(ctx context.Context, channelId string) ChannelApiGetMessagesRequest { - return ChannelApiGetMessagesRequest{ +func (a *ChannelAPIService) GetMessages(ctx context.Context, channelId string) ChannelAPIGetMessagesRequest { + return ChannelAPIGetMessagesRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -1633,7 +1648,7 @@ func (a *ChannelApiService) GetMessages(ctx context.Context, channelId string) C // Execute executes the request // // @return []Message -func (a *ChannelApiService) GetMessagesExecute(r ChannelApiGetMessagesRequest) ([]Message, *http.Response, error) { +func (a *ChannelAPIService) GetMessagesExecute(r ChannelAPIGetMessagesRequest) ([]Message, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1641,7 +1656,7 @@ func (a *ChannelApiService) GetMessagesExecute(r ChannelApiGetMessagesRequest) ( localVarReturnValue []Message ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.GetMessages") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.GetMessages") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1654,22 +1669,34 @@ func (a *ChannelApiService) GetMessagesExecute(r ChannelApiGetMessagesRequest) ( localVarFormParams := url.Values{} if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") } if r.offset != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } else { + var defaultValue int32 = 0 + r.offset = &defaultValue } if r.since != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "form", "") + } else { + var defaultValue time.Time + r.since = &defaultValue } if r.until != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "form", "") } if r.inclusive != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "inclusive", r.inclusive, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "inclusive", r.inclusive, "form", "") + } else { + var defaultValue bool = false + r.inclusive = &defaultValue } if r.order != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "form", "") + } else { + var defaultValue string = "desc" + r.order = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1725,13 +1752,13 @@ func (a *ChannelApiService) GetMessagesExecute(r ChannelApiGetMessagesRequest) ( return localVarReturnValue, localVarHTTPResponse, nil } -type ChannelApiGetUserDMChannelRequest struct { +type ChannelAPIGetUserDMChannelRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService userId string } -func (r ChannelApiGetUserDMChannelRequest) Execute() (*DMChannel, *http.Response, error) { +func (r ChannelAPIGetUserDMChannelRequest) Execute() (*DMChannel, *http.Response, error) { return r.ApiService.GetUserDMChannelExecute(r) } @@ -1743,10 +1770,10 @@ GetUserDMChannel DMチャンネル情報を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId - @return ChannelApiGetUserDMChannelRequest + @return ChannelAPIGetUserDMChannelRequest */ -func (a *ChannelApiService) GetUserDMChannel(ctx context.Context, userId string) ChannelApiGetUserDMChannelRequest { - return ChannelApiGetUserDMChannelRequest{ +func (a *ChannelAPIService) GetUserDMChannel(ctx context.Context, userId string) ChannelAPIGetUserDMChannelRequest { + return ChannelAPIGetUserDMChannelRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -1756,7 +1783,7 @@ func (a *ChannelApiService) GetUserDMChannel(ctx context.Context, userId string) // Execute executes the request // // @return DMChannel -func (a *ChannelApiService) GetUserDMChannelExecute(r ChannelApiGetUserDMChannelRequest) (*DMChannel, *http.Response, error) { +func (a *ChannelAPIService) GetUserDMChannelExecute(r ChannelAPIGetUserDMChannelRequest) (*DMChannel, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1764,7 +1791,7 @@ func (a *ChannelApiService) GetUserDMChannelExecute(r ChannelApiGetUserDMChannel localVarReturnValue *DMChannel ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.GetUserDMChannel") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.GetUserDMChannel") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1830,19 +1857,19 @@ func (a *ChannelApiService) GetUserDMChannelExecute(r ChannelApiGetUserDMChannel return localVarReturnValue, localVarHTTPResponse, nil } -type ChannelApiPostMessageRequest struct { +type ChannelAPIPostMessageRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService channelId string postMessageRequest *PostMessageRequest } -func (r ChannelApiPostMessageRequest) PostMessageRequest(postMessageRequest PostMessageRequest) ChannelApiPostMessageRequest { +func (r ChannelAPIPostMessageRequest) PostMessageRequest(postMessageRequest PostMessageRequest) ChannelAPIPostMessageRequest { r.postMessageRequest = &postMessageRequest return r } -func (r ChannelApiPostMessageRequest) Execute() (*Message, *http.Response, error) { +func (r ChannelAPIPostMessageRequest) Execute() (*Message, *http.Response, error) { return r.ApiService.PostMessageExecute(r) } @@ -1855,10 +1882,10 @@ embedをtrueに指定すると、メッセージ埋め込みが自動で行わ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return ChannelApiPostMessageRequest + @return ChannelAPIPostMessageRequest */ -func (a *ChannelApiService) PostMessage(ctx context.Context, channelId string) ChannelApiPostMessageRequest { - return ChannelApiPostMessageRequest{ +func (a *ChannelAPIService) PostMessage(ctx context.Context, channelId string) ChannelAPIPostMessageRequest { + return ChannelAPIPostMessageRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -1868,7 +1895,7 @@ func (a *ChannelApiService) PostMessage(ctx context.Context, channelId string) C // Execute executes the request // // @return Message -func (a *ChannelApiService) PostMessageExecute(r ChannelApiPostMessageRequest) (*Message, *http.Response, error) { +func (a *ChannelAPIService) PostMessageExecute(r ChannelAPIPostMessageRequest) (*Message, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -1876,7 +1903,7 @@ func (a *ChannelApiService) PostMessageExecute(r ChannelApiPostMessageRequest) ( localVarReturnValue *Message ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.PostMessage") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.PostMessage") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1944,19 +1971,19 @@ func (a *ChannelApiService) PostMessageExecute(r ChannelApiPostMessageRequest) ( return localVarReturnValue, localVarHTTPResponse, nil } -type ChannelApiSetChannelSubscribersRequest struct { +type ChannelAPISetChannelSubscribersRequest struct { ctx context.Context - ApiService *ChannelApiService + ApiService *ChannelAPIService channelId string putChannelSubscribersRequest *PutChannelSubscribersRequest } -func (r ChannelApiSetChannelSubscribersRequest) PutChannelSubscribersRequest(putChannelSubscribersRequest PutChannelSubscribersRequest) ChannelApiSetChannelSubscribersRequest { +func (r ChannelAPISetChannelSubscribersRequest) PutChannelSubscribersRequest(putChannelSubscribersRequest PutChannelSubscribersRequest) ChannelAPISetChannelSubscribersRequest { r.putChannelSubscribersRequest = &putChannelSubscribersRequest return r } -func (r ChannelApiSetChannelSubscribersRequest) Execute() (*http.Response, error) { +func (r ChannelAPISetChannelSubscribersRequest) Execute() (*http.Response, error) { return r.ApiService.SetChannelSubscribersExecute(r) } @@ -1969,10 +1996,10 @@ SetChannelSubscribers チャンネルの通知購読者を設定 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return ChannelApiSetChannelSubscribersRequest + @return ChannelAPISetChannelSubscribersRequest */ -func (a *ChannelApiService) SetChannelSubscribers(ctx context.Context, channelId string) ChannelApiSetChannelSubscribersRequest { - return ChannelApiSetChannelSubscribersRequest{ +func (a *ChannelAPIService) SetChannelSubscribers(ctx context.Context, channelId string) ChannelAPISetChannelSubscribersRequest { + return ChannelAPISetChannelSubscribersRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -1980,14 +2007,14 @@ func (a *ChannelApiService) SetChannelSubscribers(ctx context.Context, channelId } // Execute executes the request -func (a *ChannelApiService) SetChannelSubscribersExecute(r ChannelApiSetChannelSubscribersRequest) (*http.Response, error) { +func (a *ChannelAPIService) SetChannelSubscribersExecute(r ChannelAPISetChannelSubscribersRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelApiService.SetChannelSubscribers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChannelAPIService.SetChannelSubscribers") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_clip.go b/api_clip.go index a72db8a..34ec11f 100644 --- a/api_clip.go +++ b/api_clip.go @@ -19,22 +19,22 @@ import ( "strings" ) -// ClipApiService ClipApi service -type ClipApiService service +// ClipAPIService ClipAPI service +type ClipAPIService service -type ClipApiClipMessageRequest struct { +type ClipAPIClipMessageRequest struct { ctx context.Context - ApiService *ClipApiService + ApiService *ClipAPIService folderId string postClipFolderMessageRequest *PostClipFolderMessageRequest } -func (r ClipApiClipMessageRequest) PostClipFolderMessageRequest(postClipFolderMessageRequest PostClipFolderMessageRequest) ClipApiClipMessageRequest { +func (r ClipAPIClipMessageRequest) PostClipFolderMessageRequest(postClipFolderMessageRequest PostClipFolderMessageRequest) ClipAPIClipMessageRequest { r.postClipFolderMessageRequest = &postClipFolderMessageRequest return r } -func (r ClipApiClipMessageRequest) Execute() (*ClippedMessage, *http.Response, error) { +func (r ClipAPIClipMessageRequest) Execute() (*ClippedMessage, *http.Response, error) { return r.ApiService.ClipMessageExecute(r) } @@ -45,10 +45,10 @@ ClipMessage メッセージをクリップフォルダに追加 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param folderId クリップフォルダUUID - @return ClipApiClipMessageRequest + @return ClipAPIClipMessageRequest */ -func (a *ClipApiService) ClipMessage(ctx context.Context, folderId string) ClipApiClipMessageRequest { - return ClipApiClipMessageRequest{ +func (a *ClipAPIService) ClipMessage(ctx context.Context, folderId string) ClipAPIClipMessageRequest { + return ClipAPIClipMessageRequest{ ApiService: a, ctx: ctx, folderId: folderId, @@ -58,7 +58,7 @@ func (a *ClipApiService) ClipMessage(ctx context.Context, folderId string) ClipA // Execute executes the request // // @return ClippedMessage -func (a *ClipApiService) ClipMessageExecute(r ClipApiClipMessageRequest) (*ClippedMessage, *http.Response, error) { +func (a *ClipAPIService) ClipMessageExecute(r ClipAPIClipMessageRequest) (*ClippedMessage, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -66,7 +66,7 @@ func (a *ClipApiService) ClipMessageExecute(r ClipApiClipMessageRequest) (*Clipp localVarReturnValue *ClippedMessage ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipApiService.ClipMessage") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipAPIService.ClipMessage") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -134,18 +134,18 @@ func (a *ClipApiService) ClipMessageExecute(r ClipApiClipMessageRequest) (*Clipp return localVarReturnValue, localVarHTTPResponse, nil } -type ClipApiCreateClipFolderRequest struct { +type ClipAPICreateClipFolderRequest struct { ctx context.Context - ApiService *ClipApiService + ApiService *ClipAPIService postClipFolderRequest *PostClipFolderRequest } -func (r ClipApiCreateClipFolderRequest) PostClipFolderRequest(postClipFolderRequest PostClipFolderRequest) ClipApiCreateClipFolderRequest { +func (r ClipAPICreateClipFolderRequest) PostClipFolderRequest(postClipFolderRequest PostClipFolderRequest) ClipAPICreateClipFolderRequest { r.postClipFolderRequest = &postClipFolderRequest return r } -func (r ClipApiCreateClipFolderRequest) Execute() (*ClipFolder, *http.Response, error) { +func (r ClipAPICreateClipFolderRequest) Execute() (*ClipFolder, *http.Response, error) { return r.ApiService.CreateClipFolderExecute(r) } @@ -156,10 +156,10 @@ CreateClipFolder クリップフォルダを作成 既にあるフォルダと同名のフォルダを作成することは可能です。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ClipApiCreateClipFolderRequest + @return ClipAPICreateClipFolderRequest */ -func (a *ClipApiService) CreateClipFolder(ctx context.Context) ClipApiCreateClipFolderRequest { - return ClipApiCreateClipFolderRequest{ +func (a *ClipAPIService) CreateClipFolder(ctx context.Context) ClipAPICreateClipFolderRequest { + return ClipAPICreateClipFolderRequest{ ApiService: a, ctx: ctx, } @@ -168,7 +168,7 @@ func (a *ClipApiService) CreateClipFolder(ctx context.Context) ClipApiCreateClip // Execute executes the request // // @return ClipFolder -func (a *ClipApiService) CreateClipFolderExecute(r ClipApiCreateClipFolderRequest) (*ClipFolder, *http.Response, error) { +func (a *ClipAPIService) CreateClipFolderExecute(r ClipAPICreateClipFolderRequest) (*ClipFolder, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -176,7 +176,7 @@ func (a *ClipApiService) CreateClipFolderExecute(r ClipApiCreateClipFolderReques localVarReturnValue *ClipFolder ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipApiService.CreateClipFolder") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipAPIService.CreateClipFolder") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -243,13 +243,13 @@ func (a *ClipApiService) CreateClipFolderExecute(r ClipApiCreateClipFolderReques return localVarReturnValue, localVarHTTPResponse, nil } -type ClipApiDeleteClipFolderRequest struct { +type ClipAPIDeleteClipFolderRequest struct { ctx context.Context - ApiService *ClipApiService + ApiService *ClipAPIService folderId string } -func (r ClipApiDeleteClipFolderRequest) Execute() (*http.Response, error) { +func (r ClipAPIDeleteClipFolderRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteClipFolderExecute(r) } @@ -260,10 +260,10 @@ DeleteClipFolder クリップフォルダを削除 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param folderId クリップフォルダUUID - @return ClipApiDeleteClipFolderRequest + @return ClipAPIDeleteClipFolderRequest */ -func (a *ClipApiService) DeleteClipFolder(ctx context.Context, folderId string) ClipApiDeleteClipFolderRequest { - return ClipApiDeleteClipFolderRequest{ +func (a *ClipAPIService) DeleteClipFolder(ctx context.Context, folderId string) ClipAPIDeleteClipFolderRequest { + return ClipAPIDeleteClipFolderRequest{ ApiService: a, ctx: ctx, folderId: folderId, @@ -271,14 +271,14 @@ func (a *ClipApiService) DeleteClipFolder(ctx context.Context, folderId string) } // Execute executes the request -func (a *ClipApiService) DeleteClipFolderExecute(r ClipApiDeleteClipFolderRequest) (*http.Response, error) { +func (a *ClipAPIService) DeleteClipFolderExecute(r ClipAPIDeleteClipFolderRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipApiService.DeleteClipFolder") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipAPIService.DeleteClipFolder") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -335,19 +335,19 @@ func (a *ClipApiService) DeleteClipFolderExecute(r ClipApiDeleteClipFolderReques return localVarHTTPResponse, nil } -type ClipApiEditClipFolderRequest struct { +type ClipAPIEditClipFolderRequest struct { ctx context.Context - ApiService *ClipApiService + ApiService *ClipAPIService folderId string patchClipFolderRequest *PatchClipFolderRequest } -func (r ClipApiEditClipFolderRequest) PatchClipFolderRequest(patchClipFolderRequest PatchClipFolderRequest) ClipApiEditClipFolderRequest { +func (r ClipAPIEditClipFolderRequest) PatchClipFolderRequest(patchClipFolderRequest PatchClipFolderRequest) ClipAPIEditClipFolderRequest { r.patchClipFolderRequest = &patchClipFolderRequest return r } -func (r ClipApiEditClipFolderRequest) Execute() (*http.Response, error) { +func (r ClipAPIEditClipFolderRequest) Execute() (*http.Response, error) { return r.ApiService.EditClipFolderExecute(r) } @@ -358,10 +358,10 @@ EditClipFolder クリップフォルダ情報を編集 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param folderId クリップフォルダUUID - @return ClipApiEditClipFolderRequest + @return ClipAPIEditClipFolderRequest */ -func (a *ClipApiService) EditClipFolder(ctx context.Context, folderId string) ClipApiEditClipFolderRequest { - return ClipApiEditClipFolderRequest{ +func (a *ClipAPIService) EditClipFolder(ctx context.Context, folderId string) ClipAPIEditClipFolderRequest { + return ClipAPIEditClipFolderRequest{ ApiService: a, ctx: ctx, folderId: folderId, @@ -369,14 +369,14 @@ func (a *ClipApiService) EditClipFolder(ctx context.Context, folderId string) Cl } // Execute executes the request -func (a *ClipApiService) EditClipFolderExecute(r ClipApiEditClipFolderRequest) (*http.Response, error) { +func (a *ClipAPIService) EditClipFolderExecute(r ClipAPIEditClipFolderRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipApiService.EditClipFolder") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipAPIService.EditClipFolder") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -435,13 +435,13 @@ func (a *ClipApiService) EditClipFolderExecute(r ClipApiEditClipFolderRequest) ( return localVarHTTPResponse, nil } -type ClipApiGetClipFolderRequest struct { +type ClipAPIGetClipFolderRequest struct { ctx context.Context - ApiService *ClipApiService + ApiService *ClipAPIService folderId string } -func (r ClipApiGetClipFolderRequest) Execute() (*ClipFolder, *http.Response, error) { +func (r ClipAPIGetClipFolderRequest) Execute() (*ClipFolder, *http.Response, error) { return r.ApiService.GetClipFolderExecute(r) } @@ -452,10 +452,10 @@ GetClipFolder クリップフォルダ情報を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param folderId クリップフォルダUUID - @return ClipApiGetClipFolderRequest + @return ClipAPIGetClipFolderRequest */ -func (a *ClipApiService) GetClipFolder(ctx context.Context, folderId string) ClipApiGetClipFolderRequest { - return ClipApiGetClipFolderRequest{ +func (a *ClipAPIService) GetClipFolder(ctx context.Context, folderId string) ClipAPIGetClipFolderRequest { + return ClipAPIGetClipFolderRequest{ ApiService: a, ctx: ctx, folderId: folderId, @@ -465,7 +465,7 @@ func (a *ClipApiService) GetClipFolder(ctx context.Context, folderId string) Cli // Execute executes the request // // @return ClipFolder -func (a *ClipApiService) GetClipFolderExecute(r ClipApiGetClipFolderRequest) (*ClipFolder, *http.Response, error) { +func (a *ClipAPIService) GetClipFolderExecute(r ClipAPIGetClipFolderRequest) (*ClipFolder, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -473,7 +473,7 @@ func (a *ClipApiService) GetClipFolderExecute(r ClipApiGetClipFolderRequest) (*C localVarReturnValue *ClipFolder ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipApiService.GetClipFolder") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipAPIService.GetClipFolder") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -539,12 +539,12 @@ func (a *ClipApiService) GetClipFolderExecute(r ClipApiGetClipFolderRequest) (*C return localVarReturnValue, localVarHTTPResponse, nil } -type ClipApiGetClipFoldersRequest struct { +type ClipAPIGetClipFoldersRequest struct { ctx context.Context - ApiService *ClipApiService + ApiService *ClipAPIService } -func (r ClipApiGetClipFoldersRequest) Execute() ([]ClipFolder, *http.Response, error) { +func (r ClipAPIGetClipFoldersRequest) Execute() ([]ClipFolder, *http.Response, error) { return r.ApiService.GetClipFoldersExecute(r) } @@ -554,10 +554,10 @@ GetClipFolders クリップフォルダのリストを取得 自身が所有するクリップフォルダのリストを取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ClipApiGetClipFoldersRequest + @return ClipAPIGetClipFoldersRequest */ -func (a *ClipApiService) GetClipFolders(ctx context.Context) ClipApiGetClipFoldersRequest { - return ClipApiGetClipFoldersRequest{ +func (a *ClipAPIService) GetClipFolders(ctx context.Context) ClipAPIGetClipFoldersRequest { + return ClipAPIGetClipFoldersRequest{ ApiService: a, ctx: ctx, } @@ -566,7 +566,7 @@ func (a *ClipApiService) GetClipFolders(ctx context.Context) ClipApiGetClipFolde // Execute executes the request // // @return []ClipFolder -func (a *ClipApiService) GetClipFoldersExecute(r ClipApiGetClipFoldersRequest) ([]ClipFolder, *http.Response, error) { +func (a *ClipAPIService) GetClipFoldersExecute(r ClipAPIGetClipFoldersRequest) ([]ClipFolder, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -574,7 +574,7 @@ func (a *ClipApiService) GetClipFoldersExecute(r ClipApiGetClipFoldersRequest) ( localVarReturnValue []ClipFolder ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipApiService.GetClipFolders") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipAPIService.GetClipFolders") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -639,9 +639,9 @@ func (a *ClipApiService) GetClipFoldersExecute(r ClipApiGetClipFoldersRequest) ( return localVarReturnValue, localVarHTTPResponse, nil } -type ClipApiGetClipsRequest struct { +type ClipAPIGetClipsRequest struct { ctx context.Context - ApiService *ClipApiService + ApiService *ClipAPIService folderId string limit *int32 offset *int32 @@ -649,24 +649,24 @@ type ClipApiGetClipsRequest struct { } // 取得する件数 -func (r ClipApiGetClipsRequest) Limit(limit int32) ClipApiGetClipsRequest { +func (r ClipAPIGetClipsRequest) Limit(limit int32) ClipAPIGetClipsRequest { r.limit = &limit return r } // 取得するオフセット -func (r ClipApiGetClipsRequest) Offset(offset int32) ClipApiGetClipsRequest { +func (r ClipAPIGetClipsRequest) Offset(offset int32) ClipAPIGetClipsRequest { r.offset = &offset return r } // 昇順か降順か -func (r ClipApiGetClipsRequest) Order(order string) ClipApiGetClipsRequest { +func (r ClipAPIGetClipsRequest) Order(order string) ClipAPIGetClipsRequest { r.order = &order return r } -func (r ClipApiGetClipsRequest) Execute() ([]ClippedMessage, *http.Response, error) { +func (r ClipAPIGetClipsRequest) Execute() ([]ClippedMessage, *http.Response, error) { return r.ApiService.GetClipsExecute(r) } @@ -678,10 +678,10 @@ GetClips フォルダ内のクリップのリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param folderId クリップフォルダUUID - @return ClipApiGetClipsRequest + @return ClipAPIGetClipsRequest */ -func (a *ClipApiService) GetClips(ctx context.Context, folderId string) ClipApiGetClipsRequest { - return ClipApiGetClipsRequest{ +func (a *ClipAPIService) GetClips(ctx context.Context, folderId string) ClipAPIGetClipsRequest { + return ClipAPIGetClipsRequest{ ApiService: a, ctx: ctx, folderId: folderId, @@ -691,7 +691,7 @@ func (a *ClipApiService) GetClips(ctx context.Context, folderId string) ClipApiG // Execute executes the request // // @return []ClippedMessage -func (a *ClipApiService) GetClipsExecute(r ClipApiGetClipsRequest) ([]ClippedMessage, *http.Response, error) { +func (a *ClipAPIService) GetClipsExecute(r ClipAPIGetClipsRequest) ([]ClippedMessage, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -699,7 +699,7 @@ func (a *ClipApiService) GetClipsExecute(r ClipApiGetClipsRequest) ([]ClippedMes localVarReturnValue []ClippedMessage ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipApiService.GetClips") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipAPIService.GetClips") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -712,13 +712,19 @@ func (a *ClipApiService) GetClipsExecute(r ClipApiGetClipsRequest) ([]ClippedMes localVarFormParams := url.Values{} if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") } if r.offset != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } else { + var defaultValue int32 = 0 + r.offset = &defaultValue } if r.order != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "form", "") + } else { + var defaultValue string = "desc" + r.order = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -774,13 +780,13 @@ func (a *ClipApiService) GetClipsExecute(r ClipApiGetClipsRequest) ([]ClippedMes return localVarReturnValue, localVarHTTPResponse, nil } -type ClipApiGetMessageClipsRequest struct { +type ClipAPIGetMessageClipsRequest struct { ctx context.Context - ApiService *ClipApiService + ApiService *ClipAPIService messageId string } -func (r ClipApiGetMessageClipsRequest) Execute() ([]MessageClip, *http.Response, error) { +func (r ClipAPIGetMessageClipsRequest) Execute() ([]MessageClip, *http.Response, error) { return r.ApiService.GetMessageClipsExecute(r) } @@ -791,10 +797,10 @@ GetMessageClips 自分のクリップを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID - @return ClipApiGetMessageClipsRequest + @return ClipAPIGetMessageClipsRequest */ -func (a *ClipApiService) GetMessageClips(ctx context.Context, messageId string) ClipApiGetMessageClipsRequest { - return ClipApiGetMessageClipsRequest{ +func (a *ClipAPIService) GetMessageClips(ctx context.Context, messageId string) ClipAPIGetMessageClipsRequest { + return ClipAPIGetMessageClipsRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -804,7 +810,7 @@ func (a *ClipApiService) GetMessageClips(ctx context.Context, messageId string) // Execute executes the request // // @return []MessageClip -func (a *ClipApiService) GetMessageClipsExecute(r ClipApiGetMessageClipsRequest) ([]MessageClip, *http.Response, error) { +func (a *ClipAPIService) GetMessageClipsExecute(r ClipAPIGetMessageClipsRequest) ([]MessageClip, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -812,7 +818,7 @@ func (a *ClipApiService) GetMessageClipsExecute(r ClipApiGetMessageClipsRequest) localVarReturnValue []MessageClip ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipApiService.GetMessageClips") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipAPIService.GetMessageClips") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -878,14 +884,14 @@ func (a *ClipApiService) GetMessageClipsExecute(r ClipApiGetMessageClipsRequest) return localVarReturnValue, localVarHTTPResponse, nil } -type ClipApiUnclipMessageRequest struct { +type ClipAPIUnclipMessageRequest struct { ctx context.Context - ApiService *ClipApiService + ApiService *ClipAPIService folderId string messageId string } -func (r ClipApiUnclipMessageRequest) Execute() (*http.Response, error) { +func (r ClipAPIUnclipMessageRequest) Execute() (*http.Response, error) { return r.ApiService.UnclipMessageExecute(r) } @@ -898,10 +904,10 @@ UnclipMessage メッセージをクリップフォルダから除外 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param folderId クリップフォルダUUID @param messageId メッセージUUID - @return ClipApiUnclipMessageRequest + @return ClipAPIUnclipMessageRequest */ -func (a *ClipApiService) UnclipMessage(ctx context.Context, folderId string, messageId string) ClipApiUnclipMessageRequest { - return ClipApiUnclipMessageRequest{ +func (a *ClipAPIService) UnclipMessage(ctx context.Context, folderId string, messageId string) ClipAPIUnclipMessageRequest { + return ClipAPIUnclipMessageRequest{ ApiService: a, ctx: ctx, folderId: folderId, @@ -910,14 +916,14 @@ func (a *ClipApiService) UnclipMessage(ctx context.Context, folderId string, mes } // Execute executes the request -func (a *ClipApiService) UnclipMessageExecute(r ClipApiUnclipMessageRequest) (*http.Response, error) { +func (a *ClipAPIService) UnclipMessageExecute(r ClipAPIUnclipMessageRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipApiService.UnclipMessage") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClipAPIService.UnclipMessage") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_file.go b/api_file.go index 0adac81..e0f7ea3 100644 --- a/api_file.go +++ b/api_file.go @@ -21,16 +21,16 @@ import ( "time" ) -// FileApiService FileApi service -type FileApiService service +// FileAPIService FileAPI service +type FileAPIService service -type FileApiDeleteFileRequest struct { +type FileAPIDeleteFileRequest struct { ctx context.Context - ApiService *FileApiService + ApiService *FileAPIService fileId string } -func (r FileApiDeleteFileRequest) Execute() (*http.Response, error) { +func (r FileAPIDeleteFileRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteFileExecute(r) } @@ -42,10 +42,10 @@ DeleteFile ファイルを削除 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param fileId ファイルUUID - @return FileApiDeleteFileRequest + @return FileAPIDeleteFileRequest */ -func (a *FileApiService) DeleteFile(ctx context.Context, fileId string) FileApiDeleteFileRequest { - return FileApiDeleteFileRequest{ +func (a *FileAPIService) DeleteFile(ctx context.Context, fileId string) FileAPIDeleteFileRequest { + return FileAPIDeleteFileRequest{ ApiService: a, ctx: ctx, fileId: fileId, @@ -53,14 +53,14 @@ func (a *FileApiService) DeleteFile(ctx context.Context, fileId string) FileApiD } // Execute executes the request -func (a *FileApiService) DeleteFileExecute(r FileApiDeleteFileRequest) (*http.Response, error) { +func (a *FileAPIService) DeleteFileExecute(r FileAPIDeleteFileRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FileApiService.DeleteFile") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FileAPIService.DeleteFile") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -117,20 +117,20 @@ func (a *FileApiService) DeleteFileExecute(r FileApiDeleteFileRequest) (*http.Re return localVarHTTPResponse, nil } -type FileApiGetFileRequest struct { +type FileAPIGetFileRequest struct { ctx context.Context - ApiService *FileApiService + ApiService *FileAPIService fileId string dl *int32 } // 1を指定するとレスポンスにContent-Dispositionヘッダーが付与されます -func (r FileApiGetFileRequest) Dl(dl int32) FileApiGetFileRequest { +func (r FileAPIGetFileRequest) Dl(dl int32) FileAPIGetFileRequest { r.dl = &dl return r } -func (r FileApiGetFileRequest) Execute() (*os.File, *http.Response, error) { +func (r FileAPIGetFileRequest) Execute() (*os.File, *http.Response, error) { return r.ApiService.GetFileExecute(r) } @@ -142,10 +142,10 @@ GetFile ファイルをダウンロード @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param fileId ファイルUUID - @return FileApiGetFileRequest + @return FileAPIGetFileRequest */ -func (a *FileApiService) GetFile(ctx context.Context, fileId string) FileApiGetFileRequest { - return FileApiGetFileRequest{ +func (a *FileAPIService) GetFile(ctx context.Context, fileId string) FileAPIGetFileRequest { + return FileAPIGetFileRequest{ ApiService: a, ctx: ctx, fileId: fileId, @@ -155,7 +155,7 @@ func (a *FileApiService) GetFile(ctx context.Context, fileId string) FileApiGetF // Execute executes the request // // @return *os.File -func (a *FileApiService) GetFileExecute(r FileApiGetFileRequest) (*os.File, *http.Response, error) { +func (a *FileAPIService) GetFileExecute(r FileAPIGetFileRequest) (*os.File, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -163,7 +163,7 @@ func (a *FileApiService) GetFileExecute(r FileApiGetFileRequest) (*os.File, *htt localVarReturnValue *os.File ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FileApiService.GetFile") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FileAPIService.GetFile") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -176,7 +176,7 @@ func (a *FileApiService) GetFileExecute(r FileApiGetFileRequest) (*os.File, *htt localVarFormParams := url.Values{} if r.dl != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "dl", r.dl, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "dl", r.dl, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -232,13 +232,13 @@ func (a *FileApiService) GetFileExecute(r FileApiGetFileRequest) (*os.File, *htt return localVarReturnValue, localVarHTTPResponse, nil } -type FileApiGetFileMetaRequest struct { +type FileAPIGetFileMetaRequest struct { ctx context.Context - ApiService *FileApiService + ApiService *FileAPIService fileId string } -func (r FileApiGetFileMetaRequest) Execute() (*FileInfo, *http.Response, error) { +func (r FileAPIGetFileMetaRequest) Execute() (*FileInfo, *http.Response, error) { return r.ApiService.GetFileMetaExecute(r) } @@ -250,10 +250,10 @@ GetFileMeta ファイルメタを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param fileId ファイルUUID - @return FileApiGetFileMetaRequest + @return FileAPIGetFileMetaRequest */ -func (a *FileApiService) GetFileMeta(ctx context.Context, fileId string) FileApiGetFileMetaRequest { - return FileApiGetFileMetaRequest{ +func (a *FileAPIService) GetFileMeta(ctx context.Context, fileId string) FileAPIGetFileMetaRequest { + return FileAPIGetFileMetaRequest{ ApiService: a, ctx: ctx, fileId: fileId, @@ -263,7 +263,7 @@ func (a *FileApiService) GetFileMeta(ctx context.Context, fileId string) FileApi // Execute executes the request // // @return FileInfo -func (a *FileApiService) GetFileMetaExecute(r FileApiGetFileMetaRequest) (*FileInfo, *http.Response, error) { +func (a *FileAPIService) GetFileMetaExecute(r FileAPIGetFileMetaRequest) (*FileInfo, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -271,7 +271,7 @@ func (a *FileApiService) GetFileMetaExecute(r FileApiGetFileMetaRequest) (*FileI localVarReturnValue *FileInfo ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FileApiService.GetFileMeta") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FileAPIService.GetFileMeta") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -337,9 +337,9 @@ func (a *FileApiService) GetFileMetaExecute(r FileApiGetFileMetaRequest) (*FileI return localVarReturnValue, localVarHTTPResponse, nil } -type FileApiGetFilesRequest struct { +type FileAPIGetFilesRequest struct { ctx context.Context - ApiService *FileApiService + ApiService *FileAPIService channelId *string limit *int32 offset *int32 @@ -351,54 +351,54 @@ type FileApiGetFilesRequest struct { } // アップロード先チャンネルUUID -func (r FileApiGetFilesRequest) ChannelId(channelId string) FileApiGetFilesRequest { +func (r FileAPIGetFilesRequest) ChannelId(channelId string) FileAPIGetFilesRequest { r.channelId = &channelId return r } // 取得する件数 -func (r FileApiGetFilesRequest) Limit(limit int32) FileApiGetFilesRequest { +func (r FileAPIGetFilesRequest) Limit(limit int32) FileAPIGetFilesRequest { r.limit = &limit return r } // 取得するオフセット -func (r FileApiGetFilesRequest) Offset(offset int32) FileApiGetFilesRequest { +func (r FileAPIGetFilesRequest) Offset(offset int32) FileAPIGetFilesRequest { r.offset = &offset return r } // 取得する時間範囲の開始日時 -func (r FileApiGetFilesRequest) Since(since time.Time) FileApiGetFilesRequest { +func (r FileAPIGetFilesRequest) Since(since time.Time) FileAPIGetFilesRequest { r.since = &since return r } // 取得する時間範囲の終了日時 -func (r FileApiGetFilesRequest) Until(until time.Time) FileApiGetFilesRequest { +func (r FileAPIGetFilesRequest) Until(until time.Time) FileAPIGetFilesRequest { r.until = &until return r } // 範囲の端を含めるかどうか -func (r FileApiGetFilesRequest) Inclusive(inclusive bool) FileApiGetFilesRequest { +func (r FileAPIGetFilesRequest) Inclusive(inclusive bool) FileAPIGetFilesRequest { r.inclusive = &inclusive return r } // 昇順か降順か -func (r FileApiGetFilesRequest) Order(order string) FileApiGetFilesRequest { +func (r FileAPIGetFilesRequest) Order(order string) FileAPIGetFilesRequest { r.order = &order return r } // アップロード者が自分のファイルのみを取得するか -func (r FileApiGetFilesRequest) Mine(mine bool) FileApiGetFilesRequest { +func (r FileAPIGetFilesRequest) Mine(mine bool) FileAPIGetFilesRequest { r.mine = &mine return r } -func (r FileApiGetFilesRequest) Execute() ([]FileInfo, *http.Response, error) { +func (r FileAPIGetFilesRequest) Execute() ([]FileInfo, *http.Response, error) { return r.ApiService.GetFilesExecute(r) } @@ -409,10 +409,10 @@ GetFiles ファイルメタのリストを取得 クエリパラメータ`channelId`, `mine`の少なくともいずれかが必須です。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return FileApiGetFilesRequest + @return FileAPIGetFilesRequest */ -func (a *FileApiService) GetFiles(ctx context.Context) FileApiGetFilesRequest { - return FileApiGetFilesRequest{ +func (a *FileAPIService) GetFiles(ctx context.Context) FileAPIGetFilesRequest { + return FileAPIGetFilesRequest{ ApiService: a, ctx: ctx, } @@ -421,7 +421,7 @@ func (a *FileApiService) GetFiles(ctx context.Context) FileApiGetFilesRequest { // Execute executes the request // // @return []FileInfo -func (a *FileApiService) GetFilesExecute(r FileApiGetFilesRequest) ([]FileInfo, *http.Response, error) { +func (a *FileAPIService) GetFilesExecute(r FileAPIGetFilesRequest) ([]FileInfo, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -429,7 +429,7 @@ func (a *FileApiService) GetFilesExecute(r FileApiGetFilesRequest) ([]FileInfo, localVarReturnValue []FileInfo ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FileApiService.GetFiles") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FileAPIService.GetFiles") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -441,28 +441,43 @@ func (a *FileApiService) GetFilesExecute(r FileApiGetFilesRequest) ([]FileInfo, localVarFormParams := url.Values{} if r.channelId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "channelId", r.channelId, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "channelId", r.channelId, "form", "") } if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") } if r.offset != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } else { + var defaultValue int32 = 0 + r.offset = &defaultValue } if r.since != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "form", "") + } else { + var defaultValue time.Time + r.since = &defaultValue } if r.until != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "form", "") } if r.inclusive != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "inclusive", r.inclusive, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "inclusive", r.inclusive, "form", "") + } else { + var defaultValue bool = false + r.inclusive = &defaultValue } if r.order != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "form", "") + } else { + var defaultValue string = "desc" + r.order = &defaultValue } if r.mine != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "mine", r.mine, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "mine", r.mine, "form", "") + } else { + var defaultValue bool = false + r.mine = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -518,20 +533,20 @@ func (a *FileApiService) GetFilesExecute(r FileApiGetFilesRequest) ([]FileInfo, return localVarReturnValue, localVarHTTPResponse, nil } -type FileApiGetThumbnailImageRequest struct { +type FileAPIGetThumbnailImageRequest struct { ctx context.Context - ApiService *FileApiService + ApiService *FileAPIService fileId string type_ *ThumbnailType } // 取得するサムネイルのタイプ -func (r FileApiGetThumbnailImageRequest) Type_(type_ ThumbnailType) FileApiGetThumbnailImageRequest { +func (r FileAPIGetThumbnailImageRequest) Type_(type_ ThumbnailType) FileAPIGetThumbnailImageRequest { r.type_ = &type_ return r } -func (r FileApiGetThumbnailImageRequest) Execute() (*os.File, *http.Response, error) { +func (r FileAPIGetThumbnailImageRequest) Execute() (*os.File, *http.Response, error) { return r.ApiService.GetThumbnailImageExecute(r) } @@ -543,10 +558,10 @@ GetThumbnailImage サムネイル画像を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param fileId ファイルUUID - @return FileApiGetThumbnailImageRequest + @return FileAPIGetThumbnailImageRequest */ -func (a *FileApiService) GetThumbnailImage(ctx context.Context, fileId string) FileApiGetThumbnailImageRequest { - return FileApiGetThumbnailImageRequest{ +func (a *FileAPIService) GetThumbnailImage(ctx context.Context, fileId string) FileAPIGetThumbnailImageRequest { + return FileAPIGetThumbnailImageRequest{ ApiService: a, ctx: ctx, fileId: fileId, @@ -556,7 +571,7 @@ func (a *FileApiService) GetThumbnailImage(ctx context.Context, fileId string) F // Execute executes the request // // @return *os.File -func (a *FileApiService) GetThumbnailImageExecute(r FileApiGetThumbnailImageRequest) (*os.File, *http.Response, error) { +func (a *FileAPIService) GetThumbnailImageExecute(r FileAPIGetThumbnailImageRequest) (*os.File, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -564,7 +579,7 @@ func (a *FileApiService) GetThumbnailImageExecute(r FileApiGetThumbnailImageRequ localVarReturnValue *os.File ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FileApiService.GetThumbnailImage") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FileAPIService.GetThumbnailImage") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -577,7 +592,10 @@ func (a *FileApiService) GetThumbnailImageExecute(r FileApiGetThumbnailImageRequ localVarFormParams := url.Values{} if r.type_ != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "form", "") + } else { + var defaultValue ThumbnailType = "image" + r.type_ = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -633,26 +651,26 @@ func (a *FileApiService) GetThumbnailImageExecute(r FileApiGetThumbnailImageRequ return localVarReturnValue, localVarHTTPResponse, nil } -type FileApiPostFileRequest struct { +type FileAPIPostFileRequest struct { ctx context.Context - ApiService *FileApiService + ApiService *FileAPIService file *os.File channelId *string } // ファイル本体 -func (r FileApiPostFileRequest) File(file *os.File) FileApiPostFileRequest { +func (r FileAPIPostFileRequest) File(file *os.File) FileAPIPostFileRequest { r.file = file return r } // アップロード先チャンネルUUID -func (r FileApiPostFileRequest) ChannelId(channelId string) FileApiPostFileRequest { +func (r FileAPIPostFileRequest) ChannelId(channelId string) FileAPIPostFileRequest { r.channelId = &channelId return r } -func (r FileApiPostFileRequest) Execute() (*FileInfo, *http.Response, error) { +func (r FileAPIPostFileRequest) Execute() (*FileInfo, *http.Response, error) { return r.ApiService.PostFileExecute(r) } @@ -663,10 +681,10 @@ PostFile ファイルをアップロード アーカイブされているチャンネルにはアップロード出来ません。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return FileApiPostFileRequest + @return FileAPIPostFileRequest */ -func (a *FileApiService) PostFile(ctx context.Context) FileApiPostFileRequest { - return FileApiPostFileRequest{ +func (a *FileAPIService) PostFile(ctx context.Context) FileAPIPostFileRequest { + return FileAPIPostFileRequest{ ApiService: a, ctx: ctx, } @@ -675,7 +693,7 @@ func (a *FileApiService) PostFile(ctx context.Context) FileApiPostFileRequest { // Execute executes the request // // @return FileInfo -func (a *FileApiService) PostFileExecute(r FileApiPostFileRequest) (*FileInfo, *http.Response, error) { +func (a *FileAPIService) PostFileExecute(r FileAPIPostFileRequest) (*FileInfo, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -683,7 +701,7 @@ func (a *FileApiService) PostFileExecute(r FileApiPostFileRequest) (*FileInfo, * localVarReturnValue *FileInfo ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FileApiService.PostFile") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FileAPIService.PostFile") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -722,7 +740,6 @@ func (a *FileApiService) PostFileExecute(r FileApiPostFileRequest) (*FileInfo, * var fileLocalVarFileBytes []byte fileLocalVarFormFileName = "file" - fileLocalVarFile := r.file if fileLocalVarFile != nil { @@ -733,7 +750,7 @@ func (a *FileApiService) PostFileExecute(r FileApiPostFileRequest) (*FileInfo, * fileLocalVarFile.Close() formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) } - parameterAddToHeaderOrQuery(localVarFormParams, "channelId", r.channelId, "") + parameterAddToHeaderOrQuery(localVarFormParams, "channelId", r.channelId, "", "") req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_group.go b/api_group.go index 2006eb1..e35c37f 100644 --- a/api_group.go +++ b/api_group.go @@ -20,22 +20,22 @@ import ( "strings" ) -// GroupApiService GroupApi service -type GroupApiService service +// GroupAPIService GroupAPI service +type GroupAPIService service -type GroupApiAddUserGroupAdminRequest struct { +type GroupAPIAddUserGroupAdminRequest struct { ctx context.Context - ApiService *GroupApiService + ApiService *GroupAPIService groupId string postUserGroupAdminRequest *PostUserGroupAdminRequest } -func (r GroupApiAddUserGroupAdminRequest) PostUserGroupAdminRequest(postUserGroupAdminRequest PostUserGroupAdminRequest) GroupApiAddUserGroupAdminRequest { +func (r GroupAPIAddUserGroupAdminRequest) PostUserGroupAdminRequest(postUserGroupAdminRequest PostUserGroupAdminRequest) GroupAPIAddUserGroupAdminRequest { r.postUserGroupAdminRequest = &postUserGroupAdminRequest return r } -func (r GroupApiAddUserGroupAdminRequest) Execute() (*http.Response, error) { +func (r GroupAPIAddUserGroupAdminRequest) Execute() (*http.Response, error) { return r.ApiService.AddUserGroupAdminExecute(r) } @@ -47,10 +47,10 @@ AddUserGroupAdmin グループ管理者を追加 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param groupId ユーザーグループUUID - @return GroupApiAddUserGroupAdminRequest + @return GroupAPIAddUserGroupAdminRequest */ -func (a *GroupApiService) AddUserGroupAdmin(ctx context.Context, groupId string) GroupApiAddUserGroupAdminRequest { - return GroupApiAddUserGroupAdminRequest{ +func (a *GroupAPIService) AddUserGroupAdmin(ctx context.Context, groupId string) GroupAPIAddUserGroupAdminRequest { + return GroupAPIAddUserGroupAdminRequest{ ApiService: a, ctx: ctx, groupId: groupId, @@ -58,14 +58,14 @@ func (a *GroupApiService) AddUserGroupAdmin(ctx context.Context, groupId string) } // Execute executes the request -func (a *GroupApiService) AddUserGroupAdminExecute(r GroupApiAddUserGroupAdminRequest) (*http.Response, error) { +func (a *GroupAPIService) AddUserGroupAdminExecute(r GroupAPIAddUserGroupAdminRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.AddUserGroupAdmin") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupAPIService.AddUserGroupAdmin") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -124,19 +124,19 @@ func (a *GroupApiService) AddUserGroupAdminExecute(r GroupApiAddUserGroupAdminRe return localVarHTTPResponse, nil } -type GroupApiAddUserGroupMemberRequest struct { +type GroupAPIAddUserGroupMemberRequest struct { ctx context.Context - ApiService *GroupApiService + ApiService *GroupAPIService groupId string addUserGroupMemberRequest *AddUserGroupMemberRequest } -func (r GroupApiAddUserGroupMemberRequest) AddUserGroupMemberRequest(addUserGroupMemberRequest AddUserGroupMemberRequest) GroupApiAddUserGroupMemberRequest { +func (r GroupAPIAddUserGroupMemberRequest) AddUserGroupMemberRequest(addUserGroupMemberRequest AddUserGroupMemberRequest) GroupAPIAddUserGroupMemberRequest { r.addUserGroupMemberRequest = &addUserGroupMemberRequest return r } -func (r GroupApiAddUserGroupMemberRequest) Execute() (*http.Response, error) { +func (r GroupAPIAddUserGroupMemberRequest) Execute() (*http.Response, error) { return r.ApiService.AddUserGroupMemberExecute(r) } @@ -148,10 +148,10 @@ AddUserGroupMember グループメンバーを追加 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param groupId ユーザーグループUUID - @return GroupApiAddUserGroupMemberRequest + @return GroupAPIAddUserGroupMemberRequest */ -func (a *GroupApiService) AddUserGroupMember(ctx context.Context, groupId string) GroupApiAddUserGroupMemberRequest { - return GroupApiAddUserGroupMemberRequest{ +func (a *GroupAPIService) AddUserGroupMember(ctx context.Context, groupId string) GroupAPIAddUserGroupMemberRequest { + return GroupAPIAddUserGroupMemberRequest{ ApiService: a, ctx: ctx, groupId: groupId, @@ -159,14 +159,14 @@ func (a *GroupApiService) AddUserGroupMember(ctx context.Context, groupId string } // Execute executes the request -func (a *GroupApiService) AddUserGroupMemberExecute(r GroupApiAddUserGroupMemberRequest) (*http.Response, error) { +func (a *GroupAPIService) AddUserGroupMemberExecute(r GroupAPIAddUserGroupMemberRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.AddUserGroupMember") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupAPIService.AddUserGroupMember") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -225,20 +225,20 @@ func (a *GroupApiService) AddUserGroupMemberExecute(r GroupApiAddUserGroupMember return localVarHTTPResponse, nil } -type GroupApiChangeUserGroupIconRequest struct { +type GroupAPIChangeUserGroupIconRequest struct { ctx context.Context - ApiService *GroupApiService + ApiService *GroupAPIService groupId string file *os.File } // アイコン画像(2MBまでのpng, jpeg, gif) -func (r GroupApiChangeUserGroupIconRequest) File(file *os.File) GroupApiChangeUserGroupIconRequest { +func (r GroupAPIChangeUserGroupIconRequest) File(file *os.File) GroupAPIChangeUserGroupIconRequest { r.file = file return r } -func (r GroupApiChangeUserGroupIconRequest) Execute() (*http.Response, error) { +func (r GroupAPIChangeUserGroupIconRequest) Execute() (*http.Response, error) { return r.ApiService.ChangeUserGroupIconExecute(r) } @@ -250,10 +250,10 @@ ChangeUserGroupIcon ユーザーグループのアイコンを変更 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param groupId ユーザーグループUUID - @return GroupApiChangeUserGroupIconRequest + @return GroupAPIChangeUserGroupIconRequest */ -func (a *GroupApiService) ChangeUserGroupIcon(ctx context.Context, groupId string) GroupApiChangeUserGroupIconRequest { - return GroupApiChangeUserGroupIconRequest{ +func (a *GroupAPIService) ChangeUserGroupIcon(ctx context.Context, groupId string) GroupAPIChangeUserGroupIconRequest { + return GroupAPIChangeUserGroupIconRequest{ ApiService: a, ctx: ctx, groupId: groupId, @@ -261,14 +261,14 @@ func (a *GroupApiService) ChangeUserGroupIcon(ctx context.Context, groupId strin } // Execute executes the request -func (a *GroupApiService) ChangeUserGroupIconExecute(r GroupApiChangeUserGroupIconRequest) (*http.Response, error) { +func (a *GroupAPIService) ChangeUserGroupIconExecute(r GroupAPIChangeUserGroupIconRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.ChangeUserGroupIcon") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupAPIService.ChangeUserGroupIcon") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -305,7 +305,6 @@ func (a *GroupApiService) ChangeUserGroupIconExecute(r GroupApiChangeUserGroupIc var fileLocalVarFileBytes []byte fileLocalVarFormFileName = "file" - fileLocalVarFile := r.file if fileLocalVarFile != nil { @@ -344,18 +343,18 @@ func (a *GroupApiService) ChangeUserGroupIconExecute(r GroupApiChangeUserGroupIc return localVarHTTPResponse, nil } -type GroupApiCreateUserGroupRequest struct { +type GroupAPICreateUserGroupRequest struct { ctx context.Context - ApiService *GroupApiService + ApiService *GroupAPIService postUserGroupRequest *PostUserGroupRequest } -func (r GroupApiCreateUserGroupRequest) PostUserGroupRequest(postUserGroupRequest PostUserGroupRequest) GroupApiCreateUserGroupRequest { +func (r GroupAPICreateUserGroupRequest) PostUserGroupRequest(postUserGroupRequest PostUserGroupRequest) GroupAPICreateUserGroupRequest { r.postUserGroupRequest = &postUserGroupRequest return r } -func (r GroupApiCreateUserGroupRequest) Execute() (*UserGroup, *http.Response, error) { +func (r GroupAPICreateUserGroupRequest) Execute() (*UserGroup, *http.Response, error) { return r.ApiService.CreateUserGroupExecute(r) } @@ -366,10 +365,10 @@ CreateUserGroup ユーザーグループを作成 作成者は自動的にグループ管理者になります。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return GroupApiCreateUserGroupRequest + @return GroupAPICreateUserGroupRequest */ -func (a *GroupApiService) CreateUserGroup(ctx context.Context) GroupApiCreateUserGroupRequest { - return GroupApiCreateUserGroupRequest{ +func (a *GroupAPIService) CreateUserGroup(ctx context.Context) GroupAPICreateUserGroupRequest { + return GroupAPICreateUserGroupRequest{ ApiService: a, ctx: ctx, } @@ -378,7 +377,7 @@ func (a *GroupApiService) CreateUserGroup(ctx context.Context) GroupApiCreateUse // Execute executes the request // // @return UserGroup -func (a *GroupApiService) CreateUserGroupExecute(r GroupApiCreateUserGroupRequest) (*UserGroup, *http.Response, error) { +func (a *GroupAPIService) CreateUserGroupExecute(r GroupAPICreateUserGroupRequest) (*UserGroup, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -386,7 +385,7 @@ func (a *GroupApiService) CreateUserGroupExecute(r GroupApiCreateUserGroupReques localVarReturnValue *UserGroup ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.CreateUserGroup") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupAPIService.CreateUserGroup") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -453,13 +452,13 @@ func (a *GroupApiService) CreateUserGroupExecute(r GroupApiCreateUserGroupReques return localVarReturnValue, localVarHTTPResponse, nil } -type GroupApiDeleteUserGroupRequest struct { +type GroupAPIDeleteUserGroupRequest struct { ctx context.Context - ApiService *GroupApiService + ApiService *GroupAPIService groupId string } -func (r GroupApiDeleteUserGroupRequest) Execute() (*http.Response, error) { +func (r GroupAPIDeleteUserGroupRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteUserGroupExecute(r) } @@ -471,10 +470,10 @@ DeleteUserGroup ユーザーグループを削除 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param groupId ユーザーグループUUID - @return GroupApiDeleteUserGroupRequest + @return GroupAPIDeleteUserGroupRequest */ -func (a *GroupApiService) DeleteUserGroup(ctx context.Context, groupId string) GroupApiDeleteUserGroupRequest { - return GroupApiDeleteUserGroupRequest{ +func (a *GroupAPIService) DeleteUserGroup(ctx context.Context, groupId string) GroupAPIDeleteUserGroupRequest { + return GroupAPIDeleteUserGroupRequest{ ApiService: a, ctx: ctx, groupId: groupId, @@ -482,14 +481,14 @@ func (a *GroupApiService) DeleteUserGroup(ctx context.Context, groupId string) G } // Execute executes the request -func (a *GroupApiService) DeleteUserGroupExecute(r GroupApiDeleteUserGroupRequest) (*http.Response, error) { +func (a *GroupAPIService) DeleteUserGroupExecute(r GroupAPIDeleteUserGroupRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.DeleteUserGroup") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupAPIService.DeleteUserGroup") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -546,19 +545,19 @@ func (a *GroupApiService) DeleteUserGroupExecute(r GroupApiDeleteUserGroupReques return localVarHTTPResponse, nil } -type GroupApiEditUserGroupRequest struct { +type GroupAPIEditUserGroupRequest struct { ctx context.Context - ApiService *GroupApiService + ApiService *GroupAPIService groupId string patchUserGroupRequest *PatchUserGroupRequest } -func (r GroupApiEditUserGroupRequest) PatchUserGroupRequest(patchUserGroupRequest PatchUserGroupRequest) GroupApiEditUserGroupRequest { +func (r GroupAPIEditUserGroupRequest) PatchUserGroupRequest(patchUserGroupRequest PatchUserGroupRequest) GroupAPIEditUserGroupRequest { r.patchUserGroupRequest = &patchUserGroupRequest return r } -func (r GroupApiEditUserGroupRequest) Execute() (*http.Response, error) { +func (r GroupAPIEditUserGroupRequest) Execute() (*http.Response, error) { return r.ApiService.EditUserGroupExecute(r) } @@ -570,10 +569,10 @@ EditUserGroup ユーザーグループを編集 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param groupId ユーザーグループUUID - @return GroupApiEditUserGroupRequest + @return GroupAPIEditUserGroupRequest */ -func (a *GroupApiService) EditUserGroup(ctx context.Context, groupId string) GroupApiEditUserGroupRequest { - return GroupApiEditUserGroupRequest{ +func (a *GroupAPIService) EditUserGroup(ctx context.Context, groupId string) GroupAPIEditUserGroupRequest { + return GroupAPIEditUserGroupRequest{ ApiService: a, ctx: ctx, groupId: groupId, @@ -581,14 +580,14 @@ func (a *GroupApiService) EditUserGroup(ctx context.Context, groupId string) Gro } // Execute executes the request -func (a *GroupApiService) EditUserGroupExecute(r GroupApiEditUserGroupRequest) (*http.Response, error) { +func (a *GroupAPIService) EditUserGroupExecute(r GroupAPIEditUserGroupRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.EditUserGroup") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupAPIService.EditUserGroup") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -647,20 +646,20 @@ func (a *GroupApiService) EditUserGroupExecute(r GroupApiEditUserGroupRequest) ( return localVarHTTPResponse, nil } -type GroupApiEditUserGroupMemberRequest struct { +type GroupAPIEditUserGroupMemberRequest struct { ctx context.Context - ApiService *GroupApiService + ApiService *GroupAPIService groupId string userId string patchGroupMemberRequest *PatchGroupMemberRequest } -func (r GroupApiEditUserGroupMemberRequest) PatchGroupMemberRequest(patchGroupMemberRequest PatchGroupMemberRequest) GroupApiEditUserGroupMemberRequest { +func (r GroupAPIEditUserGroupMemberRequest) PatchGroupMemberRequest(patchGroupMemberRequest PatchGroupMemberRequest) GroupAPIEditUserGroupMemberRequest { r.patchGroupMemberRequest = &patchGroupMemberRequest return r } -func (r GroupApiEditUserGroupMemberRequest) Execute() (*http.Response, error) { +func (r GroupAPIEditUserGroupMemberRequest) Execute() (*http.Response, error) { return r.ApiService.EditUserGroupMemberExecute(r) } @@ -673,10 +672,10 @@ EditUserGroupMember グループメンバーを編集 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param groupId ユーザーグループUUID @param userId ユーザーUUID - @return GroupApiEditUserGroupMemberRequest + @return GroupAPIEditUserGroupMemberRequest */ -func (a *GroupApiService) EditUserGroupMember(ctx context.Context, groupId string, userId string) GroupApiEditUserGroupMemberRequest { - return GroupApiEditUserGroupMemberRequest{ +func (a *GroupAPIService) EditUserGroupMember(ctx context.Context, groupId string, userId string) GroupAPIEditUserGroupMemberRequest { + return GroupAPIEditUserGroupMemberRequest{ ApiService: a, ctx: ctx, groupId: groupId, @@ -685,14 +684,14 @@ func (a *GroupApiService) EditUserGroupMember(ctx context.Context, groupId strin } // Execute executes the request -func (a *GroupApiService) EditUserGroupMemberExecute(r GroupApiEditUserGroupMemberRequest) (*http.Response, error) { +func (a *GroupAPIService) EditUserGroupMemberExecute(r GroupAPIEditUserGroupMemberRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.EditUserGroupMember") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupAPIService.EditUserGroupMember") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -752,13 +751,13 @@ func (a *GroupApiService) EditUserGroupMemberExecute(r GroupApiEditUserGroupMemb return localVarHTTPResponse, nil } -type GroupApiGetUserGroupRequest struct { +type GroupAPIGetUserGroupRequest struct { ctx context.Context - ApiService *GroupApiService + ApiService *GroupAPIService groupId string } -func (r GroupApiGetUserGroupRequest) Execute() (*UserGroup, *http.Response, error) { +func (r GroupAPIGetUserGroupRequest) Execute() (*UserGroup, *http.Response, error) { return r.ApiService.GetUserGroupExecute(r) } @@ -769,10 +768,10 @@ GetUserGroup ユーザーグループを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param groupId ユーザーグループUUID - @return GroupApiGetUserGroupRequest + @return GroupAPIGetUserGroupRequest */ -func (a *GroupApiService) GetUserGroup(ctx context.Context, groupId string) GroupApiGetUserGroupRequest { - return GroupApiGetUserGroupRequest{ +func (a *GroupAPIService) GetUserGroup(ctx context.Context, groupId string) GroupAPIGetUserGroupRequest { + return GroupAPIGetUserGroupRequest{ ApiService: a, ctx: ctx, groupId: groupId, @@ -782,7 +781,7 @@ func (a *GroupApiService) GetUserGroup(ctx context.Context, groupId string) Grou // Execute executes the request // // @return UserGroup -func (a *GroupApiService) GetUserGroupExecute(r GroupApiGetUserGroupRequest) (*UserGroup, *http.Response, error) { +func (a *GroupAPIService) GetUserGroupExecute(r GroupAPIGetUserGroupRequest) (*UserGroup, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -790,7 +789,7 @@ func (a *GroupApiService) GetUserGroupExecute(r GroupApiGetUserGroupRequest) (*U localVarReturnValue *UserGroup ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.GetUserGroup") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupAPIService.GetUserGroup") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -856,13 +855,13 @@ func (a *GroupApiService) GetUserGroupExecute(r GroupApiGetUserGroupRequest) (*U return localVarReturnValue, localVarHTTPResponse, nil } -type GroupApiGetUserGroupAdminsRequest struct { +type GroupAPIGetUserGroupAdminsRequest struct { ctx context.Context - ApiService *GroupApiService + ApiService *GroupAPIService groupId string } -func (r GroupApiGetUserGroupAdminsRequest) Execute() ([]string, *http.Response, error) { +func (r GroupAPIGetUserGroupAdminsRequest) Execute() ([]string, *http.Response, error) { return r.ApiService.GetUserGroupAdminsExecute(r) } @@ -873,10 +872,10 @@ GetUserGroupAdmins グループ管理者を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param groupId ユーザーグループUUID - @return GroupApiGetUserGroupAdminsRequest + @return GroupAPIGetUserGroupAdminsRequest */ -func (a *GroupApiService) GetUserGroupAdmins(ctx context.Context, groupId string) GroupApiGetUserGroupAdminsRequest { - return GroupApiGetUserGroupAdminsRequest{ +func (a *GroupAPIService) GetUserGroupAdmins(ctx context.Context, groupId string) GroupAPIGetUserGroupAdminsRequest { + return GroupAPIGetUserGroupAdminsRequest{ ApiService: a, ctx: ctx, groupId: groupId, @@ -886,7 +885,7 @@ func (a *GroupApiService) GetUserGroupAdmins(ctx context.Context, groupId string // Execute executes the request // // @return []string -func (a *GroupApiService) GetUserGroupAdminsExecute(r GroupApiGetUserGroupAdminsRequest) ([]string, *http.Response, error) { +func (a *GroupAPIService) GetUserGroupAdminsExecute(r GroupAPIGetUserGroupAdminsRequest) ([]string, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -894,7 +893,7 @@ func (a *GroupApiService) GetUserGroupAdminsExecute(r GroupApiGetUserGroupAdmins localVarReturnValue []string ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.GetUserGroupAdmins") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupAPIService.GetUserGroupAdmins") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -960,13 +959,13 @@ func (a *GroupApiService) GetUserGroupAdminsExecute(r GroupApiGetUserGroupAdmins return localVarReturnValue, localVarHTTPResponse, nil } -type GroupApiGetUserGroupMembersRequest struct { +type GroupAPIGetUserGroupMembersRequest struct { ctx context.Context - ApiService *GroupApiService + ApiService *GroupAPIService groupId string } -func (r GroupApiGetUserGroupMembersRequest) Execute() ([]UserGroupMember, *http.Response, error) { +func (r GroupAPIGetUserGroupMembersRequest) Execute() ([]UserGroupMember, *http.Response, error) { return r.ApiService.GetUserGroupMembersExecute(r) } @@ -977,10 +976,10 @@ GetUserGroupMembers グループメンバーを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param groupId ユーザーグループUUID - @return GroupApiGetUserGroupMembersRequest + @return GroupAPIGetUserGroupMembersRequest */ -func (a *GroupApiService) GetUserGroupMembers(ctx context.Context, groupId string) GroupApiGetUserGroupMembersRequest { - return GroupApiGetUserGroupMembersRequest{ +func (a *GroupAPIService) GetUserGroupMembers(ctx context.Context, groupId string) GroupAPIGetUserGroupMembersRequest { + return GroupAPIGetUserGroupMembersRequest{ ApiService: a, ctx: ctx, groupId: groupId, @@ -990,7 +989,7 @@ func (a *GroupApiService) GetUserGroupMembers(ctx context.Context, groupId strin // Execute executes the request // // @return []UserGroupMember -func (a *GroupApiService) GetUserGroupMembersExecute(r GroupApiGetUserGroupMembersRequest) ([]UserGroupMember, *http.Response, error) { +func (a *GroupAPIService) GetUserGroupMembersExecute(r GroupAPIGetUserGroupMembersRequest) ([]UserGroupMember, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -998,7 +997,7 @@ func (a *GroupApiService) GetUserGroupMembersExecute(r GroupApiGetUserGroupMembe localVarReturnValue []UserGroupMember ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.GetUserGroupMembers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupAPIService.GetUserGroupMembers") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1064,12 +1063,12 @@ func (a *GroupApiService) GetUserGroupMembersExecute(r GroupApiGetUserGroupMembe return localVarReturnValue, localVarHTTPResponse, nil } -type GroupApiGetUserGroupsRequest struct { +type GroupAPIGetUserGroupsRequest struct { ctx context.Context - ApiService *GroupApiService + ApiService *GroupAPIService } -func (r GroupApiGetUserGroupsRequest) Execute() ([]UserGroup, *http.Response, error) { +func (r GroupAPIGetUserGroupsRequest) Execute() ([]UserGroup, *http.Response, error) { return r.ApiService.GetUserGroupsExecute(r) } @@ -1079,10 +1078,10 @@ GetUserGroups ユーザーグループのリストを取得 ユーザーグループのリストを取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return GroupApiGetUserGroupsRequest + @return GroupAPIGetUserGroupsRequest */ -func (a *GroupApiService) GetUserGroups(ctx context.Context) GroupApiGetUserGroupsRequest { - return GroupApiGetUserGroupsRequest{ +func (a *GroupAPIService) GetUserGroups(ctx context.Context) GroupAPIGetUserGroupsRequest { + return GroupAPIGetUserGroupsRequest{ ApiService: a, ctx: ctx, } @@ -1091,7 +1090,7 @@ func (a *GroupApiService) GetUserGroups(ctx context.Context) GroupApiGetUserGrou // Execute executes the request // // @return []UserGroup -func (a *GroupApiService) GetUserGroupsExecute(r GroupApiGetUserGroupsRequest) ([]UserGroup, *http.Response, error) { +func (a *GroupAPIService) GetUserGroupsExecute(r GroupAPIGetUserGroupsRequest) ([]UserGroup, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1099,7 +1098,7 @@ func (a *GroupApiService) GetUserGroupsExecute(r GroupApiGetUserGroupsRequest) ( localVarReturnValue []UserGroup ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.GetUserGroups") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupAPIService.GetUserGroups") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1164,14 +1163,14 @@ func (a *GroupApiService) GetUserGroupsExecute(r GroupApiGetUserGroupsRequest) ( return localVarReturnValue, localVarHTTPResponse, nil } -type GroupApiRemoveUserGroupAdminRequest struct { +type GroupAPIRemoveUserGroupAdminRequest struct { ctx context.Context - ApiService *GroupApiService + ApiService *GroupAPIService groupId string userId string } -func (r GroupApiRemoveUserGroupAdminRequest) Execute() (*http.Response, error) { +func (r GroupAPIRemoveUserGroupAdminRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveUserGroupAdminExecute(r) } @@ -1185,10 +1184,10 @@ RemoveUserGroupAdmin グループ管理者を削除 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param groupId ユーザーグループUUID @param userId ユーザーUUID - @return GroupApiRemoveUserGroupAdminRequest + @return GroupAPIRemoveUserGroupAdminRequest */ -func (a *GroupApiService) RemoveUserGroupAdmin(ctx context.Context, groupId string, userId string) GroupApiRemoveUserGroupAdminRequest { - return GroupApiRemoveUserGroupAdminRequest{ +func (a *GroupAPIService) RemoveUserGroupAdmin(ctx context.Context, groupId string, userId string) GroupAPIRemoveUserGroupAdminRequest { + return GroupAPIRemoveUserGroupAdminRequest{ ApiService: a, ctx: ctx, groupId: groupId, @@ -1197,14 +1196,14 @@ func (a *GroupApiService) RemoveUserGroupAdmin(ctx context.Context, groupId stri } // Execute executes the request -func (a *GroupApiService) RemoveUserGroupAdminExecute(r GroupApiRemoveUserGroupAdminRequest) (*http.Response, error) { +func (a *GroupAPIService) RemoveUserGroupAdminExecute(r GroupAPIRemoveUserGroupAdminRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.RemoveUserGroupAdmin") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupAPIService.RemoveUserGroupAdmin") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -1262,14 +1261,14 @@ func (a *GroupApiService) RemoveUserGroupAdminExecute(r GroupApiRemoveUserGroupA return localVarHTTPResponse, nil } -type GroupApiRemoveUserGroupMemberRequest struct { +type GroupAPIRemoveUserGroupMemberRequest struct { ctx context.Context - ApiService *GroupApiService + ApiService *GroupAPIService groupId string userId string } -func (r GroupApiRemoveUserGroupMemberRequest) Execute() (*http.Response, error) { +func (r GroupAPIRemoveUserGroupMemberRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveUserGroupMemberExecute(r) } @@ -1283,10 +1282,10 @@ RemoveUserGroupMember グループメンバーを削除 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param groupId ユーザーグループUUID @param userId ユーザーUUID - @return GroupApiRemoveUserGroupMemberRequest + @return GroupAPIRemoveUserGroupMemberRequest */ -func (a *GroupApiService) RemoveUserGroupMember(ctx context.Context, groupId string, userId string) GroupApiRemoveUserGroupMemberRequest { - return GroupApiRemoveUserGroupMemberRequest{ +func (a *GroupAPIService) RemoveUserGroupMember(ctx context.Context, groupId string, userId string) GroupAPIRemoveUserGroupMemberRequest { + return GroupAPIRemoveUserGroupMemberRequest{ ApiService: a, ctx: ctx, groupId: groupId, @@ -1295,14 +1294,14 @@ func (a *GroupApiService) RemoveUserGroupMember(ctx context.Context, groupId str } // Execute executes the request -func (a *GroupApiService) RemoveUserGroupMemberExecute(r GroupApiRemoveUserGroupMemberRequest) (*http.Response, error) { +func (a *GroupAPIService) RemoveUserGroupMemberExecute(r GroupAPIRemoveUserGroupMemberRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.RemoveUserGroupMember") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupAPIService.RemoveUserGroupMember") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -1360,13 +1359,13 @@ func (a *GroupApiService) RemoveUserGroupMemberExecute(r GroupApiRemoveUserGroup return localVarHTTPResponse, nil } -type GroupApiRemoveUserGroupMembersRequest struct { +type GroupAPIRemoveUserGroupMembersRequest struct { ctx context.Context - ApiService *GroupApiService + ApiService *GroupAPIService groupId string } -func (r GroupApiRemoveUserGroupMembersRequest) Execute() (*http.Response, error) { +func (r GroupAPIRemoveUserGroupMembersRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveUserGroupMembersExecute(r) } @@ -1378,10 +1377,10 @@ RemoveUserGroupMembers グループメンバーを一括削除 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param groupId ユーザーグループUUID - @return GroupApiRemoveUserGroupMembersRequest + @return GroupAPIRemoveUserGroupMembersRequest */ -func (a *GroupApiService) RemoveUserGroupMembers(ctx context.Context, groupId string) GroupApiRemoveUserGroupMembersRequest { - return GroupApiRemoveUserGroupMembersRequest{ +func (a *GroupAPIService) RemoveUserGroupMembers(ctx context.Context, groupId string) GroupAPIRemoveUserGroupMembersRequest { + return GroupAPIRemoveUserGroupMembersRequest{ ApiService: a, ctx: ctx, groupId: groupId, @@ -1389,14 +1388,14 @@ func (a *GroupApiService) RemoveUserGroupMembers(ctx context.Context, groupId st } // Execute executes the request -func (a *GroupApiService) RemoveUserGroupMembersExecute(r GroupApiRemoveUserGroupMembersRequest) (*http.Response, error) { +func (a *GroupAPIService) RemoveUserGroupMembersExecute(r GroupAPIRemoveUserGroupMembersRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupApiService.RemoveUserGroupMembers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupAPIService.RemoveUserGroupMembers") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_me.go b/api_me.go index 38b1156..316ea65 100644 --- a/api_me.go +++ b/api_me.go @@ -20,21 +20,21 @@ import ( "strings" ) -// MeApiService MeApi service -type MeApiService service +// MeAPIService MeAPI service +type MeAPIService service -type MeApiAddMyStarRequest struct { +type MeAPIAddMyStarRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService postStarRequest *PostStarRequest } -func (r MeApiAddMyStarRequest) PostStarRequest(postStarRequest PostStarRequest) MeApiAddMyStarRequest { +func (r MeAPIAddMyStarRequest) PostStarRequest(postStarRequest PostStarRequest) MeAPIAddMyStarRequest { r.postStarRequest = &postStarRequest return r } -func (r MeApiAddMyStarRequest) Execute() (*http.Response, error) { +func (r MeAPIAddMyStarRequest) Execute() (*http.Response, error) { return r.ApiService.AddMyStarExecute(r) } @@ -46,24 +46,24 @@ AddMyStar チャンネルをスターに追加 不正なチャンネルIDを指定した場合、400を返します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiAddMyStarRequest + @return MeAPIAddMyStarRequest */ -func (a *MeApiService) AddMyStar(ctx context.Context) MeApiAddMyStarRequest { - return MeApiAddMyStarRequest{ +func (a *MeAPIService) AddMyStar(ctx context.Context) MeAPIAddMyStarRequest { + return MeAPIAddMyStarRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *MeApiService) AddMyStarExecute(r MeApiAddMyStarRequest) (*http.Response, error) { +func (a *MeAPIService) AddMyStarExecute(r MeAPIAddMyStarRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.AddMyStar") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.AddMyStar") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -121,18 +121,18 @@ func (a *MeApiService) AddMyStarExecute(r MeApiAddMyStarRequest) (*http.Response return localVarHTTPResponse, nil } -type MeApiAddMyUserTagRequest struct { +type MeAPIAddMyUserTagRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService postUserTagRequest *PostUserTagRequest } -func (r MeApiAddMyUserTagRequest) PostUserTagRequest(postUserTagRequest PostUserTagRequest) MeApiAddMyUserTagRequest { +func (r MeAPIAddMyUserTagRequest) PostUserTagRequest(postUserTagRequest PostUserTagRequest) MeAPIAddMyUserTagRequest { r.postUserTagRequest = &postUserTagRequest return r } -func (r MeApiAddMyUserTagRequest) Execute() (*UserTag, *http.Response, error) { +func (r MeAPIAddMyUserTagRequest) Execute() (*UserTag, *http.Response, error) { return r.ApiService.AddMyUserTagExecute(r) } @@ -142,10 +142,10 @@ AddMyUserTag 自分にタグを追加 自分に新しくタグを追加します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiAddMyUserTagRequest + @return MeAPIAddMyUserTagRequest */ -func (a *MeApiService) AddMyUserTag(ctx context.Context) MeApiAddMyUserTagRequest { - return MeApiAddMyUserTagRequest{ +func (a *MeAPIService) AddMyUserTag(ctx context.Context) MeAPIAddMyUserTagRequest { + return MeAPIAddMyUserTagRequest{ ApiService: a, ctx: ctx, } @@ -154,7 +154,7 @@ func (a *MeApiService) AddMyUserTag(ctx context.Context) MeApiAddMyUserTagReques // Execute executes the request // // @return UserTag -func (a *MeApiService) AddMyUserTagExecute(r MeApiAddMyUserTagRequest) (*UserTag, *http.Response, error) { +func (a *MeAPIService) AddMyUserTagExecute(r MeAPIAddMyUserTagRequest) (*UserTag, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -162,7 +162,7 @@ func (a *MeApiService) AddMyUserTagExecute(r MeApiAddMyUserTagRequest) (*UserTag localVarReturnValue *UserTag ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.AddMyUserTag") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.AddMyUserTag") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -229,19 +229,19 @@ func (a *MeApiService) AddMyUserTagExecute(r MeApiAddMyUserTagRequest) (*UserTag return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiChangeMyIconRequest struct { +type MeAPIChangeMyIconRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService file *os.File } // アイコン画像(2MBまでのpng, jpeg, gif) -func (r MeApiChangeMyIconRequest) File(file *os.File) MeApiChangeMyIconRequest { +func (r MeAPIChangeMyIconRequest) File(file *os.File) MeAPIChangeMyIconRequest { r.file = file return r } -func (r MeApiChangeMyIconRequest) Execute() (*http.Response, error) { +func (r MeAPIChangeMyIconRequest) Execute() (*http.Response, error) { return r.ApiService.ChangeMyIconExecute(r) } @@ -251,24 +251,24 @@ ChangeMyIcon 自分のアイコン画像を変更 自分のアイコン画像を変更します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiChangeMyIconRequest + @return MeAPIChangeMyIconRequest */ -func (a *MeApiService) ChangeMyIcon(ctx context.Context) MeApiChangeMyIconRequest { - return MeApiChangeMyIconRequest{ +func (a *MeAPIService) ChangeMyIcon(ctx context.Context) MeAPIChangeMyIconRequest { + return MeAPIChangeMyIconRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *MeApiService) ChangeMyIconExecute(r MeApiChangeMyIconRequest) (*http.Response, error) { +func (a *MeAPIService) ChangeMyIconExecute(r MeAPIChangeMyIconRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.ChangeMyIcon") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.ChangeMyIcon") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -304,7 +304,6 @@ func (a *MeApiService) ChangeMyIconExecute(r MeApiChangeMyIconRequest) (*http.Re var fileLocalVarFileBytes []byte fileLocalVarFormFileName = "file" - fileLocalVarFile := r.file if fileLocalVarFile != nil { @@ -343,18 +342,18 @@ func (a *MeApiService) ChangeMyIconExecute(r MeApiChangeMyIconRequest) (*http.Re return localVarHTTPResponse, nil } -type MeApiChangeMyNotifyCitationRequest struct { +type MeAPIChangeMyNotifyCitationRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService putNotifyCitationRequest *PutNotifyCitationRequest } -func (r MeApiChangeMyNotifyCitationRequest) PutNotifyCitationRequest(putNotifyCitationRequest PutNotifyCitationRequest) MeApiChangeMyNotifyCitationRequest { +func (r MeAPIChangeMyNotifyCitationRequest) PutNotifyCitationRequest(putNotifyCitationRequest PutNotifyCitationRequest) MeAPIChangeMyNotifyCitationRequest { r.putNotifyCitationRequest = &putNotifyCitationRequest return r } -func (r MeApiChangeMyNotifyCitationRequest) Execute() (*http.Response, error) { +func (r MeAPIChangeMyNotifyCitationRequest) Execute() (*http.Response, error) { return r.ApiService.ChangeMyNotifyCitationExecute(r) } @@ -364,24 +363,24 @@ ChangeMyNotifyCitation メッセージ引用通知の設定情報を変更 メッセージ引用通知の設定情報を変更します @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiChangeMyNotifyCitationRequest + @return MeAPIChangeMyNotifyCitationRequest */ -func (a *MeApiService) ChangeMyNotifyCitation(ctx context.Context) MeApiChangeMyNotifyCitationRequest { - return MeApiChangeMyNotifyCitationRequest{ +func (a *MeAPIService) ChangeMyNotifyCitation(ctx context.Context) MeAPIChangeMyNotifyCitationRequest { + return MeAPIChangeMyNotifyCitationRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *MeApiService) ChangeMyNotifyCitationExecute(r MeApiChangeMyNotifyCitationRequest) (*http.Response, error) { +func (a *MeAPIService) ChangeMyNotifyCitationExecute(r MeAPIChangeMyNotifyCitationRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.ChangeMyNotifyCitation") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.ChangeMyNotifyCitation") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -439,18 +438,18 @@ func (a *MeApiService) ChangeMyNotifyCitationExecute(r MeApiChangeMyNotifyCitati return localVarHTTPResponse, nil } -type MeApiChangeMyPasswordRequest struct { +type MeAPIChangeMyPasswordRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService putMyPasswordRequest *PutMyPasswordRequest } -func (r MeApiChangeMyPasswordRequest) PutMyPasswordRequest(putMyPasswordRequest PutMyPasswordRequest) MeApiChangeMyPasswordRequest { +func (r MeAPIChangeMyPasswordRequest) PutMyPasswordRequest(putMyPasswordRequest PutMyPasswordRequest) MeAPIChangeMyPasswordRequest { r.putMyPasswordRequest = &putMyPasswordRequest return r } -func (r MeApiChangeMyPasswordRequest) Execute() (*http.Response, error) { +func (r MeAPIChangeMyPasswordRequest) Execute() (*http.Response, error) { return r.ApiService.ChangeMyPasswordExecute(r) } @@ -460,24 +459,24 @@ ChangeMyPassword 自分のパスワードを変更 自身のパスワードを変更します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiChangeMyPasswordRequest + @return MeAPIChangeMyPasswordRequest */ -func (a *MeApiService) ChangeMyPassword(ctx context.Context) MeApiChangeMyPasswordRequest { - return MeApiChangeMyPasswordRequest{ +func (a *MeAPIService) ChangeMyPassword(ctx context.Context) MeAPIChangeMyPasswordRequest { + return MeAPIChangeMyPasswordRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *MeApiService) ChangeMyPasswordExecute(r MeApiChangeMyPasswordRequest) (*http.Response, error) { +func (a *MeAPIService) ChangeMyPasswordExecute(r MeAPIChangeMyPasswordRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.ChangeMyPassword") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.ChangeMyPassword") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -535,18 +534,18 @@ func (a *MeApiService) ChangeMyPasswordExecute(r MeApiChangeMyPasswordRequest) ( return localVarHTTPResponse, nil } -type MeApiEditMeRequest struct { +type MeAPIEditMeRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService patchMeRequest *PatchMeRequest } -func (r MeApiEditMeRequest) PatchMeRequest(patchMeRequest PatchMeRequest) MeApiEditMeRequest { +func (r MeAPIEditMeRequest) PatchMeRequest(patchMeRequest PatchMeRequest) MeAPIEditMeRequest { r.patchMeRequest = &patchMeRequest return r } -func (r MeApiEditMeRequest) Execute() (*http.Response, error) { +func (r MeAPIEditMeRequest) Execute() (*http.Response, error) { return r.ApiService.EditMeExecute(r) } @@ -556,24 +555,24 @@ EditMe 自分のユーザー情報を変更 自身のユーザー情報を変更します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiEditMeRequest + @return MeAPIEditMeRequest */ -func (a *MeApiService) EditMe(ctx context.Context) MeApiEditMeRequest { - return MeApiEditMeRequest{ +func (a *MeAPIService) EditMe(ctx context.Context) MeAPIEditMeRequest { + return MeAPIEditMeRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *MeApiService) EditMeExecute(r MeApiEditMeRequest) (*http.Response, error) { +func (a *MeAPIService) EditMeExecute(r MeAPIEditMeRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.EditMe") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.EditMe") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -631,19 +630,19 @@ func (a *MeApiService) EditMeExecute(r MeApiEditMeRequest) (*http.Response, erro return localVarHTTPResponse, nil } -type MeApiEditMyUserTagRequest struct { +type MeAPIEditMyUserTagRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService tagId string patchUserTagRequest *PatchUserTagRequest } -func (r MeApiEditMyUserTagRequest) PatchUserTagRequest(patchUserTagRequest PatchUserTagRequest) MeApiEditMyUserTagRequest { +func (r MeAPIEditMyUserTagRequest) PatchUserTagRequest(patchUserTagRequest PatchUserTagRequest) MeAPIEditMyUserTagRequest { r.patchUserTagRequest = &patchUserTagRequest return r } -func (r MeApiEditMyUserTagRequest) Execute() (*http.Response, error) { +func (r MeAPIEditMyUserTagRequest) Execute() (*http.Response, error) { return r.ApiService.EditMyUserTagExecute(r) } @@ -654,10 +653,10 @@ EditMyUserTag 自分のタグを編集 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param tagId タグUUID - @return MeApiEditMyUserTagRequest + @return MeAPIEditMyUserTagRequest */ -func (a *MeApiService) EditMyUserTag(ctx context.Context, tagId string) MeApiEditMyUserTagRequest { - return MeApiEditMyUserTagRequest{ +func (a *MeAPIService) EditMyUserTag(ctx context.Context, tagId string) MeAPIEditMyUserTagRequest { + return MeAPIEditMyUserTagRequest{ ApiService: a, ctx: ctx, tagId: tagId, @@ -665,14 +664,14 @@ func (a *MeApiService) EditMyUserTag(ctx context.Context, tagId string) MeApiEdi } // Execute executes the request -func (a *MeApiService) EditMyUserTagExecute(r MeApiEditMyUserTagRequest) (*http.Response, error) { +func (a *MeAPIService) EditMyUserTagExecute(r MeAPIEditMyUserTagRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.EditMyUserTag") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.EditMyUserTag") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -731,12 +730,12 @@ func (a *MeApiService) EditMyUserTagExecute(r MeApiEditMyUserTagRequest) (*http. return localVarHTTPResponse, nil } -type MeApiGetMeRequest struct { +type MeAPIGetMeRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService } -func (r MeApiGetMeRequest) Execute() (*MyUserDetail, *http.Response, error) { +func (r MeAPIGetMeRequest) Execute() (*MyUserDetail, *http.Response, error) { return r.ApiService.GetMeExecute(r) } @@ -746,10 +745,10 @@ GetMe 自分のユーザー詳細を取得 自身のユーザー詳細情報を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiGetMeRequest + @return MeAPIGetMeRequest */ -func (a *MeApiService) GetMe(ctx context.Context) MeApiGetMeRequest { - return MeApiGetMeRequest{ +func (a *MeAPIService) GetMe(ctx context.Context) MeAPIGetMeRequest { + return MeAPIGetMeRequest{ ApiService: a, ctx: ctx, } @@ -758,7 +757,7 @@ func (a *MeApiService) GetMe(ctx context.Context) MeApiGetMeRequest { // Execute executes the request // // @return MyUserDetail -func (a *MeApiService) GetMeExecute(r MeApiGetMeRequest) (*MyUserDetail, *http.Response, error) { +func (a *MeAPIService) GetMeExecute(r MeAPIGetMeRequest) (*MyUserDetail, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -766,7 +765,7 @@ func (a *MeApiService) GetMeExecute(r MeApiGetMeRequest) (*MyUserDetail, *http.R localVarReturnValue *MyUserDetail ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.GetMe") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.GetMe") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -831,12 +830,12 @@ func (a *MeApiService) GetMeExecute(r MeApiGetMeRequest) (*MyUserDetail, *http.R return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiGetMyChannelSubscriptionsRequest struct { +type MeAPIGetMyChannelSubscriptionsRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService } -func (r MeApiGetMyChannelSubscriptionsRequest) Execute() ([]UserSubscribeState, *http.Response, error) { +func (r MeAPIGetMyChannelSubscriptionsRequest) Execute() ([]UserSubscribeState, *http.Response, error) { return r.ApiService.GetMyChannelSubscriptionsExecute(r) } @@ -846,10 +845,10 @@ GetMyChannelSubscriptions 自分のチャンネル購読状態を取得 自身のチャンネル購読状態を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiGetMyChannelSubscriptionsRequest + @return MeAPIGetMyChannelSubscriptionsRequest */ -func (a *MeApiService) GetMyChannelSubscriptions(ctx context.Context) MeApiGetMyChannelSubscriptionsRequest { - return MeApiGetMyChannelSubscriptionsRequest{ +func (a *MeAPIService) GetMyChannelSubscriptions(ctx context.Context) MeAPIGetMyChannelSubscriptionsRequest { + return MeAPIGetMyChannelSubscriptionsRequest{ ApiService: a, ctx: ctx, } @@ -858,7 +857,7 @@ func (a *MeApiService) GetMyChannelSubscriptions(ctx context.Context) MeApiGetMy // Execute executes the request // // @return []UserSubscribeState -func (a *MeApiService) GetMyChannelSubscriptionsExecute(r MeApiGetMyChannelSubscriptionsRequest) ([]UserSubscribeState, *http.Response, error) { +func (a *MeAPIService) GetMyChannelSubscriptionsExecute(r MeAPIGetMyChannelSubscriptionsRequest) ([]UserSubscribeState, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -866,7 +865,7 @@ func (a *MeApiService) GetMyChannelSubscriptionsExecute(r MeApiGetMyChannelSubsc localVarReturnValue []UserSubscribeState ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.GetMyChannelSubscriptions") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.GetMyChannelSubscriptions") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -931,12 +930,12 @@ func (a *MeApiService) GetMyChannelSubscriptionsExecute(r MeApiGetMyChannelSubsc return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiGetMyExternalAccountsRequest struct { +type MeAPIGetMyExternalAccountsRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService } -func (r MeApiGetMyExternalAccountsRequest) Execute() ([]ExternalProviderUser, *http.Response, error) { +func (r MeAPIGetMyExternalAccountsRequest) Execute() ([]ExternalProviderUser, *http.Response, error) { return r.ApiService.GetMyExternalAccountsExecute(r) } @@ -946,10 +945,10 @@ GetMyExternalAccounts 外部ログインアカウント一覧を取得 自分に紐付けられている外部ログインアカウント一覧を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiGetMyExternalAccountsRequest + @return MeAPIGetMyExternalAccountsRequest */ -func (a *MeApiService) GetMyExternalAccounts(ctx context.Context) MeApiGetMyExternalAccountsRequest { - return MeApiGetMyExternalAccountsRequest{ +func (a *MeAPIService) GetMyExternalAccounts(ctx context.Context) MeAPIGetMyExternalAccountsRequest { + return MeAPIGetMyExternalAccountsRequest{ ApiService: a, ctx: ctx, } @@ -958,7 +957,7 @@ func (a *MeApiService) GetMyExternalAccounts(ctx context.Context) MeApiGetMyExte // Execute executes the request // // @return []ExternalProviderUser -func (a *MeApiService) GetMyExternalAccountsExecute(r MeApiGetMyExternalAccountsRequest) ([]ExternalProviderUser, *http.Response, error) { +func (a *MeAPIService) GetMyExternalAccountsExecute(r MeAPIGetMyExternalAccountsRequest) ([]ExternalProviderUser, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -966,7 +965,7 @@ func (a *MeApiService) GetMyExternalAccountsExecute(r MeApiGetMyExternalAccounts localVarReturnValue []ExternalProviderUser ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.GetMyExternalAccounts") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.GetMyExternalAccounts") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1031,12 +1030,12 @@ func (a *MeApiService) GetMyExternalAccountsExecute(r MeApiGetMyExternalAccounts return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiGetMyIconRequest struct { +type MeAPIGetMyIconRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService } -func (r MeApiGetMyIconRequest) Execute() (*os.File, *http.Response, error) { +func (r MeAPIGetMyIconRequest) Execute() (*os.File, *http.Response, error) { return r.ApiService.GetMyIconExecute(r) } @@ -1046,10 +1045,10 @@ GetMyIcon 自分のアイコン画像を取得 自分のアイコン画像を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiGetMyIconRequest + @return MeAPIGetMyIconRequest */ -func (a *MeApiService) GetMyIcon(ctx context.Context) MeApiGetMyIconRequest { - return MeApiGetMyIconRequest{ +func (a *MeAPIService) GetMyIcon(ctx context.Context) MeAPIGetMyIconRequest { + return MeAPIGetMyIconRequest{ ApiService: a, ctx: ctx, } @@ -1058,7 +1057,7 @@ func (a *MeApiService) GetMyIcon(ctx context.Context) MeApiGetMyIconRequest { // Execute executes the request // // @return *os.File -func (a *MeApiService) GetMyIconExecute(r MeApiGetMyIconRequest) (*os.File, *http.Response, error) { +func (a *MeAPIService) GetMyIconExecute(r MeAPIGetMyIconRequest) (*os.File, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1066,7 +1065,7 @@ func (a *MeApiService) GetMyIconExecute(r MeApiGetMyIconRequest) (*os.File, *htt localVarReturnValue *os.File ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.GetMyIcon") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.GetMyIcon") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1131,12 +1130,12 @@ func (a *MeApiService) GetMyIconExecute(r MeApiGetMyIconRequest) (*os.File, *htt return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiGetMyNotifyCitationRequest struct { +type MeAPIGetMyNotifyCitationRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService } -func (r MeApiGetMyNotifyCitationRequest) Execute() (*GetNotifyCitation, *http.Response, error) { +func (r MeAPIGetMyNotifyCitationRequest) Execute() (*GetNotifyCitation, *http.Response, error) { return r.ApiService.GetMyNotifyCitationExecute(r) } @@ -1146,10 +1145,10 @@ GetMyNotifyCitation メッセージ引用通知の設定情報を取得 メッセージ引用通知の設定情報を変更します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiGetMyNotifyCitationRequest + @return MeAPIGetMyNotifyCitationRequest */ -func (a *MeApiService) GetMyNotifyCitation(ctx context.Context) MeApiGetMyNotifyCitationRequest { - return MeApiGetMyNotifyCitationRequest{ +func (a *MeAPIService) GetMyNotifyCitation(ctx context.Context) MeAPIGetMyNotifyCitationRequest { + return MeAPIGetMyNotifyCitationRequest{ ApiService: a, ctx: ctx, } @@ -1158,7 +1157,7 @@ func (a *MeApiService) GetMyNotifyCitation(ctx context.Context) MeApiGetMyNotify // Execute executes the request // // @return GetNotifyCitation -func (a *MeApiService) GetMyNotifyCitationExecute(r MeApiGetMyNotifyCitationRequest) (*GetNotifyCitation, *http.Response, error) { +func (a *MeAPIService) GetMyNotifyCitationExecute(r MeAPIGetMyNotifyCitationRequest) (*GetNotifyCitation, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1166,7 +1165,7 @@ func (a *MeApiService) GetMyNotifyCitationExecute(r MeApiGetMyNotifyCitationRequ localVarReturnValue *GetNotifyCitation ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.GetMyNotifyCitation") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.GetMyNotifyCitation") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1231,19 +1230,19 @@ func (a *MeApiService) GetMyNotifyCitationExecute(r MeApiGetMyNotifyCitationRequ return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiGetMyQRCodeRequest struct { +type MeAPIGetMyQRCodeRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService token *bool } // 画像でなくトークン文字列で返すかどうか -func (r MeApiGetMyQRCodeRequest) Token(token bool) MeApiGetMyQRCodeRequest { +func (r MeAPIGetMyQRCodeRequest) Token(token bool) MeAPIGetMyQRCodeRequest { r.token = &token return r } -func (r MeApiGetMyQRCodeRequest) Execute() (*os.File, *http.Response, error) { +func (r MeAPIGetMyQRCodeRequest) Execute() (*os.File, *http.Response, error) { return r.ApiService.GetMyQRCodeExecute(r) } @@ -1254,10 +1253,10 @@ GetMyQRCode QRコードを取得 返されたQRコードまたはトークンは、発行後の5分間のみ有効です @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiGetMyQRCodeRequest + @return MeAPIGetMyQRCodeRequest */ -func (a *MeApiService) GetMyQRCode(ctx context.Context) MeApiGetMyQRCodeRequest { - return MeApiGetMyQRCodeRequest{ +func (a *MeAPIService) GetMyQRCode(ctx context.Context) MeAPIGetMyQRCodeRequest { + return MeAPIGetMyQRCodeRequest{ ApiService: a, ctx: ctx, } @@ -1266,7 +1265,7 @@ func (a *MeApiService) GetMyQRCode(ctx context.Context) MeApiGetMyQRCodeRequest // Execute executes the request // // @return *os.File -func (a *MeApiService) GetMyQRCodeExecute(r MeApiGetMyQRCodeRequest) (*os.File, *http.Response, error) { +func (a *MeAPIService) GetMyQRCodeExecute(r MeAPIGetMyQRCodeRequest) (*os.File, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1274,7 +1273,7 @@ func (a *MeApiService) GetMyQRCodeExecute(r MeApiGetMyQRCodeRequest) (*os.File, localVarReturnValue *os.File ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.GetMyQRCode") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.GetMyQRCode") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1286,7 +1285,10 @@ func (a *MeApiService) GetMyQRCodeExecute(r MeApiGetMyQRCodeRequest) (*os.File, localVarFormParams := url.Values{} if r.token != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "token", r.token, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "token", r.token, "form", "") + } else { + var defaultValue bool = false + r.token = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1342,12 +1344,12 @@ func (a *MeApiService) GetMyQRCodeExecute(r MeApiGetMyQRCodeRequest) (*os.File, return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiGetMySessionsRequest struct { +type MeAPIGetMySessionsRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService } -func (r MeApiGetMySessionsRequest) Execute() ([]LoginSession, *http.Response, error) { +func (r MeAPIGetMySessionsRequest) Execute() ([]LoginSession, *http.Response, error) { return r.ApiService.GetMySessionsExecute(r) } @@ -1357,10 +1359,10 @@ GetMySessions 自分のログインセッションリストを取得 自分のログインセッションのリストを取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiGetMySessionsRequest + @return MeAPIGetMySessionsRequest */ -func (a *MeApiService) GetMySessions(ctx context.Context) MeApiGetMySessionsRequest { - return MeApiGetMySessionsRequest{ +func (a *MeAPIService) GetMySessions(ctx context.Context) MeAPIGetMySessionsRequest { + return MeAPIGetMySessionsRequest{ ApiService: a, ctx: ctx, } @@ -1369,7 +1371,7 @@ func (a *MeApiService) GetMySessions(ctx context.Context) MeApiGetMySessionsRequ // Execute executes the request // // @return []LoginSession -func (a *MeApiService) GetMySessionsExecute(r MeApiGetMySessionsRequest) ([]LoginSession, *http.Response, error) { +func (a *MeAPIService) GetMySessionsExecute(r MeAPIGetMySessionsRequest) ([]LoginSession, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1377,7 +1379,7 @@ func (a *MeApiService) GetMySessionsExecute(r MeApiGetMySessionsRequest) ([]Logi localVarReturnValue []LoginSession ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.GetMySessions") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.GetMySessions") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1442,19 +1444,19 @@ func (a *MeApiService) GetMySessionsExecute(r MeApiGetMySessionsRequest) ([]Logi return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiGetMyStampHistoryRequest struct { +type MeAPIGetMyStampHistoryRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService limit *int32 } // 件数 -func (r MeApiGetMyStampHistoryRequest) Limit(limit int32) MeApiGetMyStampHistoryRequest { +func (r MeAPIGetMyStampHistoryRequest) Limit(limit int32) MeAPIGetMyStampHistoryRequest { r.limit = &limit return r } -func (r MeApiGetMyStampHistoryRequest) Execute() ([]StampHistoryEntry, *http.Response, error) { +func (r MeAPIGetMyStampHistoryRequest) Execute() ([]StampHistoryEntry, *http.Response, error) { return r.ApiService.GetMyStampHistoryExecute(r) } @@ -1467,10 +1469,10 @@ GetMyStampHistory スタンプ履歴を取得 このAPIが返すスタンプ履歴は厳密な履歴ではありません。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiGetMyStampHistoryRequest + @return MeAPIGetMyStampHistoryRequest */ -func (a *MeApiService) GetMyStampHistory(ctx context.Context) MeApiGetMyStampHistoryRequest { - return MeApiGetMyStampHistoryRequest{ +func (a *MeAPIService) GetMyStampHistory(ctx context.Context) MeAPIGetMyStampHistoryRequest { + return MeAPIGetMyStampHistoryRequest{ ApiService: a, ctx: ctx, } @@ -1479,7 +1481,7 @@ func (a *MeApiService) GetMyStampHistory(ctx context.Context) MeApiGetMyStampHis // Execute executes the request // // @return []StampHistoryEntry -func (a *MeApiService) GetMyStampHistoryExecute(r MeApiGetMyStampHistoryRequest) ([]StampHistoryEntry, *http.Response, error) { +func (a *MeAPIService) GetMyStampHistoryExecute(r MeAPIGetMyStampHistoryRequest) ([]StampHistoryEntry, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1487,7 +1489,7 @@ func (a *MeApiService) GetMyStampHistoryExecute(r MeApiGetMyStampHistoryRequest) localVarReturnValue []StampHistoryEntry ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.GetMyStampHistory") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.GetMyStampHistory") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1499,7 +1501,10 @@ func (a *MeApiService) GetMyStampHistoryExecute(r MeApiGetMyStampHistoryRequest) localVarFormParams := url.Values{} if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } else { + var defaultValue int32 = 100 + r.limit = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1555,12 +1560,12 @@ func (a *MeApiService) GetMyStampHistoryExecute(r MeApiGetMyStampHistoryRequest) return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiGetMyStarsRequest struct { +type MeAPIGetMyStarsRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService } -func (r MeApiGetMyStarsRequest) Execute() ([]string, *http.Response, error) { +func (r MeAPIGetMyStarsRequest) Execute() ([]string, *http.Response, error) { return r.ApiService.GetMyStarsExecute(r) } @@ -1570,10 +1575,10 @@ GetMyStars スターチャンネルリストを取得 自分がスターしているチャンネルのUUIDの配列を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiGetMyStarsRequest + @return MeAPIGetMyStarsRequest */ -func (a *MeApiService) GetMyStars(ctx context.Context) MeApiGetMyStarsRequest { - return MeApiGetMyStarsRequest{ +func (a *MeAPIService) GetMyStars(ctx context.Context) MeAPIGetMyStarsRequest { + return MeAPIGetMyStarsRequest{ ApiService: a, ctx: ctx, } @@ -1582,7 +1587,7 @@ func (a *MeApiService) GetMyStars(ctx context.Context) MeApiGetMyStarsRequest { // Execute executes the request // // @return []string -func (a *MeApiService) GetMyStarsExecute(r MeApiGetMyStarsRequest) ([]string, *http.Response, error) { +func (a *MeAPIService) GetMyStarsExecute(r MeAPIGetMyStarsRequest) ([]string, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1590,7 +1595,7 @@ func (a *MeApiService) GetMyStarsExecute(r MeApiGetMyStarsRequest) ([]string, *h localVarReturnValue []string ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.GetMyStars") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.GetMyStars") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1655,12 +1660,12 @@ func (a *MeApiService) GetMyStarsExecute(r MeApiGetMyStarsRequest) ([]string, *h return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiGetMyTokensRequest struct { +type MeAPIGetMyTokensRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService } -func (r MeApiGetMyTokensRequest) Execute() ([]ActiveOAuth2Token, *http.Response, error) { +func (r MeAPIGetMyTokensRequest) Execute() ([]ActiveOAuth2Token, *http.Response, error) { return r.ApiService.GetMyTokensExecute(r) } @@ -1670,10 +1675,10 @@ GetMyTokens 有効トークンのリストを取得 有効な自分に発行されたOAuth2トークンのリストを取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiGetMyTokensRequest + @return MeAPIGetMyTokensRequest */ -func (a *MeApiService) GetMyTokens(ctx context.Context) MeApiGetMyTokensRequest { - return MeApiGetMyTokensRequest{ +func (a *MeAPIService) GetMyTokens(ctx context.Context) MeAPIGetMyTokensRequest { + return MeAPIGetMyTokensRequest{ ApiService: a, ctx: ctx, } @@ -1682,7 +1687,7 @@ func (a *MeApiService) GetMyTokens(ctx context.Context) MeApiGetMyTokensRequest // Execute executes the request // // @return []ActiveOAuth2Token -func (a *MeApiService) GetMyTokensExecute(r MeApiGetMyTokensRequest) ([]ActiveOAuth2Token, *http.Response, error) { +func (a *MeAPIService) GetMyTokensExecute(r MeAPIGetMyTokensRequest) ([]ActiveOAuth2Token, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1690,7 +1695,7 @@ func (a *MeApiService) GetMyTokensExecute(r MeApiGetMyTokensRequest) ([]ActiveOA localVarReturnValue []ActiveOAuth2Token ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.GetMyTokens") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.GetMyTokens") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1755,12 +1760,12 @@ func (a *MeApiService) GetMyTokensExecute(r MeApiGetMyTokensRequest) ([]ActiveOA return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiGetMyUnreadChannelsRequest struct { +type MeAPIGetMyUnreadChannelsRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService } -func (r MeApiGetMyUnreadChannelsRequest) Execute() ([]UnreadChannel, *http.Response, error) { +func (r MeAPIGetMyUnreadChannelsRequest) Execute() ([]UnreadChannel, *http.Response, error) { return r.ApiService.GetMyUnreadChannelsExecute(r) } @@ -1770,10 +1775,10 @@ GetMyUnreadChannels 未読チャンネルを取得 自分が現在未読のチャンネルの未読情報を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiGetMyUnreadChannelsRequest + @return MeAPIGetMyUnreadChannelsRequest */ -func (a *MeApiService) GetMyUnreadChannels(ctx context.Context) MeApiGetMyUnreadChannelsRequest { - return MeApiGetMyUnreadChannelsRequest{ +func (a *MeAPIService) GetMyUnreadChannels(ctx context.Context) MeAPIGetMyUnreadChannelsRequest { + return MeAPIGetMyUnreadChannelsRequest{ ApiService: a, ctx: ctx, } @@ -1782,7 +1787,7 @@ func (a *MeApiService) GetMyUnreadChannels(ctx context.Context) MeApiGetMyUnread // Execute executes the request // // @return []UnreadChannel -func (a *MeApiService) GetMyUnreadChannelsExecute(r MeApiGetMyUnreadChannelsRequest) ([]UnreadChannel, *http.Response, error) { +func (a *MeAPIService) GetMyUnreadChannelsExecute(r MeAPIGetMyUnreadChannelsRequest) ([]UnreadChannel, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1790,7 +1795,7 @@ func (a *MeApiService) GetMyUnreadChannelsExecute(r MeApiGetMyUnreadChannelsRequ localVarReturnValue []UnreadChannel ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.GetMyUnreadChannels") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.GetMyUnreadChannels") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1855,12 +1860,12 @@ func (a *MeApiService) GetMyUnreadChannelsExecute(r MeApiGetMyUnreadChannelsRequ return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiGetMyUserTagsRequest struct { +type MeAPIGetMyUserTagsRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService } -func (r MeApiGetMyUserTagsRequest) Execute() ([]UserTag, *http.Response, error) { +func (r MeAPIGetMyUserTagsRequest) Execute() ([]UserTag, *http.Response, error) { return r.ApiService.GetMyUserTagsExecute(r) } @@ -1870,10 +1875,10 @@ GetMyUserTags 自分のタグリストを取得 自分に付けられているタグの配列を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiGetMyUserTagsRequest + @return MeAPIGetMyUserTagsRequest */ -func (a *MeApiService) GetMyUserTags(ctx context.Context) MeApiGetMyUserTagsRequest { - return MeApiGetMyUserTagsRequest{ +func (a *MeAPIService) GetMyUserTags(ctx context.Context) MeAPIGetMyUserTagsRequest { + return MeAPIGetMyUserTagsRequest{ ApiService: a, ctx: ctx, } @@ -1882,7 +1887,7 @@ func (a *MeApiService) GetMyUserTags(ctx context.Context) MeApiGetMyUserTagsRequ // Execute executes the request // // @return []UserTag -func (a *MeApiService) GetMyUserTagsExecute(r MeApiGetMyUserTagsRequest) ([]UserTag, *http.Response, error) { +func (a *MeAPIService) GetMyUserTagsExecute(r MeAPIGetMyUserTagsRequest) ([]UserTag, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1890,7 +1895,7 @@ func (a *MeApiService) GetMyUserTagsExecute(r MeApiGetMyUserTagsRequest) ([]User localVarReturnValue []UserTag ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.GetMyUserTags") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.GetMyUserTags") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1955,12 +1960,12 @@ func (a *MeApiService) GetMyUserTagsExecute(r MeApiGetMyUserTagsRequest) ([]User return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiGetMyViewStatesRequest struct { +type MeAPIGetMyViewStatesRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService } -func (r MeApiGetMyViewStatesRequest) Execute() ([]MyChannelViewState, *http.Response, error) { +func (r MeAPIGetMyViewStatesRequest) Execute() ([]MyChannelViewState, *http.Response, error) { return r.ApiService.GetMyViewStatesExecute(r) } @@ -1970,10 +1975,10 @@ GetMyViewStates 自身のチャンネル閲覧状態一覧を取得 自身のチャンネル閲覧状態一覧を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiGetMyViewStatesRequest + @return MeAPIGetMyViewStatesRequest */ -func (a *MeApiService) GetMyViewStates(ctx context.Context) MeApiGetMyViewStatesRequest { - return MeApiGetMyViewStatesRequest{ +func (a *MeAPIService) GetMyViewStates(ctx context.Context) MeAPIGetMyViewStatesRequest { + return MeAPIGetMyViewStatesRequest{ ApiService: a, ctx: ctx, } @@ -1982,7 +1987,7 @@ func (a *MeApiService) GetMyViewStates(ctx context.Context) MeApiGetMyViewStates // Execute executes the request // // @return []MyChannelViewState -func (a *MeApiService) GetMyViewStatesExecute(r MeApiGetMyViewStatesRequest) ([]MyChannelViewState, *http.Response, error) { +func (a *MeAPIService) GetMyViewStatesExecute(r MeAPIGetMyViewStatesRequest) ([]MyChannelViewState, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1990,7 +1995,7 @@ func (a *MeApiService) GetMyViewStatesExecute(r MeApiGetMyViewStatesRequest) ([] localVarReturnValue []MyChannelViewState ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.GetMyViewStates") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.GetMyViewStates") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -2055,12 +2060,12 @@ func (a *MeApiService) GetMyViewStatesExecute(r MeApiGetMyViewStatesRequest) ([] return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiGetOIDCUserInfoRequest struct { +type MeAPIGetOIDCUserInfoRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService } -func (r MeApiGetOIDCUserInfoRequest) Execute() (*OIDCUserInfo, *http.Response, error) { +func (r MeAPIGetOIDCUserInfoRequest) Execute() (*OIDCUserInfo, *http.Response, error) { return r.ApiService.GetOIDCUserInfoExecute(r) } @@ -2071,10 +2076,10 @@ OIDCトークンを用いてユーザー詳細を取得します。 OIDC UserInfo Endpointです。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiGetOIDCUserInfoRequest + @return MeAPIGetOIDCUserInfoRequest */ -func (a *MeApiService) GetOIDCUserInfo(ctx context.Context) MeApiGetOIDCUserInfoRequest { - return MeApiGetOIDCUserInfoRequest{ +func (a *MeAPIService) GetOIDCUserInfo(ctx context.Context) MeAPIGetOIDCUserInfoRequest { + return MeAPIGetOIDCUserInfoRequest{ ApiService: a, ctx: ctx, } @@ -2083,7 +2088,7 @@ func (a *MeApiService) GetOIDCUserInfo(ctx context.Context) MeApiGetOIDCUserInfo // Execute executes the request // // @return OIDCUserInfo -func (a *MeApiService) GetOIDCUserInfoExecute(r MeApiGetOIDCUserInfoRequest) (*OIDCUserInfo, *http.Response, error) { +func (a *MeAPIService) GetOIDCUserInfoExecute(r MeAPIGetOIDCUserInfoRequest) (*OIDCUserInfo, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -2091,7 +2096,7 @@ func (a *MeApiService) GetOIDCUserInfoExecute(r MeApiGetOIDCUserInfoRequest) (*O localVarReturnValue *OIDCUserInfo ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.GetOIDCUserInfo") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.GetOIDCUserInfo") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -2156,12 +2161,12 @@ func (a *MeApiService) GetOIDCUserInfoExecute(r MeApiGetOIDCUserInfoRequest) (*O return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiGetUserSettingsRequest struct { +type MeAPIGetUserSettingsRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService } -func (r MeApiGetUserSettingsRequest) Execute() (*UserSettings, *http.Response, error) { +func (r MeAPIGetUserSettingsRequest) Execute() (*UserSettings, *http.Response, error) { return r.ApiService.GetUserSettingsExecute(r) } @@ -2171,10 +2176,10 @@ GetUserSettings ユーザー設定を取得 ユーザー設定を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiGetUserSettingsRequest + @return MeAPIGetUserSettingsRequest */ -func (a *MeApiService) GetUserSettings(ctx context.Context) MeApiGetUserSettingsRequest { - return MeApiGetUserSettingsRequest{ +func (a *MeAPIService) GetUserSettings(ctx context.Context) MeAPIGetUserSettingsRequest { + return MeAPIGetUserSettingsRequest{ ApiService: a, ctx: ctx, } @@ -2183,7 +2188,7 @@ func (a *MeApiService) GetUserSettings(ctx context.Context) MeApiGetUserSettings // Execute executes the request // // @return UserSettings -func (a *MeApiService) GetUserSettingsExecute(r MeApiGetUserSettingsRequest) (*UserSettings, *http.Response, error) { +func (a *MeAPIService) GetUserSettingsExecute(r MeAPIGetUserSettingsRequest) (*UserSettings, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -2191,7 +2196,7 @@ func (a *MeApiService) GetUserSettingsExecute(r MeApiGetUserSettingsRequest) (*U localVarReturnValue *UserSettings ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.GetUserSettings") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.GetUserSettings") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -2256,18 +2261,18 @@ func (a *MeApiService) GetUserSettingsExecute(r MeApiGetUserSettingsRequest) (*U return localVarReturnValue, localVarHTTPResponse, nil } -type MeApiLinkExternalAccountRequest struct { +type MeAPILinkExternalAccountRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService postLinkExternalAccount *PostLinkExternalAccount } -func (r MeApiLinkExternalAccountRequest) PostLinkExternalAccount(postLinkExternalAccount PostLinkExternalAccount) MeApiLinkExternalAccountRequest { +func (r MeAPILinkExternalAccountRequest) PostLinkExternalAccount(postLinkExternalAccount PostLinkExternalAccount) MeAPILinkExternalAccountRequest { r.postLinkExternalAccount = &postLinkExternalAccount return r } -func (r MeApiLinkExternalAccountRequest) Execute() (*http.Response, error) { +func (r MeAPILinkExternalAccountRequest) Execute() (*http.Response, error) { return r.ApiService.LinkExternalAccountExecute(r) } @@ -2279,24 +2284,24 @@ LinkExternalAccount 外部ログインアカウントを紐付ける リクエストが受理された場合、外部サービスの認証画面にリダイレクトされ、認証される必要があります。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiLinkExternalAccountRequest + @return MeAPILinkExternalAccountRequest */ -func (a *MeApiService) LinkExternalAccount(ctx context.Context) MeApiLinkExternalAccountRequest { - return MeApiLinkExternalAccountRequest{ +func (a *MeAPIService) LinkExternalAccount(ctx context.Context) MeAPILinkExternalAccountRequest { + return MeAPILinkExternalAccountRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *MeApiService) LinkExternalAccountExecute(r MeApiLinkExternalAccountRequest) (*http.Response, error) { +func (a *MeAPIService) LinkExternalAccountExecute(r MeAPILinkExternalAccountRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.LinkExternalAccount") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.LinkExternalAccount") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -2354,13 +2359,13 @@ func (a *MeApiService) LinkExternalAccountExecute(r MeApiLinkExternalAccountRequ return localVarHTTPResponse, nil } -type MeApiReadChannelRequest struct { +type MeAPIReadChannelRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService channelId string } -func (r MeApiReadChannelRequest) Execute() (*http.Response, error) { +func (r MeAPIReadChannelRequest) Execute() (*http.Response, error) { return r.ApiService.ReadChannelExecute(r) } @@ -2371,10 +2376,10 @@ ReadChannel チャンネルを既読にする @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return MeApiReadChannelRequest + @return MeAPIReadChannelRequest */ -func (a *MeApiService) ReadChannel(ctx context.Context, channelId string) MeApiReadChannelRequest { - return MeApiReadChannelRequest{ +func (a *MeAPIService) ReadChannel(ctx context.Context, channelId string) MeAPIReadChannelRequest { + return MeAPIReadChannelRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -2382,14 +2387,14 @@ func (a *MeApiService) ReadChannel(ctx context.Context, channelId string) MeApiR } // Execute executes the request -func (a *MeApiService) ReadChannelExecute(r MeApiReadChannelRequest) (*http.Response, error) { +func (a *MeAPIService) ReadChannelExecute(r MeAPIReadChannelRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.ReadChannel") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.ReadChannel") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -2446,18 +2451,18 @@ func (a *MeApiService) ReadChannelExecute(r MeApiReadChannelRequest) (*http.Resp return localVarHTTPResponse, nil } -type MeApiRegisterFCMDeviceRequest struct { +type MeAPIRegisterFCMDeviceRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService postMyFCMDeviceRequest *PostMyFCMDeviceRequest } -func (r MeApiRegisterFCMDeviceRequest) PostMyFCMDeviceRequest(postMyFCMDeviceRequest PostMyFCMDeviceRequest) MeApiRegisterFCMDeviceRequest { +func (r MeAPIRegisterFCMDeviceRequest) PostMyFCMDeviceRequest(postMyFCMDeviceRequest PostMyFCMDeviceRequest) MeAPIRegisterFCMDeviceRequest { r.postMyFCMDeviceRequest = &postMyFCMDeviceRequest return r } -func (r MeApiRegisterFCMDeviceRequest) Execute() (*http.Response, error) { +func (r MeAPIRegisterFCMDeviceRequest) Execute() (*http.Response, error) { return r.ApiService.RegisterFCMDeviceExecute(r) } @@ -2467,24 +2472,24 @@ RegisterFCMDevice FCMデバイスを登録 自身のFCMデバイスを登録します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiRegisterFCMDeviceRequest + @return MeAPIRegisterFCMDeviceRequest */ -func (a *MeApiService) RegisterFCMDevice(ctx context.Context) MeApiRegisterFCMDeviceRequest { - return MeApiRegisterFCMDeviceRequest{ +func (a *MeAPIService) RegisterFCMDevice(ctx context.Context) MeAPIRegisterFCMDeviceRequest { + return MeAPIRegisterFCMDeviceRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *MeApiService) RegisterFCMDeviceExecute(r MeApiRegisterFCMDeviceRequest) (*http.Response, error) { +func (a *MeAPIService) RegisterFCMDeviceExecute(r MeAPIRegisterFCMDeviceRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.RegisterFCMDevice") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.RegisterFCMDevice") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -2542,13 +2547,13 @@ func (a *MeApiService) RegisterFCMDeviceExecute(r MeApiRegisterFCMDeviceRequest) return localVarHTTPResponse, nil } -type MeApiRemoveMyStarRequest struct { +type MeAPIRemoveMyStarRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService channelId string } -func (r MeApiRemoveMyStarRequest) Execute() (*http.Response, error) { +func (r MeAPIRemoveMyStarRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveMyStarExecute(r) } @@ -2559,10 +2564,10 @@ RemoveMyStar チャンネルをスターから削除します @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return MeApiRemoveMyStarRequest + @return MeAPIRemoveMyStarRequest */ -func (a *MeApiService) RemoveMyStar(ctx context.Context, channelId string) MeApiRemoveMyStarRequest { - return MeApiRemoveMyStarRequest{ +func (a *MeAPIService) RemoveMyStar(ctx context.Context, channelId string) MeAPIRemoveMyStarRequest { + return MeAPIRemoveMyStarRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -2570,14 +2575,14 @@ func (a *MeApiService) RemoveMyStar(ctx context.Context, channelId string) MeApi } // Execute executes the request -func (a *MeApiService) RemoveMyStarExecute(r MeApiRemoveMyStarRequest) (*http.Response, error) { +func (a *MeAPIService) RemoveMyStarExecute(r MeAPIRemoveMyStarRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.RemoveMyStar") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.RemoveMyStar") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -2634,13 +2639,13 @@ func (a *MeApiService) RemoveMyStarExecute(r MeApiRemoveMyStarRequest) (*http.Re return localVarHTTPResponse, nil } -type MeApiRemoveMyUserTagRequest struct { +type MeAPIRemoveMyUserTagRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService tagId string } -func (r MeApiRemoveMyUserTagRequest) Execute() (*http.Response, error) { +func (r MeAPIRemoveMyUserTagRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveMyUserTagExecute(r) } @@ -2651,10 +2656,10 @@ RemoveMyUserTag 自分からタグを削除します @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param tagId タグUUID - @return MeApiRemoveMyUserTagRequest + @return MeAPIRemoveMyUserTagRequest */ -func (a *MeApiService) RemoveMyUserTag(ctx context.Context, tagId string) MeApiRemoveMyUserTagRequest { - return MeApiRemoveMyUserTagRequest{ +func (a *MeAPIService) RemoveMyUserTag(ctx context.Context, tagId string) MeAPIRemoveMyUserTagRequest { + return MeAPIRemoveMyUserTagRequest{ ApiService: a, ctx: ctx, tagId: tagId, @@ -2662,14 +2667,14 @@ func (a *MeApiService) RemoveMyUserTag(ctx context.Context, tagId string) MeApiR } // Execute executes the request -func (a *MeApiService) RemoveMyUserTagExecute(r MeApiRemoveMyUserTagRequest) (*http.Response, error) { +func (a *MeAPIService) RemoveMyUserTagExecute(r MeAPIRemoveMyUserTagRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.RemoveMyUserTag") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.RemoveMyUserTag") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -2726,13 +2731,13 @@ func (a *MeApiService) RemoveMyUserTagExecute(r MeApiRemoveMyUserTagRequest) (*h return localVarHTTPResponse, nil } -type MeApiRevokeMySessionRequest struct { +type MeAPIRevokeMySessionRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService sessionId string } -func (r MeApiRevokeMySessionRequest) Execute() (*http.Response, error) { +func (r MeAPIRevokeMySessionRequest) Execute() (*http.Response, error) { return r.ApiService.RevokeMySessionExecute(r) } @@ -2744,10 +2749,10 @@ RevokeMySession セッションを無効化 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param sessionId セッションUUID - @return MeApiRevokeMySessionRequest + @return MeAPIRevokeMySessionRequest */ -func (a *MeApiService) RevokeMySession(ctx context.Context, sessionId string) MeApiRevokeMySessionRequest { - return MeApiRevokeMySessionRequest{ +func (a *MeAPIService) RevokeMySession(ctx context.Context, sessionId string) MeAPIRevokeMySessionRequest { + return MeAPIRevokeMySessionRequest{ ApiService: a, ctx: ctx, sessionId: sessionId, @@ -2755,14 +2760,14 @@ func (a *MeApiService) RevokeMySession(ctx context.Context, sessionId string) Me } // Execute executes the request -func (a *MeApiService) RevokeMySessionExecute(r MeApiRevokeMySessionRequest) (*http.Response, error) { +func (a *MeAPIService) RevokeMySessionExecute(r MeAPIRevokeMySessionRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.RevokeMySession") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.RevokeMySession") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -2819,13 +2824,13 @@ func (a *MeApiService) RevokeMySessionExecute(r MeApiRevokeMySessionRequest) (*h return localVarHTTPResponse, nil } -type MeApiRevokeMyTokenRequest struct { +type MeAPIRevokeMyTokenRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService tokenId string } -func (r MeApiRevokeMyTokenRequest) Execute() (*http.Response, error) { +func (r MeAPIRevokeMyTokenRequest) Execute() (*http.Response, error) { return r.ApiService.RevokeMyTokenExecute(r) } @@ -2836,10 +2841,10 @@ RevokeMyToken トークンの認可を取り消す @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param tokenId OAuth2トークンUUID - @return MeApiRevokeMyTokenRequest + @return MeAPIRevokeMyTokenRequest */ -func (a *MeApiService) RevokeMyToken(ctx context.Context, tokenId string) MeApiRevokeMyTokenRequest { - return MeApiRevokeMyTokenRequest{ +func (a *MeAPIService) RevokeMyToken(ctx context.Context, tokenId string) MeAPIRevokeMyTokenRequest { + return MeAPIRevokeMyTokenRequest{ ApiService: a, ctx: ctx, tokenId: tokenId, @@ -2847,14 +2852,14 @@ func (a *MeApiService) RevokeMyToken(ctx context.Context, tokenId string) MeApiR } // Execute executes the request -func (a *MeApiService) RevokeMyTokenExecute(r MeApiRevokeMyTokenRequest) (*http.Response, error) { +func (a *MeAPIService) RevokeMyTokenExecute(r MeAPIRevokeMyTokenRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.RevokeMyToken") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.RevokeMyToken") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -2911,19 +2916,19 @@ func (a *MeApiService) RevokeMyTokenExecute(r MeApiRevokeMyTokenRequest) (*http. return localVarHTTPResponse, nil } -type MeApiSetChannelSubscribeLevelRequest struct { +type MeAPISetChannelSubscribeLevelRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService channelId string putChannelSubscribeLevelRequest *PutChannelSubscribeLevelRequest } -func (r MeApiSetChannelSubscribeLevelRequest) PutChannelSubscribeLevelRequest(putChannelSubscribeLevelRequest PutChannelSubscribeLevelRequest) MeApiSetChannelSubscribeLevelRequest { +func (r MeAPISetChannelSubscribeLevelRequest) PutChannelSubscribeLevelRequest(putChannelSubscribeLevelRequest PutChannelSubscribeLevelRequest) MeAPISetChannelSubscribeLevelRequest { r.putChannelSubscribeLevelRequest = &putChannelSubscribeLevelRequest return r } -func (r MeApiSetChannelSubscribeLevelRequest) Execute() (*http.Response, error) { +func (r MeAPISetChannelSubscribeLevelRequest) Execute() (*http.Response, error) { return r.ApiService.SetChannelSubscribeLevelExecute(r) } @@ -2934,10 +2939,10 @@ SetChannelSubscribeLevel チャンネル購読レベルを設定 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return MeApiSetChannelSubscribeLevelRequest + @return MeAPISetChannelSubscribeLevelRequest */ -func (a *MeApiService) SetChannelSubscribeLevel(ctx context.Context, channelId string) MeApiSetChannelSubscribeLevelRequest { - return MeApiSetChannelSubscribeLevelRequest{ +func (a *MeAPIService) SetChannelSubscribeLevel(ctx context.Context, channelId string) MeAPISetChannelSubscribeLevelRequest { + return MeAPISetChannelSubscribeLevelRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -2945,14 +2950,14 @@ func (a *MeApiService) SetChannelSubscribeLevel(ctx context.Context, channelId s } // Execute executes the request -func (a *MeApiService) SetChannelSubscribeLevelExecute(r MeApiSetChannelSubscribeLevelRequest) (*http.Response, error) { +func (a *MeAPIService) SetChannelSubscribeLevelExecute(r MeAPISetChannelSubscribeLevelRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.SetChannelSubscribeLevel") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.SetChannelSubscribeLevel") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -3011,18 +3016,18 @@ func (a *MeApiService) SetChannelSubscribeLevelExecute(r MeApiSetChannelSubscrib return localVarHTTPResponse, nil } -type MeApiUnlinkExternalAccountRequest struct { +type MeAPIUnlinkExternalAccountRequest struct { ctx context.Context - ApiService *MeApiService + ApiService *MeAPIService postUnlinkExternalAccount *PostUnlinkExternalAccount } -func (r MeApiUnlinkExternalAccountRequest) PostUnlinkExternalAccount(postUnlinkExternalAccount PostUnlinkExternalAccount) MeApiUnlinkExternalAccountRequest { +func (r MeAPIUnlinkExternalAccountRequest) PostUnlinkExternalAccount(postUnlinkExternalAccount PostUnlinkExternalAccount) MeAPIUnlinkExternalAccountRequest { r.postUnlinkExternalAccount = &postUnlinkExternalAccount return r } -func (r MeApiUnlinkExternalAccountRequest) Execute() (*http.Response, error) { +func (r MeAPIUnlinkExternalAccountRequest) Execute() (*http.Response, error) { return r.ApiService.UnlinkExternalAccountExecute(r) } @@ -3032,24 +3037,24 @@ UnlinkExternalAccount 外部ログインアカウントの紐付けを解除 自分に紐付けられている外部ログインアカウントの紐付けを解除します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MeApiUnlinkExternalAccountRequest + @return MeAPIUnlinkExternalAccountRequest */ -func (a *MeApiService) UnlinkExternalAccount(ctx context.Context) MeApiUnlinkExternalAccountRequest { - return MeApiUnlinkExternalAccountRequest{ +func (a *MeAPIService) UnlinkExternalAccount(ctx context.Context) MeAPIUnlinkExternalAccountRequest { + return MeAPIUnlinkExternalAccountRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *MeApiService) UnlinkExternalAccountExecute(r MeApiUnlinkExternalAccountRequest) (*http.Response, error) { +func (a *MeAPIService) UnlinkExternalAccountExecute(r MeAPIUnlinkExternalAccountRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeApiService.UnlinkExternalAccount") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MeAPIService.UnlinkExternalAccount") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_message.go b/api_message.go index 44a36ca..6b8dfbf 100644 --- a/api_message.go +++ b/api_message.go @@ -21,23 +21,23 @@ import ( "time" ) -// MessageApiService MessageApi service -type MessageApiService service +// MessageAPIService MessageAPI service +type MessageAPIService service -type MessageApiAddMessageStampRequest struct { +type MessageAPIAddMessageStampRequest struct { ctx context.Context - ApiService *MessageApiService + ApiService *MessageAPIService messageId string stampId string postMessageStampRequest *PostMessageStampRequest } -func (r MessageApiAddMessageStampRequest) PostMessageStampRequest(postMessageStampRequest PostMessageStampRequest) MessageApiAddMessageStampRequest { +func (r MessageAPIAddMessageStampRequest) PostMessageStampRequest(postMessageStampRequest PostMessageStampRequest) MessageAPIAddMessageStampRequest { r.postMessageStampRequest = &postMessageStampRequest return r } -func (r MessageApiAddMessageStampRequest) Execute() (*http.Response, error) { +func (r MessageAPIAddMessageStampRequest) Execute() (*http.Response, error) { return r.ApiService.AddMessageStampExecute(r) } @@ -49,10 +49,10 @@ AddMessageStamp スタンプを押す @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID @param stampId スタンプUUID - @return MessageApiAddMessageStampRequest + @return MessageAPIAddMessageStampRequest */ -func (a *MessageApiService) AddMessageStamp(ctx context.Context, messageId string, stampId string) MessageApiAddMessageStampRequest { - return MessageApiAddMessageStampRequest{ +func (a *MessageAPIService) AddMessageStamp(ctx context.Context, messageId string, stampId string) MessageAPIAddMessageStampRequest { + return MessageAPIAddMessageStampRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -61,14 +61,14 @@ func (a *MessageApiService) AddMessageStamp(ctx context.Context, messageId strin } // Execute executes the request -func (a *MessageApiService) AddMessageStampExecute(r MessageApiAddMessageStampRequest) (*http.Response, error) { +func (a *MessageAPIService) AddMessageStampExecute(r MessageAPIAddMessageStampRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageApiService.AddMessageStamp") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAPIService.AddMessageStamp") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -128,13 +128,13 @@ func (a *MessageApiService) AddMessageStampExecute(r MessageApiAddMessageStampRe return localVarHTTPResponse, nil } -type MessageApiCreatePinRequest struct { +type MessageAPICreatePinRequest struct { ctx context.Context - ApiService *MessageApiService + ApiService *MessageAPIService messageId string } -func (r MessageApiCreatePinRequest) Execute() (*MessagePin, *http.Response, error) { +func (r MessageAPICreatePinRequest) Execute() (*MessagePin, *http.Response, error) { return r.ApiService.CreatePinExecute(r) } @@ -146,10 +146,10 @@ CreatePin ピン留めする @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID - @return MessageApiCreatePinRequest + @return MessageAPICreatePinRequest */ -func (a *MessageApiService) CreatePin(ctx context.Context, messageId string) MessageApiCreatePinRequest { - return MessageApiCreatePinRequest{ +func (a *MessageAPIService) CreatePin(ctx context.Context, messageId string) MessageAPICreatePinRequest { + return MessageAPICreatePinRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -159,7 +159,7 @@ func (a *MessageApiService) CreatePin(ctx context.Context, messageId string) Mes // Execute executes the request // // @return MessagePin -func (a *MessageApiService) CreatePinExecute(r MessageApiCreatePinRequest) (*MessagePin, *http.Response, error) { +func (a *MessageAPIService) CreatePinExecute(r MessageAPICreatePinRequest) (*MessagePin, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -167,7 +167,7 @@ func (a *MessageApiService) CreatePinExecute(r MessageApiCreatePinRequest) (*Mes localVarReturnValue *MessagePin ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageApiService.CreatePin") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAPIService.CreatePin") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -233,13 +233,13 @@ func (a *MessageApiService) CreatePinExecute(r MessageApiCreatePinRequest) (*Mes return localVarReturnValue, localVarHTTPResponse, nil } -type MessageApiDeleteMessageRequest struct { +type MessageAPIDeleteMessageRequest struct { ctx context.Context - ApiService *MessageApiService + ApiService *MessageAPIService messageId string } -func (r MessageApiDeleteMessageRequest) Execute() (*http.Response, error) { +func (r MessageAPIDeleteMessageRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteMessageExecute(r) } @@ -252,10 +252,10 @@ DeleteMessage メッセージを削除 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID - @return MessageApiDeleteMessageRequest + @return MessageAPIDeleteMessageRequest */ -func (a *MessageApiService) DeleteMessage(ctx context.Context, messageId string) MessageApiDeleteMessageRequest { - return MessageApiDeleteMessageRequest{ +func (a *MessageAPIService) DeleteMessage(ctx context.Context, messageId string) MessageAPIDeleteMessageRequest { + return MessageAPIDeleteMessageRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -263,14 +263,14 @@ func (a *MessageApiService) DeleteMessage(ctx context.Context, messageId string) } // Execute executes the request -func (a *MessageApiService) DeleteMessageExecute(r MessageApiDeleteMessageRequest) (*http.Response, error) { +func (a *MessageAPIService) DeleteMessageExecute(r MessageAPIDeleteMessageRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageApiService.DeleteMessage") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAPIService.DeleteMessage") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -327,19 +327,19 @@ func (a *MessageApiService) DeleteMessageExecute(r MessageApiDeleteMessageReques return localVarHTTPResponse, nil } -type MessageApiEditMessageRequest struct { +type MessageAPIEditMessageRequest struct { ctx context.Context - ApiService *MessageApiService + ApiService *MessageAPIService messageId string postMessageRequest *PostMessageRequest } -func (r MessageApiEditMessageRequest) PostMessageRequest(postMessageRequest PostMessageRequest) MessageApiEditMessageRequest { +func (r MessageAPIEditMessageRequest) PostMessageRequest(postMessageRequest PostMessageRequest) MessageAPIEditMessageRequest { r.postMessageRequest = &postMessageRequest return r } -func (r MessageApiEditMessageRequest) Execute() (*http.Response, error) { +func (r MessageAPIEditMessageRequest) Execute() (*http.Response, error) { return r.ApiService.EditMessageExecute(r) } @@ -352,10 +352,10 @@ EditMessage メッセージを編集 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID - @return MessageApiEditMessageRequest + @return MessageAPIEditMessageRequest */ -func (a *MessageApiService) EditMessage(ctx context.Context, messageId string) MessageApiEditMessageRequest { - return MessageApiEditMessageRequest{ +func (a *MessageAPIService) EditMessage(ctx context.Context, messageId string) MessageAPIEditMessageRequest { + return MessageAPIEditMessageRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -363,14 +363,14 @@ func (a *MessageApiService) EditMessage(ctx context.Context, messageId string) M } // Execute executes the request -func (a *MessageApiService) EditMessageExecute(r MessageApiEditMessageRequest) (*http.Response, error) { +func (a *MessageAPIService) EditMessageExecute(r MessageAPIEditMessageRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageApiService.EditMessage") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAPIService.EditMessage") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -429,9 +429,9 @@ func (a *MessageApiService) EditMessageExecute(r MessageApiEditMessageRequest) ( return localVarHTTPResponse, nil } -type MessageApiGetDirectMessagesRequest struct { +type MessageAPIGetDirectMessagesRequest struct { ctx context.Context - ApiService *MessageApiService + ApiService *MessageAPIService userId string limit *int32 offset *int32 @@ -442,42 +442,42 @@ type MessageApiGetDirectMessagesRequest struct { } // 取得する件数 -func (r MessageApiGetDirectMessagesRequest) Limit(limit int32) MessageApiGetDirectMessagesRequest { +func (r MessageAPIGetDirectMessagesRequest) Limit(limit int32) MessageAPIGetDirectMessagesRequest { r.limit = &limit return r } // 取得するオフセット -func (r MessageApiGetDirectMessagesRequest) Offset(offset int32) MessageApiGetDirectMessagesRequest { +func (r MessageAPIGetDirectMessagesRequest) Offset(offset int32) MessageAPIGetDirectMessagesRequest { r.offset = &offset return r } // 取得する時間範囲の開始日時 -func (r MessageApiGetDirectMessagesRequest) Since(since time.Time) MessageApiGetDirectMessagesRequest { +func (r MessageAPIGetDirectMessagesRequest) Since(since time.Time) MessageAPIGetDirectMessagesRequest { r.since = &since return r } // 取得する時間範囲の終了日時 -func (r MessageApiGetDirectMessagesRequest) Until(until time.Time) MessageApiGetDirectMessagesRequest { +func (r MessageAPIGetDirectMessagesRequest) Until(until time.Time) MessageAPIGetDirectMessagesRequest { r.until = &until return r } // 範囲の端を含めるかどうか -func (r MessageApiGetDirectMessagesRequest) Inclusive(inclusive bool) MessageApiGetDirectMessagesRequest { +func (r MessageAPIGetDirectMessagesRequest) Inclusive(inclusive bool) MessageAPIGetDirectMessagesRequest { r.inclusive = &inclusive return r } // 昇順か降順か -func (r MessageApiGetDirectMessagesRequest) Order(order string) MessageApiGetDirectMessagesRequest { +func (r MessageAPIGetDirectMessagesRequest) Order(order string) MessageAPIGetDirectMessagesRequest { r.order = &order return r } -func (r MessageApiGetDirectMessagesRequest) Execute() ([]Message, *http.Response, error) { +func (r MessageAPIGetDirectMessagesRequest) Execute() ([]Message, *http.Response, error) { return r.ApiService.GetDirectMessagesExecute(r) } @@ -488,10 +488,10 @@ GetDirectMessages ダイレクトメッセージのリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID - @return MessageApiGetDirectMessagesRequest + @return MessageAPIGetDirectMessagesRequest */ -func (a *MessageApiService) GetDirectMessages(ctx context.Context, userId string) MessageApiGetDirectMessagesRequest { - return MessageApiGetDirectMessagesRequest{ +func (a *MessageAPIService) GetDirectMessages(ctx context.Context, userId string) MessageAPIGetDirectMessagesRequest { + return MessageAPIGetDirectMessagesRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -501,7 +501,7 @@ func (a *MessageApiService) GetDirectMessages(ctx context.Context, userId string // Execute executes the request // // @return []Message -func (a *MessageApiService) GetDirectMessagesExecute(r MessageApiGetDirectMessagesRequest) ([]Message, *http.Response, error) { +func (a *MessageAPIService) GetDirectMessagesExecute(r MessageAPIGetDirectMessagesRequest) ([]Message, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -509,7 +509,7 @@ func (a *MessageApiService) GetDirectMessagesExecute(r MessageApiGetDirectMessag localVarReturnValue []Message ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageApiService.GetDirectMessages") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAPIService.GetDirectMessages") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -522,22 +522,34 @@ func (a *MessageApiService) GetDirectMessagesExecute(r MessageApiGetDirectMessag localVarFormParams := url.Values{} if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") } if r.offset != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } else { + var defaultValue int32 = 0 + r.offset = &defaultValue } if r.since != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "form", "") + } else { + var defaultValue time.Time + r.since = &defaultValue } if r.until != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "form", "") } if r.inclusive != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "inclusive", r.inclusive, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "inclusive", r.inclusive, "form", "") + } else { + var defaultValue bool = false + r.inclusive = &defaultValue } if r.order != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "form", "") + } else { + var defaultValue string = "desc" + r.order = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -593,13 +605,13 @@ func (a *MessageApiService) GetDirectMessagesExecute(r MessageApiGetDirectMessag return localVarReturnValue, localVarHTTPResponse, nil } -type MessageApiGetMessageRequest struct { +type MessageAPIGetMessageRequest struct { ctx context.Context - ApiService *MessageApiService + ApiService *MessageAPIService messageId string } -func (r MessageApiGetMessageRequest) Execute() (*Message, *http.Response, error) { +func (r MessageAPIGetMessageRequest) Execute() (*Message, *http.Response, error) { return r.ApiService.GetMessageExecute(r) } @@ -610,10 +622,10 @@ GetMessage メッセージを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID - @return MessageApiGetMessageRequest + @return MessageAPIGetMessageRequest */ -func (a *MessageApiService) GetMessage(ctx context.Context, messageId string) MessageApiGetMessageRequest { - return MessageApiGetMessageRequest{ +func (a *MessageAPIService) GetMessage(ctx context.Context, messageId string) MessageAPIGetMessageRequest { + return MessageAPIGetMessageRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -623,7 +635,7 @@ func (a *MessageApiService) GetMessage(ctx context.Context, messageId string) Me // Execute executes the request // // @return Message -func (a *MessageApiService) GetMessageExecute(r MessageApiGetMessageRequest) (*Message, *http.Response, error) { +func (a *MessageAPIService) GetMessageExecute(r MessageAPIGetMessageRequest) (*Message, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -631,7 +643,7 @@ func (a *MessageApiService) GetMessageExecute(r MessageApiGetMessageRequest) (*M localVarReturnValue *Message ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageApiService.GetMessage") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAPIService.GetMessage") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -697,13 +709,13 @@ func (a *MessageApiService) GetMessageExecute(r MessageApiGetMessageRequest) (*M return localVarReturnValue, localVarHTTPResponse, nil } -type MessageApiGetMessageClipsRequest struct { +type MessageAPIGetMessageClipsRequest struct { ctx context.Context - ApiService *MessageApiService + ApiService *MessageAPIService messageId string } -func (r MessageApiGetMessageClipsRequest) Execute() ([]MessageClip, *http.Response, error) { +func (r MessageAPIGetMessageClipsRequest) Execute() ([]MessageClip, *http.Response, error) { return r.ApiService.GetMessageClipsExecute(r) } @@ -714,10 +726,10 @@ GetMessageClips 自分のクリップを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID - @return MessageApiGetMessageClipsRequest + @return MessageAPIGetMessageClipsRequest */ -func (a *MessageApiService) GetMessageClips(ctx context.Context, messageId string) MessageApiGetMessageClipsRequest { - return MessageApiGetMessageClipsRequest{ +func (a *MessageAPIService) GetMessageClips(ctx context.Context, messageId string) MessageAPIGetMessageClipsRequest { + return MessageAPIGetMessageClipsRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -727,7 +739,7 @@ func (a *MessageApiService) GetMessageClips(ctx context.Context, messageId strin // Execute executes the request // // @return []MessageClip -func (a *MessageApiService) GetMessageClipsExecute(r MessageApiGetMessageClipsRequest) ([]MessageClip, *http.Response, error) { +func (a *MessageAPIService) GetMessageClipsExecute(r MessageAPIGetMessageClipsRequest) ([]MessageClip, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -735,7 +747,7 @@ func (a *MessageApiService) GetMessageClipsExecute(r MessageApiGetMessageClipsRe localVarReturnValue []MessageClip ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageApiService.GetMessageClips") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAPIService.GetMessageClips") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -801,13 +813,13 @@ func (a *MessageApiService) GetMessageClipsExecute(r MessageApiGetMessageClipsRe return localVarReturnValue, localVarHTTPResponse, nil } -type MessageApiGetMessageStampsRequest struct { +type MessageAPIGetMessageStampsRequest struct { ctx context.Context - ApiService *MessageApiService + ApiService *MessageAPIService messageId string } -func (r MessageApiGetMessageStampsRequest) Execute() ([]MessageStamp, *http.Response, error) { +func (r MessageAPIGetMessageStampsRequest) Execute() ([]MessageStamp, *http.Response, error) { return r.ApiService.GetMessageStampsExecute(r) } @@ -818,10 +830,10 @@ GetMessageStamps メッセージのスタンプリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID - @return MessageApiGetMessageStampsRequest + @return MessageAPIGetMessageStampsRequest */ -func (a *MessageApiService) GetMessageStamps(ctx context.Context, messageId string) MessageApiGetMessageStampsRequest { - return MessageApiGetMessageStampsRequest{ +func (a *MessageAPIService) GetMessageStamps(ctx context.Context, messageId string) MessageAPIGetMessageStampsRequest { + return MessageAPIGetMessageStampsRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -831,7 +843,7 @@ func (a *MessageApiService) GetMessageStamps(ctx context.Context, messageId stri // Execute executes the request // // @return []MessageStamp -func (a *MessageApiService) GetMessageStampsExecute(r MessageApiGetMessageStampsRequest) ([]MessageStamp, *http.Response, error) { +func (a *MessageAPIService) GetMessageStampsExecute(r MessageAPIGetMessageStampsRequest) ([]MessageStamp, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -839,7 +851,7 @@ func (a *MessageApiService) GetMessageStampsExecute(r MessageApiGetMessageStamps localVarReturnValue []MessageStamp ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageApiService.GetMessageStamps") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAPIService.GetMessageStamps") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -905,9 +917,9 @@ func (a *MessageApiService) GetMessageStampsExecute(r MessageApiGetMessageStamps return localVarReturnValue, localVarHTTPResponse, nil } -type MessageApiGetMessagesRequest struct { +type MessageAPIGetMessagesRequest struct { ctx context.Context - ApiService *MessageApiService + ApiService *MessageAPIService channelId string limit *int32 offset *int32 @@ -918,42 +930,42 @@ type MessageApiGetMessagesRequest struct { } // 取得する件数 -func (r MessageApiGetMessagesRequest) Limit(limit int32) MessageApiGetMessagesRequest { +func (r MessageAPIGetMessagesRequest) Limit(limit int32) MessageAPIGetMessagesRequest { r.limit = &limit return r } // 取得するオフセット -func (r MessageApiGetMessagesRequest) Offset(offset int32) MessageApiGetMessagesRequest { +func (r MessageAPIGetMessagesRequest) Offset(offset int32) MessageAPIGetMessagesRequest { r.offset = &offset return r } // 取得する時間範囲の開始日時 -func (r MessageApiGetMessagesRequest) Since(since time.Time) MessageApiGetMessagesRequest { +func (r MessageAPIGetMessagesRequest) Since(since time.Time) MessageAPIGetMessagesRequest { r.since = &since return r } // 取得する時間範囲の終了日時 -func (r MessageApiGetMessagesRequest) Until(until time.Time) MessageApiGetMessagesRequest { +func (r MessageAPIGetMessagesRequest) Until(until time.Time) MessageAPIGetMessagesRequest { r.until = &until return r } // 範囲の端を含めるかどうか -func (r MessageApiGetMessagesRequest) Inclusive(inclusive bool) MessageApiGetMessagesRequest { +func (r MessageAPIGetMessagesRequest) Inclusive(inclusive bool) MessageAPIGetMessagesRequest { r.inclusive = &inclusive return r } // 昇順か降順か -func (r MessageApiGetMessagesRequest) Order(order string) MessageApiGetMessagesRequest { +func (r MessageAPIGetMessagesRequest) Order(order string) MessageAPIGetMessagesRequest { r.order = &order return r } -func (r MessageApiGetMessagesRequest) Execute() ([]Message, *http.Response, error) { +func (r MessageAPIGetMessagesRequest) Execute() ([]Message, *http.Response, error) { return r.ApiService.GetMessagesExecute(r) } @@ -964,10 +976,10 @@ GetMessages チャンネルメッセージのリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return MessageApiGetMessagesRequest + @return MessageAPIGetMessagesRequest */ -func (a *MessageApiService) GetMessages(ctx context.Context, channelId string) MessageApiGetMessagesRequest { - return MessageApiGetMessagesRequest{ +func (a *MessageAPIService) GetMessages(ctx context.Context, channelId string) MessageAPIGetMessagesRequest { + return MessageAPIGetMessagesRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -977,7 +989,7 @@ func (a *MessageApiService) GetMessages(ctx context.Context, channelId string) M // Execute executes the request // // @return []Message -func (a *MessageApiService) GetMessagesExecute(r MessageApiGetMessagesRequest) ([]Message, *http.Response, error) { +func (a *MessageAPIService) GetMessagesExecute(r MessageAPIGetMessagesRequest) ([]Message, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -985,7 +997,7 @@ func (a *MessageApiService) GetMessagesExecute(r MessageApiGetMessagesRequest) ( localVarReturnValue []Message ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageApiService.GetMessages") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAPIService.GetMessages") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -998,22 +1010,34 @@ func (a *MessageApiService) GetMessagesExecute(r MessageApiGetMessagesRequest) ( localVarFormParams := url.Values{} if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") } if r.offset != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } else { + var defaultValue int32 = 0 + r.offset = &defaultValue } if r.since != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "form", "") + } else { + var defaultValue time.Time + r.since = &defaultValue } if r.until != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "form", "") } if r.inclusive != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "inclusive", r.inclusive, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "inclusive", r.inclusive, "form", "") + } else { + var defaultValue bool = false + r.inclusive = &defaultValue } if r.order != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "form", "") + } else { + var defaultValue string = "desc" + r.order = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1069,13 +1093,13 @@ func (a *MessageApiService) GetMessagesExecute(r MessageApiGetMessagesRequest) ( return localVarReturnValue, localVarHTTPResponse, nil } -type MessageApiGetPinRequest struct { +type MessageAPIGetPinRequest struct { ctx context.Context - ApiService *MessageApiService + ApiService *MessageAPIService messageId string } -func (r MessageApiGetPinRequest) Execute() (*MessagePin, *http.Response, error) { +func (r MessageAPIGetPinRequest) Execute() (*MessagePin, *http.Response, error) { return r.ApiService.GetPinExecute(r) } @@ -1086,10 +1110,10 @@ GetPin ピン留めを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID - @return MessageApiGetPinRequest + @return MessageAPIGetPinRequest */ -func (a *MessageApiService) GetPin(ctx context.Context, messageId string) MessageApiGetPinRequest { - return MessageApiGetPinRequest{ +func (a *MessageAPIService) GetPin(ctx context.Context, messageId string) MessageAPIGetPinRequest { + return MessageAPIGetPinRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -1099,7 +1123,7 @@ func (a *MessageApiService) GetPin(ctx context.Context, messageId string) Messag // Execute executes the request // // @return MessagePin -func (a *MessageApiService) GetPinExecute(r MessageApiGetPinRequest) (*MessagePin, *http.Response, error) { +func (a *MessageAPIService) GetPinExecute(r MessageAPIGetPinRequest) (*MessagePin, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1107,7 +1131,7 @@ func (a *MessageApiService) GetPinExecute(r MessageApiGetPinRequest) (*MessagePi localVarReturnValue *MessagePin ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageApiService.GetPin") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAPIService.GetPin") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1173,19 +1197,19 @@ func (a *MessageApiService) GetPinExecute(r MessageApiGetPinRequest) (*MessagePi return localVarReturnValue, localVarHTTPResponse, nil } -type MessageApiPostDirectMessageRequest struct { +type MessageAPIPostDirectMessageRequest struct { ctx context.Context - ApiService *MessageApiService + ApiService *MessageAPIService userId string postMessageRequest *PostMessageRequest } -func (r MessageApiPostDirectMessageRequest) PostMessageRequest(postMessageRequest PostMessageRequest) MessageApiPostDirectMessageRequest { +func (r MessageAPIPostDirectMessageRequest) PostMessageRequest(postMessageRequest PostMessageRequest) MessageAPIPostDirectMessageRequest { r.postMessageRequest = &postMessageRequest return r } -func (r MessageApiPostDirectMessageRequest) Execute() (*Message, *http.Response, error) { +func (r MessageAPIPostDirectMessageRequest) Execute() (*Message, *http.Response, error) { return r.ApiService.PostDirectMessageExecute(r) } @@ -1196,10 +1220,10 @@ PostDirectMessage ダイレクトメッセージを送信 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID - @return MessageApiPostDirectMessageRequest + @return MessageAPIPostDirectMessageRequest */ -func (a *MessageApiService) PostDirectMessage(ctx context.Context, userId string) MessageApiPostDirectMessageRequest { - return MessageApiPostDirectMessageRequest{ +func (a *MessageAPIService) PostDirectMessage(ctx context.Context, userId string) MessageAPIPostDirectMessageRequest { + return MessageAPIPostDirectMessageRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -1209,7 +1233,7 @@ func (a *MessageApiService) PostDirectMessage(ctx context.Context, userId string // Execute executes the request // // @return Message -func (a *MessageApiService) PostDirectMessageExecute(r MessageApiPostDirectMessageRequest) (*Message, *http.Response, error) { +func (a *MessageAPIService) PostDirectMessageExecute(r MessageAPIPostDirectMessageRequest) (*Message, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -1217,7 +1241,7 @@ func (a *MessageApiService) PostDirectMessageExecute(r MessageApiPostDirectMessa localVarReturnValue *Message ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageApiService.PostDirectMessage") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAPIService.PostDirectMessage") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1285,19 +1309,19 @@ func (a *MessageApiService) PostDirectMessageExecute(r MessageApiPostDirectMessa return localVarReturnValue, localVarHTTPResponse, nil } -type MessageApiPostMessageRequest struct { +type MessageAPIPostMessageRequest struct { ctx context.Context - ApiService *MessageApiService + ApiService *MessageAPIService channelId string postMessageRequest *PostMessageRequest } -func (r MessageApiPostMessageRequest) PostMessageRequest(postMessageRequest PostMessageRequest) MessageApiPostMessageRequest { +func (r MessageAPIPostMessageRequest) PostMessageRequest(postMessageRequest PostMessageRequest) MessageAPIPostMessageRequest { r.postMessageRequest = &postMessageRequest return r } -func (r MessageApiPostMessageRequest) Execute() (*Message, *http.Response, error) { +func (r MessageAPIPostMessageRequest) Execute() (*Message, *http.Response, error) { return r.ApiService.PostMessageExecute(r) } @@ -1310,10 +1334,10 @@ embedをtrueに指定すると、メッセージ埋め込みが自動で行わ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return MessageApiPostMessageRequest + @return MessageAPIPostMessageRequest */ -func (a *MessageApiService) PostMessage(ctx context.Context, channelId string) MessageApiPostMessageRequest { - return MessageApiPostMessageRequest{ +func (a *MessageAPIService) PostMessage(ctx context.Context, channelId string) MessageAPIPostMessageRequest { + return MessageAPIPostMessageRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -1323,7 +1347,7 @@ func (a *MessageApiService) PostMessage(ctx context.Context, channelId string) M // Execute executes the request // // @return Message -func (a *MessageApiService) PostMessageExecute(r MessageApiPostMessageRequest) (*Message, *http.Response, error) { +func (a *MessageAPIService) PostMessageExecute(r MessageAPIPostMessageRequest) (*Message, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -1331,7 +1355,7 @@ func (a *MessageApiService) PostMessageExecute(r MessageApiPostMessageRequest) ( localVarReturnValue *Message ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageApiService.PostMessage") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAPIService.PostMessage") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1399,14 +1423,14 @@ func (a *MessageApiService) PostMessageExecute(r MessageApiPostMessageRequest) ( return localVarReturnValue, localVarHTTPResponse, nil } -type MessageApiRemoveMessageStampRequest struct { +type MessageAPIRemoveMessageStampRequest struct { ctx context.Context - ApiService *MessageApiService + ApiService *MessageAPIService messageId string stampId string } -func (r MessageApiRemoveMessageStampRequest) Execute() (*http.Response, error) { +func (r MessageAPIRemoveMessageStampRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveMessageStampExecute(r) } @@ -1418,10 +1442,10 @@ RemoveMessageStamp スタンプを消す @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID @param stampId スタンプUUID - @return MessageApiRemoveMessageStampRequest + @return MessageAPIRemoveMessageStampRequest */ -func (a *MessageApiService) RemoveMessageStamp(ctx context.Context, messageId string, stampId string) MessageApiRemoveMessageStampRequest { - return MessageApiRemoveMessageStampRequest{ +func (a *MessageAPIService) RemoveMessageStamp(ctx context.Context, messageId string, stampId string) MessageAPIRemoveMessageStampRequest { + return MessageAPIRemoveMessageStampRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -1430,14 +1454,14 @@ func (a *MessageApiService) RemoveMessageStamp(ctx context.Context, messageId st } // Execute executes the request -func (a *MessageApiService) RemoveMessageStampExecute(r MessageApiRemoveMessageStampRequest) (*http.Response, error) { +func (a *MessageAPIService) RemoveMessageStampExecute(r MessageAPIRemoveMessageStampRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageApiService.RemoveMessageStamp") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAPIService.RemoveMessageStamp") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -1495,13 +1519,13 @@ func (a *MessageApiService) RemoveMessageStampExecute(r MessageApiRemoveMessageS return localVarHTTPResponse, nil } -type MessageApiRemovePinRequest struct { +type MessageAPIRemovePinRequest struct { ctx context.Context - ApiService *MessageApiService + ApiService *MessageAPIService messageId string } -func (r MessageApiRemovePinRequest) Execute() (*http.Response, error) { +func (r MessageAPIRemovePinRequest) Execute() (*http.Response, error) { return r.ApiService.RemovePinExecute(r) } @@ -1512,10 +1536,10 @@ RemovePin ピン留めを外す @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID - @return MessageApiRemovePinRequest + @return MessageAPIRemovePinRequest */ -func (a *MessageApiService) RemovePin(ctx context.Context, messageId string) MessageApiRemovePinRequest { - return MessageApiRemovePinRequest{ +func (a *MessageAPIService) RemovePin(ctx context.Context, messageId string) MessageAPIRemovePinRequest { + return MessageAPIRemovePinRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -1523,14 +1547,14 @@ func (a *MessageApiService) RemovePin(ctx context.Context, messageId string) Mes } // Execute executes the request -func (a *MessageApiService) RemovePinExecute(r MessageApiRemovePinRequest) (*http.Response, error) { +func (a *MessageAPIService) RemovePinExecute(r MessageAPIRemovePinRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageApiService.RemovePin") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAPIService.RemovePin") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -1587,9 +1611,9 @@ func (a *MessageApiService) RemovePinExecute(r MessageApiRemovePinRequest) (*htt return localVarHTTPResponse, nil } -type MessageApiSearchMessagesRequest struct { +type MessageAPISearchMessagesRequest struct { ctx context.Context - ApiService *MessageApiService + ApiService *MessageAPIService word *string after *time.Time before *time.Time @@ -1609,102 +1633,102 @@ type MessageApiSearchMessagesRequest struct { } // 検索ワード Simple-Query-String-Syntaxをパースして検索します -func (r MessageApiSearchMessagesRequest) Word(word string) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) Word(word string) MessageAPISearchMessagesRequest { r.word = &word return r } // 投稿日時が指定日時より後 -func (r MessageApiSearchMessagesRequest) After(after time.Time) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) After(after time.Time) MessageAPISearchMessagesRequest { r.after = &after return r } // 投稿日時が指定日時より前 -func (r MessageApiSearchMessagesRequest) Before(before time.Time) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) Before(before time.Time) MessageAPISearchMessagesRequest { r.before = &before return r } // メッセージが投稿されたチャンネル -func (r MessageApiSearchMessagesRequest) In(in string) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) In(in string) MessageAPISearchMessagesRequest { r.in = &in return r } // メンションされたユーザー -func (r MessageApiSearchMessagesRequest) To(to []string) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) To(to []string) MessageAPISearchMessagesRequest { r.to = &to return r } // メッセージを投稿したユーザー -func (r MessageApiSearchMessagesRequest) From(from []string) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) From(from []string) MessageAPISearchMessagesRequest { r.from = &from return r } // 引用しているメッセージ -func (r MessageApiSearchMessagesRequest) Citation(citation string) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) Citation(citation string) MessageAPISearchMessagesRequest { r.citation = &citation return r } // メッセージを投稿したユーザーがBotかどうか -func (r MessageApiSearchMessagesRequest) Bot(bot bool) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) Bot(bot bool) MessageAPISearchMessagesRequest { r.bot = &bot return r } // メッセージがURLを含むか -func (r MessageApiSearchMessagesRequest) HasURL(hasURL bool) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) HasURL(hasURL bool) MessageAPISearchMessagesRequest { r.hasURL = &hasURL return r } // メッセージが添付ファイルを含むか -func (r MessageApiSearchMessagesRequest) HasAttachments(hasAttachments bool) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) HasAttachments(hasAttachments bool) MessageAPISearchMessagesRequest { r.hasAttachments = &hasAttachments return r } // メッセージが画像を含むか -func (r MessageApiSearchMessagesRequest) HasImage(hasImage bool) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) HasImage(hasImage bool) MessageAPISearchMessagesRequest { r.hasImage = &hasImage return r } // メッセージが動画を含むか -func (r MessageApiSearchMessagesRequest) HasVideo(hasVideo bool) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) HasVideo(hasVideo bool) MessageAPISearchMessagesRequest { r.hasVideo = &hasVideo return r } // メッセージが音声ファイルを含むか -func (r MessageApiSearchMessagesRequest) HasAudio(hasAudio bool) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) HasAudio(hasAudio bool) MessageAPISearchMessagesRequest { r.hasAudio = &hasAudio return r } // 検索結果から取得するメッセージの最大件数 -func (r MessageApiSearchMessagesRequest) Limit(limit int32) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) Limit(limit int32) MessageAPISearchMessagesRequest { r.limit = &limit return r } // 検索結果から取得するメッセージのオフセット -func (r MessageApiSearchMessagesRequest) Offset(offset int32) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) Offset(offset int32) MessageAPISearchMessagesRequest { r.offset = &offset return r } // ソート順 (作成日時が新しい `createdAt`, 作成日時が古い `-createdAt`, 更新日時が新しい `updatedAt`, 更新日時が古い `-updatedAt`) -func (r MessageApiSearchMessagesRequest) Sort(sort string) MessageApiSearchMessagesRequest { +func (r MessageAPISearchMessagesRequest) Sort(sort string) MessageAPISearchMessagesRequest { r.sort = &sort return r } -func (r MessageApiSearchMessagesRequest) Execute() (*MessageSearchResult, *http.Response, error) { +func (r MessageAPISearchMessagesRequest) Execute() (*MessageSearchResult, *http.Response, error) { return r.ApiService.SearchMessagesExecute(r) } @@ -1714,10 +1738,10 @@ SearchMessages メッセージを検索 メッセージを検索します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return MessageApiSearchMessagesRequest + @return MessageAPISearchMessagesRequest */ -func (a *MessageApiService) SearchMessages(ctx context.Context) MessageApiSearchMessagesRequest { - return MessageApiSearchMessagesRequest{ +func (a *MessageAPIService) SearchMessages(ctx context.Context) MessageAPISearchMessagesRequest { + return MessageAPISearchMessagesRequest{ ApiService: a, ctx: ctx, } @@ -1726,7 +1750,7 @@ func (a *MessageApiService) SearchMessages(ctx context.Context) MessageApiSearch // Execute executes the request // // @return MessageSearchResult -func (a *MessageApiService) SearchMessagesExecute(r MessageApiSearchMessagesRequest) (*MessageSearchResult, *http.Response, error) { +func (a *MessageAPIService) SearchMessagesExecute(r MessageAPISearchMessagesRequest) (*MessageSearchResult, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1734,7 +1758,7 @@ func (a *MessageApiService) SearchMessagesExecute(r MessageApiSearchMessagesRequ localVarReturnValue *MessageSearchResult ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageApiService.SearchMessages") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MessageAPIService.SearchMessages") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1746,26 +1770,26 @@ func (a *MessageApiService) SearchMessagesExecute(r MessageApiSearchMessagesRequ localVarFormParams := url.Values{} if r.word != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "word", r.word, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "word", r.word, "form", "") } if r.after != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "after", r.after, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "after", r.after, "form", "") } if r.before != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "before", r.before, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "before", r.before, "form", "") } if r.in != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "in", r.in, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "in", r.in, "form", "") } if r.to != nil { t := *r.to if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - parameterAddToHeaderOrQuery(localVarQueryParams, "to", s.Index(i), "multi") + parameterAddToHeaderOrQuery(localVarQueryParams, "to", s.Index(i).Interface(), "form", "multi") } } else { - parameterAddToHeaderOrQuery(localVarQueryParams, "to", t, "multi") + parameterAddToHeaderOrQuery(localVarQueryParams, "to", t, "form", "multi") } } if r.from != nil { @@ -1773,41 +1797,44 @@ func (a *MessageApiService) SearchMessagesExecute(r MessageApiSearchMessagesRequ if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - parameterAddToHeaderOrQuery(localVarQueryParams, "from", s.Index(i), "multi") + parameterAddToHeaderOrQuery(localVarQueryParams, "from", s.Index(i).Interface(), "form", "multi") } } else { - parameterAddToHeaderOrQuery(localVarQueryParams, "from", t, "multi") + parameterAddToHeaderOrQuery(localVarQueryParams, "from", t, "form", "multi") } } if r.citation != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "citation", r.citation, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "citation", r.citation, "form", "") } if r.bot != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "bot", r.bot, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "bot", r.bot, "form", "") } if r.hasURL != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "hasURL", r.hasURL, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "hasURL", r.hasURL, "form", "") } if r.hasAttachments != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "hasAttachments", r.hasAttachments, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "hasAttachments", r.hasAttachments, "form", "") } if r.hasImage != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "hasImage", r.hasImage, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "hasImage", r.hasImage, "form", "") } if r.hasVideo != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "hasVideo", r.hasVideo, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "hasVideo", r.hasVideo, "form", "") } if r.hasAudio != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "hasAudio", r.hasAudio, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "hasAudio", r.hasAudio, "form", "") } if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") } if r.offset != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") } if r.sort != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "form", "") + } else { + var defaultValue string = "-createdAt" + r.sort = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/api_notification.go b/api_notification.go index a6d9d41..e2db612 100644 --- a/api_notification.go +++ b/api_notification.go @@ -19,22 +19,22 @@ import ( "strings" ) -// NotificationApiService NotificationApi service -type NotificationApiService service +// NotificationAPIService NotificationAPI service +type NotificationAPIService service -type NotificationApiEditChannelSubscribersRequest struct { +type NotificationAPIEditChannelSubscribersRequest struct { ctx context.Context - ApiService *NotificationApiService + ApiService *NotificationAPIService channelId string patchChannelSubscribersRequest *PatchChannelSubscribersRequest } -func (r NotificationApiEditChannelSubscribersRequest) PatchChannelSubscribersRequest(patchChannelSubscribersRequest PatchChannelSubscribersRequest) NotificationApiEditChannelSubscribersRequest { +func (r NotificationAPIEditChannelSubscribersRequest) PatchChannelSubscribersRequest(patchChannelSubscribersRequest PatchChannelSubscribersRequest) NotificationAPIEditChannelSubscribersRequest { r.patchChannelSubscribersRequest = &patchChannelSubscribersRequest return r } -func (r NotificationApiEditChannelSubscribersRequest) Execute() (*http.Response, error) { +func (r NotificationAPIEditChannelSubscribersRequest) Execute() (*http.Response, error) { return r.ApiService.EditChannelSubscribersExecute(r) } @@ -47,10 +47,10 @@ EditChannelSubscribers チャンネルの通知購読者を編集 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return NotificationApiEditChannelSubscribersRequest + @return NotificationAPIEditChannelSubscribersRequest */ -func (a *NotificationApiService) EditChannelSubscribers(ctx context.Context, channelId string) NotificationApiEditChannelSubscribersRequest { - return NotificationApiEditChannelSubscribersRequest{ +func (a *NotificationAPIService) EditChannelSubscribers(ctx context.Context, channelId string) NotificationAPIEditChannelSubscribersRequest { + return NotificationAPIEditChannelSubscribersRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -58,14 +58,14 @@ func (a *NotificationApiService) EditChannelSubscribers(ctx context.Context, cha } // Execute executes the request -func (a *NotificationApiService) EditChannelSubscribersExecute(r NotificationApiEditChannelSubscribersRequest) (*http.Response, error) { +func (a *NotificationAPIService) EditChannelSubscribersExecute(r NotificationAPIEditChannelSubscribersRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationApiService.EditChannelSubscribers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationAPIService.EditChannelSubscribers") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -124,13 +124,13 @@ func (a *NotificationApiService) EditChannelSubscribersExecute(r NotificationApi return localVarHTTPResponse, nil } -type NotificationApiGetChannelSubscribersRequest struct { +type NotificationAPIGetChannelSubscribersRequest struct { ctx context.Context - ApiService *NotificationApiService + ApiService *NotificationAPIService channelId string } -func (r NotificationApiGetChannelSubscribersRequest) Execute() ([]string, *http.Response, error) { +func (r NotificationAPIGetChannelSubscribersRequest) Execute() ([]string, *http.Response, error) { return r.ApiService.GetChannelSubscribersExecute(r) } @@ -141,10 +141,10 @@ GetChannelSubscribers チャンネルの通知購読者のリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return NotificationApiGetChannelSubscribersRequest + @return NotificationAPIGetChannelSubscribersRequest */ -func (a *NotificationApiService) GetChannelSubscribers(ctx context.Context, channelId string) NotificationApiGetChannelSubscribersRequest { - return NotificationApiGetChannelSubscribersRequest{ +func (a *NotificationAPIService) GetChannelSubscribers(ctx context.Context, channelId string) NotificationAPIGetChannelSubscribersRequest { + return NotificationAPIGetChannelSubscribersRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -154,7 +154,7 @@ func (a *NotificationApiService) GetChannelSubscribers(ctx context.Context, chan // Execute executes the request // // @return []string -func (a *NotificationApiService) GetChannelSubscribersExecute(r NotificationApiGetChannelSubscribersRequest) ([]string, *http.Response, error) { +func (a *NotificationAPIService) GetChannelSubscribersExecute(r NotificationAPIGetChannelSubscribersRequest) ([]string, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -162,7 +162,7 @@ func (a *NotificationApiService) GetChannelSubscribersExecute(r NotificationApiG localVarReturnValue []string ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationApiService.GetChannelSubscribers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationAPIService.GetChannelSubscribers") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -228,12 +228,12 @@ func (a *NotificationApiService) GetChannelSubscribersExecute(r NotificationApiG return localVarReturnValue, localVarHTTPResponse, nil } -type NotificationApiGetMyChannelSubscriptionsRequest struct { +type NotificationAPIGetMyChannelSubscriptionsRequest struct { ctx context.Context - ApiService *NotificationApiService + ApiService *NotificationAPIService } -func (r NotificationApiGetMyChannelSubscriptionsRequest) Execute() ([]UserSubscribeState, *http.Response, error) { +func (r NotificationAPIGetMyChannelSubscriptionsRequest) Execute() ([]UserSubscribeState, *http.Response, error) { return r.ApiService.GetMyChannelSubscriptionsExecute(r) } @@ -243,10 +243,10 @@ GetMyChannelSubscriptions 自分のチャンネル購読状態を取得 自身のチャンネル購読状態を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return NotificationApiGetMyChannelSubscriptionsRequest + @return NotificationAPIGetMyChannelSubscriptionsRequest */ -func (a *NotificationApiService) GetMyChannelSubscriptions(ctx context.Context) NotificationApiGetMyChannelSubscriptionsRequest { - return NotificationApiGetMyChannelSubscriptionsRequest{ +func (a *NotificationAPIService) GetMyChannelSubscriptions(ctx context.Context) NotificationAPIGetMyChannelSubscriptionsRequest { + return NotificationAPIGetMyChannelSubscriptionsRequest{ ApiService: a, ctx: ctx, } @@ -255,7 +255,7 @@ func (a *NotificationApiService) GetMyChannelSubscriptions(ctx context.Context) // Execute executes the request // // @return []UserSubscribeState -func (a *NotificationApiService) GetMyChannelSubscriptionsExecute(r NotificationApiGetMyChannelSubscriptionsRequest) ([]UserSubscribeState, *http.Response, error) { +func (a *NotificationAPIService) GetMyChannelSubscriptionsExecute(r NotificationAPIGetMyChannelSubscriptionsRequest) ([]UserSubscribeState, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -263,7 +263,7 @@ func (a *NotificationApiService) GetMyChannelSubscriptionsExecute(r Notification localVarReturnValue []UserSubscribeState ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationApiService.GetMyChannelSubscriptions") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationAPIService.GetMyChannelSubscriptions") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -328,12 +328,12 @@ func (a *NotificationApiService) GetMyChannelSubscriptionsExecute(r Notification return localVarReturnValue, localVarHTTPResponse, nil } -type NotificationApiGetMyUnreadChannelsRequest struct { +type NotificationAPIGetMyUnreadChannelsRequest struct { ctx context.Context - ApiService *NotificationApiService + ApiService *NotificationAPIService } -func (r NotificationApiGetMyUnreadChannelsRequest) Execute() ([]UnreadChannel, *http.Response, error) { +func (r NotificationAPIGetMyUnreadChannelsRequest) Execute() ([]UnreadChannel, *http.Response, error) { return r.ApiService.GetMyUnreadChannelsExecute(r) } @@ -343,10 +343,10 @@ GetMyUnreadChannels 未読チャンネルを取得 自分が現在未読のチャンネルの未読情報を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return NotificationApiGetMyUnreadChannelsRequest + @return NotificationAPIGetMyUnreadChannelsRequest */ -func (a *NotificationApiService) GetMyUnreadChannels(ctx context.Context) NotificationApiGetMyUnreadChannelsRequest { - return NotificationApiGetMyUnreadChannelsRequest{ +func (a *NotificationAPIService) GetMyUnreadChannels(ctx context.Context) NotificationAPIGetMyUnreadChannelsRequest { + return NotificationAPIGetMyUnreadChannelsRequest{ ApiService: a, ctx: ctx, } @@ -355,7 +355,7 @@ func (a *NotificationApiService) GetMyUnreadChannels(ctx context.Context) Notifi // Execute executes the request // // @return []UnreadChannel -func (a *NotificationApiService) GetMyUnreadChannelsExecute(r NotificationApiGetMyUnreadChannelsRequest) ([]UnreadChannel, *http.Response, error) { +func (a *NotificationAPIService) GetMyUnreadChannelsExecute(r NotificationAPIGetMyUnreadChannelsRequest) ([]UnreadChannel, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -363,7 +363,7 @@ func (a *NotificationApiService) GetMyUnreadChannelsExecute(r NotificationApiGet localVarReturnValue []UnreadChannel ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationApiService.GetMyUnreadChannels") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationAPIService.GetMyUnreadChannels") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -428,12 +428,12 @@ func (a *NotificationApiService) GetMyUnreadChannelsExecute(r NotificationApiGet return localVarReturnValue, localVarHTTPResponse, nil } -type NotificationApiGetMyViewStatesRequest struct { +type NotificationAPIGetMyViewStatesRequest struct { ctx context.Context - ApiService *NotificationApiService + ApiService *NotificationAPIService } -func (r NotificationApiGetMyViewStatesRequest) Execute() ([]MyChannelViewState, *http.Response, error) { +func (r NotificationAPIGetMyViewStatesRequest) Execute() ([]MyChannelViewState, *http.Response, error) { return r.ApiService.GetMyViewStatesExecute(r) } @@ -443,10 +443,10 @@ GetMyViewStates 自身のチャンネル閲覧状態一覧を取得 自身のチャンネル閲覧状態一覧を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return NotificationApiGetMyViewStatesRequest + @return NotificationAPIGetMyViewStatesRequest */ -func (a *NotificationApiService) GetMyViewStates(ctx context.Context) NotificationApiGetMyViewStatesRequest { - return NotificationApiGetMyViewStatesRequest{ +func (a *NotificationAPIService) GetMyViewStates(ctx context.Context) NotificationAPIGetMyViewStatesRequest { + return NotificationAPIGetMyViewStatesRequest{ ApiService: a, ctx: ctx, } @@ -455,7 +455,7 @@ func (a *NotificationApiService) GetMyViewStates(ctx context.Context) Notificati // Execute executes the request // // @return []MyChannelViewState -func (a *NotificationApiService) GetMyViewStatesExecute(r NotificationApiGetMyViewStatesRequest) ([]MyChannelViewState, *http.Response, error) { +func (a *NotificationAPIService) GetMyViewStatesExecute(r NotificationAPIGetMyViewStatesRequest) ([]MyChannelViewState, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -463,7 +463,7 @@ func (a *NotificationApiService) GetMyViewStatesExecute(r NotificationApiGetMyVi localVarReturnValue []MyChannelViewState ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationApiService.GetMyViewStates") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationAPIService.GetMyViewStates") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -528,13 +528,13 @@ func (a *NotificationApiService) GetMyViewStatesExecute(r NotificationApiGetMyVi return localVarReturnValue, localVarHTTPResponse, nil } -type NotificationApiReadChannelRequest struct { +type NotificationAPIReadChannelRequest struct { ctx context.Context - ApiService *NotificationApiService + ApiService *NotificationAPIService channelId string } -func (r NotificationApiReadChannelRequest) Execute() (*http.Response, error) { +func (r NotificationAPIReadChannelRequest) Execute() (*http.Response, error) { return r.ApiService.ReadChannelExecute(r) } @@ -545,10 +545,10 @@ ReadChannel チャンネルを既読にする @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return NotificationApiReadChannelRequest + @return NotificationAPIReadChannelRequest */ -func (a *NotificationApiService) ReadChannel(ctx context.Context, channelId string) NotificationApiReadChannelRequest { - return NotificationApiReadChannelRequest{ +func (a *NotificationAPIService) ReadChannel(ctx context.Context, channelId string) NotificationAPIReadChannelRequest { + return NotificationAPIReadChannelRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -556,14 +556,14 @@ func (a *NotificationApiService) ReadChannel(ctx context.Context, channelId stri } // Execute executes the request -func (a *NotificationApiService) ReadChannelExecute(r NotificationApiReadChannelRequest) (*http.Response, error) { +func (a *NotificationAPIService) ReadChannelExecute(r NotificationAPIReadChannelRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationApiService.ReadChannel") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationAPIService.ReadChannel") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -620,18 +620,18 @@ func (a *NotificationApiService) ReadChannelExecute(r NotificationApiReadChannel return localVarHTTPResponse, nil } -type NotificationApiRegisterFCMDeviceRequest struct { +type NotificationAPIRegisterFCMDeviceRequest struct { ctx context.Context - ApiService *NotificationApiService + ApiService *NotificationAPIService postMyFCMDeviceRequest *PostMyFCMDeviceRequest } -func (r NotificationApiRegisterFCMDeviceRequest) PostMyFCMDeviceRequest(postMyFCMDeviceRequest PostMyFCMDeviceRequest) NotificationApiRegisterFCMDeviceRequest { +func (r NotificationAPIRegisterFCMDeviceRequest) PostMyFCMDeviceRequest(postMyFCMDeviceRequest PostMyFCMDeviceRequest) NotificationAPIRegisterFCMDeviceRequest { r.postMyFCMDeviceRequest = &postMyFCMDeviceRequest return r } -func (r NotificationApiRegisterFCMDeviceRequest) Execute() (*http.Response, error) { +func (r NotificationAPIRegisterFCMDeviceRequest) Execute() (*http.Response, error) { return r.ApiService.RegisterFCMDeviceExecute(r) } @@ -641,24 +641,24 @@ RegisterFCMDevice FCMデバイスを登録 自身のFCMデバイスを登録します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return NotificationApiRegisterFCMDeviceRequest + @return NotificationAPIRegisterFCMDeviceRequest */ -func (a *NotificationApiService) RegisterFCMDevice(ctx context.Context) NotificationApiRegisterFCMDeviceRequest { - return NotificationApiRegisterFCMDeviceRequest{ +func (a *NotificationAPIService) RegisterFCMDevice(ctx context.Context) NotificationAPIRegisterFCMDeviceRequest { + return NotificationAPIRegisterFCMDeviceRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *NotificationApiService) RegisterFCMDeviceExecute(r NotificationApiRegisterFCMDeviceRequest) (*http.Response, error) { +func (a *NotificationAPIService) RegisterFCMDeviceExecute(r NotificationAPIRegisterFCMDeviceRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationApiService.RegisterFCMDevice") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationAPIService.RegisterFCMDevice") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -716,19 +716,19 @@ func (a *NotificationApiService) RegisterFCMDeviceExecute(r NotificationApiRegis return localVarHTTPResponse, nil } -type NotificationApiSetChannelSubscribeLevelRequest struct { +type NotificationAPISetChannelSubscribeLevelRequest struct { ctx context.Context - ApiService *NotificationApiService + ApiService *NotificationAPIService channelId string putChannelSubscribeLevelRequest *PutChannelSubscribeLevelRequest } -func (r NotificationApiSetChannelSubscribeLevelRequest) PutChannelSubscribeLevelRequest(putChannelSubscribeLevelRequest PutChannelSubscribeLevelRequest) NotificationApiSetChannelSubscribeLevelRequest { +func (r NotificationAPISetChannelSubscribeLevelRequest) PutChannelSubscribeLevelRequest(putChannelSubscribeLevelRequest PutChannelSubscribeLevelRequest) NotificationAPISetChannelSubscribeLevelRequest { r.putChannelSubscribeLevelRequest = &putChannelSubscribeLevelRequest return r } -func (r NotificationApiSetChannelSubscribeLevelRequest) Execute() (*http.Response, error) { +func (r NotificationAPISetChannelSubscribeLevelRequest) Execute() (*http.Response, error) { return r.ApiService.SetChannelSubscribeLevelExecute(r) } @@ -739,10 +739,10 @@ SetChannelSubscribeLevel チャンネル購読レベルを設定 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return NotificationApiSetChannelSubscribeLevelRequest + @return NotificationAPISetChannelSubscribeLevelRequest */ -func (a *NotificationApiService) SetChannelSubscribeLevel(ctx context.Context, channelId string) NotificationApiSetChannelSubscribeLevelRequest { - return NotificationApiSetChannelSubscribeLevelRequest{ +func (a *NotificationAPIService) SetChannelSubscribeLevel(ctx context.Context, channelId string) NotificationAPISetChannelSubscribeLevelRequest { + return NotificationAPISetChannelSubscribeLevelRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -750,14 +750,14 @@ func (a *NotificationApiService) SetChannelSubscribeLevel(ctx context.Context, c } // Execute executes the request -func (a *NotificationApiService) SetChannelSubscribeLevelExecute(r NotificationApiSetChannelSubscribeLevelRequest) (*http.Response, error) { +func (a *NotificationAPIService) SetChannelSubscribeLevelExecute(r NotificationAPISetChannelSubscribeLevelRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationApiService.SetChannelSubscribeLevel") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationAPIService.SetChannelSubscribeLevel") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -816,19 +816,19 @@ func (a *NotificationApiService) SetChannelSubscribeLevelExecute(r NotificationA return localVarHTTPResponse, nil } -type NotificationApiSetChannelSubscribersRequest struct { +type NotificationAPISetChannelSubscribersRequest struct { ctx context.Context - ApiService *NotificationApiService + ApiService *NotificationAPIService channelId string putChannelSubscribersRequest *PutChannelSubscribersRequest } -func (r NotificationApiSetChannelSubscribersRequest) PutChannelSubscribersRequest(putChannelSubscribersRequest PutChannelSubscribersRequest) NotificationApiSetChannelSubscribersRequest { +func (r NotificationAPISetChannelSubscribersRequest) PutChannelSubscribersRequest(putChannelSubscribersRequest PutChannelSubscribersRequest) NotificationAPISetChannelSubscribersRequest { r.putChannelSubscribersRequest = &putChannelSubscribersRequest return r } -func (r NotificationApiSetChannelSubscribersRequest) Execute() (*http.Response, error) { +func (r NotificationAPISetChannelSubscribersRequest) Execute() (*http.Response, error) { return r.ApiService.SetChannelSubscribersExecute(r) } @@ -841,10 +841,10 @@ SetChannelSubscribers チャンネルの通知購読者を設定 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return NotificationApiSetChannelSubscribersRequest + @return NotificationAPISetChannelSubscribersRequest */ -func (a *NotificationApiService) SetChannelSubscribers(ctx context.Context, channelId string) NotificationApiSetChannelSubscribersRequest { - return NotificationApiSetChannelSubscribersRequest{ +func (a *NotificationAPIService) SetChannelSubscribers(ctx context.Context, channelId string) NotificationAPISetChannelSubscribersRequest { + return NotificationAPISetChannelSubscribersRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -852,14 +852,14 @@ func (a *NotificationApiService) SetChannelSubscribers(ctx context.Context, chan } // Execute executes the request -func (a *NotificationApiService) SetChannelSubscribersExecute(r NotificationApiSetChannelSubscribersRequest) (*http.Response, error) { +func (a *NotificationAPIService) SetChannelSubscribersExecute(r NotificationAPISetChannelSubscribersRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationApiService.SetChannelSubscribers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationAPIService.SetChannelSubscribers") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -918,12 +918,12 @@ func (a *NotificationApiService) SetChannelSubscribersExecute(r NotificationApiS return localVarHTTPResponse, nil } -type NotificationApiWsRequest struct { +type NotificationAPIWsRequest struct { ctx context.Context - ApiService *NotificationApiService + ApiService *NotificationAPIService } -func (r NotificationApiWsRequest) Execute() (*http.Response, error) { +func (r NotificationAPIWsRequest) Execute() (*http.Response, error) { return r.ApiService.WsExecute(r) } @@ -1286,24 +1286,24 @@ TextMessageとして各種イベントが`type`と`body`を持つJSONとして + `sound_id`: 削除されたサウンドのId @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return NotificationApiWsRequest + @return NotificationAPIWsRequest */ -func (a *NotificationApiService) Ws(ctx context.Context) NotificationApiWsRequest { - return NotificationApiWsRequest{ +func (a *NotificationAPIService) Ws(ctx context.Context) NotificationAPIWsRequest { + return NotificationAPIWsRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *NotificationApiService) WsExecute(r NotificationApiWsRequest) (*http.Response, error) { +func (a *NotificationAPIService) WsExecute(r NotificationAPIWsRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationApiService.Ws") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NotificationAPIService.Ws") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_oauth2.go b/api_oauth2.go index ad37c79..bdf9e01 100644 --- a/api_oauth2.go +++ b/api_oauth2.go @@ -19,21 +19,21 @@ import ( "strings" ) -// Oauth2ApiService Oauth2Api service -type Oauth2ApiService service +// Oauth2APIService Oauth2API service +type Oauth2APIService service -type Oauth2ApiCreateClientRequest struct { +type Oauth2APICreateClientRequest struct { ctx context.Context - ApiService *Oauth2ApiService + ApiService *Oauth2APIService postClientRequest *PostClientRequest } -func (r Oauth2ApiCreateClientRequest) PostClientRequest(postClientRequest PostClientRequest) Oauth2ApiCreateClientRequest { +func (r Oauth2APICreateClientRequest) PostClientRequest(postClientRequest PostClientRequest) Oauth2APICreateClientRequest { r.postClientRequest = &postClientRequest return r } -func (r Oauth2ApiCreateClientRequest) Execute() (*OAuth2ClientDetail, *http.Response, error) { +func (r Oauth2APICreateClientRequest) Execute() (*OAuth2ClientDetail, *http.Response, error) { return r.ApiService.CreateClientExecute(r) } @@ -43,10 +43,10 @@ CreateClient OAuth2クライアントを作成 OAuth2クライアントを作成します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return Oauth2ApiCreateClientRequest + @return Oauth2APICreateClientRequest */ -func (a *Oauth2ApiService) CreateClient(ctx context.Context) Oauth2ApiCreateClientRequest { - return Oauth2ApiCreateClientRequest{ +func (a *Oauth2APIService) CreateClient(ctx context.Context) Oauth2APICreateClientRequest { + return Oauth2APICreateClientRequest{ ApiService: a, ctx: ctx, } @@ -55,7 +55,7 @@ func (a *Oauth2ApiService) CreateClient(ctx context.Context) Oauth2ApiCreateClie // Execute executes the request // // @return OAuth2ClientDetail -func (a *Oauth2ApiService) CreateClientExecute(r Oauth2ApiCreateClientRequest) (*OAuth2ClientDetail, *http.Response, error) { +func (a *Oauth2APIService) CreateClientExecute(r Oauth2APICreateClientRequest) (*OAuth2ClientDetail, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -63,7 +63,7 @@ func (a *Oauth2ApiService) CreateClientExecute(r Oauth2ApiCreateClientRequest) ( localVarReturnValue *OAuth2ClientDetail ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2ApiService.CreateClient") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2APIService.CreateClient") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -130,13 +130,13 @@ func (a *Oauth2ApiService) CreateClientExecute(r Oauth2ApiCreateClientRequest) ( return localVarReturnValue, localVarHTTPResponse, nil } -type Oauth2ApiDeleteClientRequest struct { +type Oauth2APIDeleteClientRequest struct { ctx context.Context - ApiService *Oauth2ApiService + ApiService *Oauth2APIService clientId string } -func (r Oauth2ApiDeleteClientRequest) Execute() (*http.Response, error) { +func (r Oauth2APIDeleteClientRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteClientExecute(r) } @@ -148,10 +148,10 @@ DeleteClient OAuth2クライアントを削除 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param clientId OAuth2クライアントUUID - @return Oauth2ApiDeleteClientRequest + @return Oauth2APIDeleteClientRequest */ -func (a *Oauth2ApiService) DeleteClient(ctx context.Context, clientId string) Oauth2ApiDeleteClientRequest { - return Oauth2ApiDeleteClientRequest{ +func (a *Oauth2APIService) DeleteClient(ctx context.Context, clientId string) Oauth2APIDeleteClientRequest { + return Oauth2APIDeleteClientRequest{ ApiService: a, ctx: ctx, clientId: clientId, @@ -159,14 +159,14 @@ func (a *Oauth2ApiService) DeleteClient(ctx context.Context, clientId string) Oa } // Execute executes the request -func (a *Oauth2ApiService) DeleteClientExecute(r Oauth2ApiDeleteClientRequest) (*http.Response, error) { +func (a *Oauth2APIService) DeleteClientExecute(r Oauth2APIDeleteClientRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2ApiService.DeleteClient") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2APIService.DeleteClient") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -223,19 +223,19 @@ func (a *Oauth2ApiService) DeleteClientExecute(r Oauth2ApiDeleteClientRequest) ( return localVarHTTPResponse, nil } -type Oauth2ApiEditClientRequest struct { +type Oauth2APIEditClientRequest struct { ctx context.Context - ApiService *Oauth2ApiService + ApiService *Oauth2APIService clientId string patchClientRequest *PatchClientRequest } -func (r Oauth2ApiEditClientRequest) PatchClientRequest(patchClientRequest PatchClientRequest) Oauth2ApiEditClientRequest { +func (r Oauth2APIEditClientRequest) PatchClientRequest(patchClientRequest PatchClientRequest) Oauth2APIEditClientRequest { r.patchClientRequest = &patchClientRequest return r } -func (r Oauth2ApiEditClientRequest) Execute() (*http.Response, error) { +func (r Oauth2APIEditClientRequest) Execute() (*http.Response, error) { return r.ApiService.EditClientExecute(r) } @@ -248,10 +248,10 @@ EditClient OAuth2クライアント情報を変更 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param clientId OAuth2クライアントUUID - @return Oauth2ApiEditClientRequest + @return Oauth2APIEditClientRequest */ -func (a *Oauth2ApiService) EditClient(ctx context.Context, clientId string) Oauth2ApiEditClientRequest { - return Oauth2ApiEditClientRequest{ +func (a *Oauth2APIService) EditClient(ctx context.Context, clientId string) Oauth2APIEditClientRequest { + return Oauth2APIEditClientRequest{ ApiService: a, ctx: ctx, clientId: clientId, @@ -259,14 +259,14 @@ func (a *Oauth2ApiService) EditClient(ctx context.Context, clientId string) Oaut } // Execute executes the request -func (a *Oauth2ApiService) EditClientExecute(r Oauth2ApiEditClientRequest) (*http.Response, error) { +func (a *Oauth2APIService) EditClientExecute(r Oauth2APIEditClientRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2ApiService.EditClient") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2APIService.EditClient") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -325,20 +325,20 @@ func (a *Oauth2ApiService) EditClientExecute(r Oauth2ApiEditClientRequest) (*htt return localVarHTTPResponse, nil } -type Oauth2ApiGetClientRequest struct { +type Oauth2APIGetClientRequest struct { ctx context.Context - ApiService *Oauth2ApiService + ApiService *Oauth2APIService clientId string detail *bool } // 詳細情報を含めるかどうか -func (r Oauth2ApiGetClientRequest) Detail(detail bool) Oauth2ApiGetClientRequest { +func (r Oauth2APIGetClientRequest) Detail(detail bool) Oauth2APIGetClientRequest { r.detail = &detail return r } -func (r Oauth2ApiGetClientRequest) Execute() (*GetClient200Response, *http.Response, error) { +func (r Oauth2APIGetClientRequest) Execute() (*GetClient200Response, *http.Response, error) { return r.ApiService.GetClientExecute(r) } @@ -350,10 +350,10 @@ GetClient OAuth2クライアント情報を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param clientId OAuth2クライアントUUID - @return Oauth2ApiGetClientRequest + @return Oauth2APIGetClientRequest */ -func (a *Oauth2ApiService) GetClient(ctx context.Context, clientId string) Oauth2ApiGetClientRequest { - return Oauth2ApiGetClientRequest{ +func (a *Oauth2APIService) GetClient(ctx context.Context, clientId string) Oauth2APIGetClientRequest { + return Oauth2APIGetClientRequest{ ApiService: a, ctx: ctx, clientId: clientId, @@ -363,7 +363,7 @@ func (a *Oauth2ApiService) GetClient(ctx context.Context, clientId string) Oauth // Execute executes the request // // @return GetClient200Response -func (a *Oauth2ApiService) GetClientExecute(r Oauth2ApiGetClientRequest) (*GetClient200Response, *http.Response, error) { +func (a *Oauth2APIService) GetClientExecute(r Oauth2APIGetClientRequest) (*GetClient200Response, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -371,7 +371,7 @@ func (a *Oauth2ApiService) GetClientExecute(r Oauth2ApiGetClientRequest) (*GetCl localVarReturnValue *GetClient200Response ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2ApiService.GetClient") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2APIService.GetClient") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -384,7 +384,10 @@ func (a *Oauth2ApiService) GetClientExecute(r Oauth2ApiGetClientRequest) (*GetCl localVarFormParams := url.Values{} if r.detail != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "detail", r.detail, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "detail", r.detail, "form", "") + } else { + var defaultValue bool = false + r.detail = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -440,19 +443,19 @@ func (a *Oauth2ApiService) GetClientExecute(r Oauth2ApiGetClientRequest) (*GetCl return localVarReturnValue, localVarHTTPResponse, nil } -type Oauth2ApiGetClientsRequest struct { +type Oauth2APIGetClientsRequest struct { ctx context.Context - ApiService *Oauth2ApiService + ApiService *Oauth2APIService all *bool } // 全てのクライアントを取得するかどうか -func (r Oauth2ApiGetClientsRequest) All(all bool) Oauth2ApiGetClientsRequest { +func (r Oauth2APIGetClientsRequest) All(all bool) Oauth2APIGetClientsRequest { r.all = &all return r } -func (r Oauth2ApiGetClientsRequest) Execute() ([]OAuth2Client, *http.Response, error) { +func (r Oauth2APIGetClientsRequest) Execute() ([]OAuth2Client, *http.Response, error) { return r.ApiService.GetClientsExecute(r) } @@ -463,10 +466,10 @@ GetClients OAuth2クライアントのリストを取得 `all`が`true`の場合、全開発者の全クライアントのリストを返します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return Oauth2ApiGetClientsRequest + @return Oauth2APIGetClientsRequest */ -func (a *Oauth2ApiService) GetClients(ctx context.Context) Oauth2ApiGetClientsRequest { - return Oauth2ApiGetClientsRequest{ +func (a *Oauth2APIService) GetClients(ctx context.Context) Oauth2APIGetClientsRequest { + return Oauth2APIGetClientsRequest{ ApiService: a, ctx: ctx, } @@ -475,7 +478,7 @@ func (a *Oauth2ApiService) GetClients(ctx context.Context) Oauth2ApiGetClientsRe // Execute executes the request // // @return []OAuth2Client -func (a *Oauth2ApiService) GetClientsExecute(r Oauth2ApiGetClientsRequest) ([]OAuth2Client, *http.Response, error) { +func (a *Oauth2APIService) GetClientsExecute(r Oauth2APIGetClientsRequest) ([]OAuth2Client, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -483,7 +486,7 @@ func (a *Oauth2ApiService) GetClientsExecute(r Oauth2ApiGetClientsRequest) ([]OA localVarReturnValue []OAuth2Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2ApiService.GetClients") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2APIService.GetClients") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -495,7 +498,10 @@ func (a *Oauth2ApiService) GetClientsExecute(r Oauth2ApiGetClientsRequest) ([]OA localVarFormParams := url.Values{} if r.all != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "all", r.all, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "all", r.all, "form", "") + } else { + var defaultValue bool = false + r.all = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -551,12 +557,12 @@ func (a *Oauth2ApiService) GetClientsExecute(r Oauth2ApiGetClientsRequest) ([]OA return localVarReturnValue, localVarHTTPResponse, nil } -type Oauth2ApiGetMyTokensRequest struct { +type Oauth2APIGetMyTokensRequest struct { ctx context.Context - ApiService *Oauth2ApiService + ApiService *Oauth2APIService } -func (r Oauth2ApiGetMyTokensRequest) Execute() ([]ActiveOAuth2Token, *http.Response, error) { +func (r Oauth2APIGetMyTokensRequest) Execute() ([]ActiveOAuth2Token, *http.Response, error) { return r.ApiService.GetMyTokensExecute(r) } @@ -566,10 +572,10 @@ GetMyTokens 有効トークンのリストを取得 有効な自分に発行されたOAuth2トークンのリストを取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return Oauth2ApiGetMyTokensRequest + @return Oauth2APIGetMyTokensRequest */ -func (a *Oauth2ApiService) GetMyTokens(ctx context.Context) Oauth2ApiGetMyTokensRequest { - return Oauth2ApiGetMyTokensRequest{ +func (a *Oauth2APIService) GetMyTokens(ctx context.Context) Oauth2APIGetMyTokensRequest { + return Oauth2APIGetMyTokensRequest{ ApiService: a, ctx: ctx, } @@ -578,7 +584,7 @@ func (a *Oauth2ApiService) GetMyTokens(ctx context.Context) Oauth2ApiGetMyTokens // Execute executes the request // // @return []ActiveOAuth2Token -func (a *Oauth2ApiService) GetMyTokensExecute(r Oauth2ApiGetMyTokensRequest) ([]ActiveOAuth2Token, *http.Response, error) { +func (a *Oauth2APIService) GetMyTokensExecute(r Oauth2APIGetMyTokensRequest) ([]ActiveOAuth2Token, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -586,7 +592,7 @@ func (a *Oauth2ApiService) GetMyTokensExecute(r Oauth2ApiGetMyTokensRequest) ([] localVarReturnValue []ActiveOAuth2Token ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2ApiService.GetMyTokens") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2APIService.GetMyTokens") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -651,9 +657,9 @@ func (a *Oauth2ApiService) GetMyTokensExecute(r Oauth2ApiGetMyTokensRequest) ([] return localVarReturnValue, localVarHTTPResponse, nil } -type Oauth2ApiGetOAuth2AuthorizeRequest struct { +type Oauth2APIGetOAuth2AuthorizeRequest struct { ctx context.Context - ApiService *Oauth2ApiService + ApiService *Oauth2APIService clientId *string responseType *OAuth2ResponseType redirectUri *string @@ -665,52 +671,52 @@ type Oauth2ApiGetOAuth2AuthorizeRequest struct { prompt *OAuth2Prompt } -func (r Oauth2ApiGetOAuth2AuthorizeRequest) ClientId(clientId string) Oauth2ApiGetOAuth2AuthorizeRequest { +func (r Oauth2APIGetOAuth2AuthorizeRequest) ClientId(clientId string) Oauth2APIGetOAuth2AuthorizeRequest { r.clientId = &clientId return r } -func (r Oauth2ApiGetOAuth2AuthorizeRequest) ResponseType(responseType OAuth2ResponseType) Oauth2ApiGetOAuth2AuthorizeRequest { +func (r Oauth2APIGetOAuth2AuthorizeRequest) ResponseType(responseType OAuth2ResponseType) Oauth2APIGetOAuth2AuthorizeRequest { r.responseType = &responseType return r } -func (r Oauth2ApiGetOAuth2AuthorizeRequest) RedirectUri(redirectUri string) Oauth2ApiGetOAuth2AuthorizeRequest { +func (r Oauth2APIGetOAuth2AuthorizeRequest) RedirectUri(redirectUri string) Oauth2APIGetOAuth2AuthorizeRequest { r.redirectUri = &redirectUri return r } -func (r Oauth2ApiGetOAuth2AuthorizeRequest) Scope(scope string) Oauth2ApiGetOAuth2AuthorizeRequest { +func (r Oauth2APIGetOAuth2AuthorizeRequest) Scope(scope string) Oauth2APIGetOAuth2AuthorizeRequest { r.scope = &scope return r } -func (r Oauth2ApiGetOAuth2AuthorizeRequest) State(state string) Oauth2ApiGetOAuth2AuthorizeRequest { +func (r Oauth2APIGetOAuth2AuthorizeRequest) State(state string) Oauth2APIGetOAuth2AuthorizeRequest { r.state = &state return r } -func (r Oauth2ApiGetOAuth2AuthorizeRequest) CodeChallenge(codeChallenge string) Oauth2ApiGetOAuth2AuthorizeRequest { +func (r Oauth2APIGetOAuth2AuthorizeRequest) CodeChallenge(codeChallenge string) Oauth2APIGetOAuth2AuthorizeRequest { r.codeChallenge = &codeChallenge return r } -func (r Oauth2ApiGetOAuth2AuthorizeRequest) CodeChallengeMethod(codeChallengeMethod string) Oauth2ApiGetOAuth2AuthorizeRequest { +func (r Oauth2APIGetOAuth2AuthorizeRequest) CodeChallengeMethod(codeChallengeMethod string) Oauth2APIGetOAuth2AuthorizeRequest { r.codeChallengeMethod = &codeChallengeMethod return r } -func (r Oauth2ApiGetOAuth2AuthorizeRequest) Nonce(nonce string) Oauth2ApiGetOAuth2AuthorizeRequest { +func (r Oauth2APIGetOAuth2AuthorizeRequest) Nonce(nonce string) Oauth2APIGetOAuth2AuthorizeRequest { r.nonce = &nonce return r } -func (r Oauth2ApiGetOAuth2AuthorizeRequest) Prompt(prompt OAuth2Prompt) Oauth2ApiGetOAuth2AuthorizeRequest { +func (r Oauth2APIGetOAuth2AuthorizeRequest) Prompt(prompt OAuth2Prompt) Oauth2APIGetOAuth2AuthorizeRequest { r.prompt = &prompt return r } -func (r Oauth2ApiGetOAuth2AuthorizeRequest) Execute() (*http.Response, error) { +func (r Oauth2APIGetOAuth2AuthorizeRequest) Execute() (*http.Response, error) { return r.ApiService.GetOAuth2AuthorizeExecute(r) } @@ -720,24 +726,24 @@ GetOAuth2Authorize OAuth2 認可エンドポイント OAuth2 認可エンドポイント @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return Oauth2ApiGetOAuth2AuthorizeRequest + @return Oauth2APIGetOAuth2AuthorizeRequest */ -func (a *Oauth2ApiService) GetOAuth2Authorize(ctx context.Context) Oauth2ApiGetOAuth2AuthorizeRequest { - return Oauth2ApiGetOAuth2AuthorizeRequest{ +func (a *Oauth2APIService) GetOAuth2Authorize(ctx context.Context) Oauth2APIGetOAuth2AuthorizeRequest { + return Oauth2APIGetOAuth2AuthorizeRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *Oauth2ApiService) GetOAuth2AuthorizeExecute(r Oauth2ApiGetOAuth2AuthorizeRequest) (*http.Response, error) { +func (a *Oauth2APIService) GetOAuth2AuthorizeExecute(r Oauth2APIGetOAuth2AuthorizeRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2ApiService.GetOAuth2Authorize") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2APIService.GetOAuth2Authorize") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -752,29 +758,29 @@ func (a *Oauth2ApiService) GetOAuth2AuthorizeExecute(r Oauth2ApiGetOAuth2Authori } if r.responseType != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "response_type", r.responseType, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "response_type", r.responseType, "form", "") } - parameterAddToHeaderOrQuery(localVarQueryParams, "client_id", r.clientId, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "client_id", r.clientId, "form", "") if r.redirectUri != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "redirect_uri", r.redirectUri, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "redirect_uri", r.redirectUri, "form", "") } if r.scope != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "scope", r.scope, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "scope", r.scope, "form", "") } if r.state != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "state", r.state, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "state", r.state, "form", "") } if r.codeChallenge != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "code_challenge", r.codeChallenge, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "code_challenge", r.codeChallenge, "form", "") } if r.codeChallengeMethod != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "code_challenge_method", r.codeChallengeMethod, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "code_challenge_method", r.codeChallengeMethod, "form", "") } if r.nonce != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "nonce", r.nonce, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "nonce", r.nonce, "form", "") } if r.prompt != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "prompt", r.prompt, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "prompt", r.prompt, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -821,9 +827,9 @@ func (a *Oauth2ApiService) GetOAuth2AuthorizeExecute(r Oauth2ApiGetOAuth2Authori return localVarHTTPResponse, nil } -type Oauth2ApiPostOAuth2AuthorizeRequest struct { +type Oauth2APIPostOAuth2AuthorizeRequest struct { ctx context.Context - ApiService *Oauth2ApiService + ApiService *Oauth2APIService clientId *string responseType *OAuth2ResponseType redirectUri *string @@ -835,52 +841,52 @@ type Oauth2ApiPostOAuth2AuthorizeRequest struct { prompt *OAuth2Prompt } -func (r Oauth2ApiPostOAuth2AuthorizeRequest) ClientId(clientId string) Oauth2ApiPostOAuth2AuthorizeRequest { +func (r Oauth2APIPostOAuth2AuthorizeRequest) ClientId(clientId string) Oauth2APIPostOAuth2AuthorizeRequest { r.clientId = &clientId return r } -func (r Oauth2ApiPostOAuth2AuthorizeRequest) ResponseType(responseType OAuth2ResponseType) Oauth2ApiPostOAuth2AuthorizeRequest { +func (r Oauth2APIPostOAuth2AuthorizeRequest) ResponseType(responseType OAuth2ResponseType) Oauth2APIPostOAuth2AuthorizeRequest { r.responseType = &responseType return r } -func (r Oauth2ApiPostOAuth2AuthorizeRequest) RedirectUri(redirectUri string) Oauth2ApiPostOAuth2AuthorizeRequest { +func (r Oauth2APIPostOAuth2AuthorizeRequest) RedirectUri(redirectUri string) Oauth2APIPostOAuth2AuthorizeRequest { r.redirectUri = &redirectUri return r } -func (r Oauth2ApiPostOAuth2AuthorizeRequest) Scope(scope string) Oauth2ApiPostOAuth2AuthorizeRequest { +func (r Oauth2APIPostOAuth2AuthorizeRequest) Scope(scope string) Oauth2APIPostOAuth2AuthorizeRequest { r.scope = &scope return r } -func (r Oauth2ApiPostOAuth2AuthorizeRequest) State(state string) Oauth2ApiPostOAuth2AuthorizeRequest { +func (r Oauth2APIPostOAuth2AuthorizeRequest) State(state string) Oauth2APIPostOAuth2AuthorizeRequest { r.state = &state return r } -func (r Oauth2ApiPostOAuth2AuthorizeRequest) CodeChallenge(codeChallenge string) Oauth2ApiPostOAuth2AuthorizeRequest { +func (r Oauth2APIPostOAuth2AuthorizeRequest) CodeChallenge(codeChallenge string) Oauth2APIPostOAuth2AuthorizeRequest { r.codeChallenge = &codeChallenge return r } -func (r Oauth2ApiPostOAuth2AuthorizeRequest) CodeChallengeMethod(codeChallengeMethod string) Oauth2ApiPostOAuth2AuthorizeRequest { +func (r Oauth2APIPostOAuth2AuthorizeRequest) CodeChallengeMethod(codeChallengeMethod string) Oauth2APIPostOAuth2AuthorizeRequest { r.codeChallengeMethod = &codeChallengeMethod return r } -func (r Oauth2ApiPostOAuth2AuthorizeRequest) Nonce(nonce string) Oauth2ApiPostOAuth2AuthorizeRequest { +func (r Oauth2APIPostOAuth2AuthorizeRequest) Nonce(nonce string) Oauth2APIPostOAuth2AuthorizeRequest { r.nonce = &nonce return r } -func (r Oauth2ApiPostOAuth2AuthorizeRequest) Prompt(prompt OAuth2Prompt) Oauth2ApiPostOAuth2AuthorizeRequest { +func (r Oauth2APIPostOAuth2AuthorizeRequest) Prompt(prompt OAuth2Prompt) Oauth2APIPostOAuth2AuthorizeRequest { r.prompt = &prompt return r } -func (r Oauth2ApiPostOAuth2AuthorizeRequest) Execute() (*http.Response, error) { +func (r Oauth2APIPostOAuth2AuthorizeRequest) Execute() (*http.Response, error) { return r.ApiService.PostOAuth2AuthorizeExecute(r) } @@ -890,24 +896,24 @@ PostOAuth2Authorize OAuth2 認可エンドポイント OAuth2 認可エンドポイント @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return Oauth2ApiPostOAuth2AuthorizeRequest + @return Oauth2APIPostOAuth2AuthorizeRequest */ -func (a *Oauth2ApiService) PostOAuth2Authorize(ctx context.Context) Oauth2ApiPostOAuth2AuthorizeRequest { - return Oauth2ApiPostOAuth2AuthorizeRequest{ +func (a *Oauth2APIService) PostOAuth2Authorize(ctx context.Context) Oauth2APIPostOAuth2AuthorizeRequest { + return Oauth2APIPostOAuth2AuthorizeRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *Oauth2ApiService) PostOAuth2AuthorizeExecute(r Oauth2ApiPostOAuth2AuthorizeRequest) (*http.Response, error) { +func (a *Oauth2APIService) PostOAuth2AuthorizeExecute(r Oauth2APIPostOAuth2AuthorizeRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2ApiService.PostOAuth2Authorize") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2APIService.PostOAuth2Authorize") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -939,29 +945,29 @@ func (a *Oauth2ApiService) PostOAuth2AuthorizeExecute(r Oauth2ApiPostOAuth2Autho localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.responseType != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "response_type", r.responseType, "") + parameterAddToHeaderOrQuery(localVarFormParams, "response_type", r.responseType, "", "") } - parameterAddToHeaderOrQuery(localVarFormParams, "client_id", r.clientId, "") + parameterAddToHeaderOrQuery(localVarFormParams, "client_id", r.clientId, "", "") if r.redirectUri != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "redirect_uri", r.redirectUri, "") + parameterAddToHeaderOrQuery(localVarFormParams, "redirect_uri", r.redirectUri, "", "") } if r.scope != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "scope", r.scope, "") + parameterAddToHeaderOrQuery(localVarFormParams, "scope", r.scope, "", "") } if r.state != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "state", r.state, "") + parameterAddToHeaderOrQuery(localVarFormParams, "state", r.state, "", "") } if r.codeChallenge != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "code_challenge", r.codeChallenge, "") + parameterAddToHeaderOrQuery(localVarFormParams, "code_challenge", r.codeChallenge, "", "") } if r.codeChallengeMethod != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "code_challenge_method", r.codeChallengeMethod, "") + parameterAddToHeaderOrQuery(localVarFormParams, "code_challenge_method", r.codeChallengeMethod, "", "") } if r.nonce != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "nonce", r.nonce, "") + parameterAddToHeaderOrQuery(localVarFormParams, "nonce", r.nonce, "", "") } if r.prompt != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "prompt", r.prompt, "") + parameterAddToHeaderOrQuery(localVarFormParams, "prompt", r.prompt, "", "") } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { @@ -991,19 +997,19 @@ func (a *Oauth2ApiService) PostOAuth2AuthorizeExecute(r Oauth2ApiPostOAuth2Autho return localVarHTTPResponse, nil } -type Oauth2ApiPostOAuth2AuthorizeDecideRequest struct { +type Oauth2APIPostOAuth2AuthorizeDecideRequest struct { ctx context.Context - ApiService *Oauth2ApiService + ApiService *Oauth2APIService submit *string } // 承諾する場合は\\\"approve\\\" -func (r Oauth2ApiPostOAuth2AuthorizeDecideRequest) Submit(submit string) Oauth2ApiPostOAuth2AuthorizeDecideRequest { +func (r Oauth2APIPostOAuth2AuthorizeDecideRequest) Submit(submit string) Oauth2APIPostOAuth2AuthorizeDecideRequest { r.submit = &submit return r } -func (r Oauth2ApiPostOAuth2AuthorizeDecideRequest) Execute() (*http.Response, error) { +func (r Oauth2APIPostOAuth2AuthorizeDecideRequest) Execute() (*http.Response, error) { return r.ApiService.PostOAuth2AuthorizeDecideExecute(r) } @@ -1013,24 +1019,24 @@ PostOAuth2AuthorizeDecide OAuth2 認可承諾API OAuth2 認可承諾 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return Oauth2ApiPostOAuth2AuthorizeDecideRequest + @return Oauth2APIPostOAuth2AuthorizeDecideRequest */ -func (a *Oauth2ApiService) PostOAuth2AuthorizeDecide(ctx context.Context) Oauth2ApiPostOAuth2AuthorizeDecideRequest { - return Oauth2ApiPostOAuth2AuthorizeDecideRequest{ +func (a *Oauth2APIService) PostOAuth2AuthorizeDecide(ctx context.Context) Oauth2APIPostOAuth2AuthorizeDecideRequest { + return Oauth2APIPostOAuth2AuthorizeDecideRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *Oauth2ApiService) PostOAuth2AuthorizeDecideExecute(r Oauth2ApiPostOAuth2AuthorizeDecideRequest) (*http.Response, error) { +func (a *Oauth2APIService) PostOAuth2AuthorizeDecideExecute(r Oauth2APIPostOAuth2AuthorizeDecideRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2ApiService.PostOAuth2AuthorizeDecide") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2APIService.PostOAuth2AuthorizeDecide") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -1061,7 +1067,7 @@ func (a *Oauth2ApiService) PostOAuth2AuthorizeDecideExecute(r Oauth2ApiPostOAuth if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - parameterAddToHeaderOrQuery(localVarFormParams, "submit", r.submit, "") + parameterAddToHeaderOrQuery(localVarFormParams, "submit", r.submit, "", "") req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err @@ -1090,9 +1096,9 @@ func (a *Oauth2ApiService) PostOAuth2AuthorizeDecideExecute(r Oauth2ApiPostOAuth return localVarHTTPResponse, nil } -type Oauth2ApiPostOAuth2TokenRequest struct { +type Oauth2APIPostOAuth2TokenRequest struct { ctx context.Context - ApiService *Oauth2ApiService + ApiService *Oauth2APIService grantType *string code *string redirectUri *string @@ -1105,57 +1111,57 @@ type Oauth2ApiPostOAuth2TokenRequest struct { clientSecret *string } -func (r Oauth2ApiPostOAuth2TokenRequest) GrantType(grantType string) Oauth2ApiPostOAuth2TokenRequest { +func (r Oauth2APIPostOAuth2TokenRequest) GrantType(grantType string) Oauth2APIPostOAuth2TokenRequest { r.grantType = &grantType return r } -func (r Oauth2ApiPostOAuth2TokenRequest) Code(code string) Oauth2ApiPostOAuth2TokenRequest { +func (r Oauth2APIPostOAuth2TokenRequest) Code(code string) Oauth2APIPostOAuth2TokenRequest { r.code = &code return r } -func (r Oauth2ApiPostOAuth2TokenRequest) RedirectUri(redirectUri string) Oauth2ApiPostOAuth2TokenRequest { +func (r Oauth2APIPostOAuth2TokenRequest) RedirectUri(redirectUri string) Oauth2APIPostOAuth2TokenRequest { r.redirectUri = &redirectUri return r } -func (r Oauth2ApiPostOAuth2TokenRequest) ClientId(clientId string) Oauth2ApiPostOAuth2TokenRequest { +func (r Oauth2APIPostOAuth2TokenRequest) ClientId(clientId string) Oauth2APIPostOAuth2TokenRequest { r.clientId = &clientId return r } -func (r Oauth2ApiPostOAuth2TokenRequest) CodeVerifier(codeVerifier string) Oauth2ApiPostOAuth2TokenRequest { +func (r Oauth2APIPostOAuth2TokenRequest) CodeVerifier(codeVerifier string) Oauth2APIPostOAuth2TokenRequest { r.codeVerifier = &codeVerifier return r } -func (r Oauth2ApiPostOAuth2TokenRequest) Username(username string) Oauth2ApiPostOAuth2TokenRequest { +func (r Oauth2APIPostOAuth2TokenRequest) Username(username string) Oauth2APIPostOAuth2TokenRequest { r.username = &username return r } -func (r Oauth2ApiPostOAuth2TokenRequest) Password(password string) Oauth2ApiPostOAuth2TokenRequest { +func (r Oauth2APIPostOAuth2TokenRequest) Password(password string) Oauth2APIPostOAuth2TokenRequest { r.password = &password return r } -func (r Oauth2ApiPostOAuth2TokenRequest) Scope(scope string) Oauth2ApiPostOAuth2TokenRequest { +func (r Oauth2APIPostOAuth2TokenRequest) Scope(scope string) Oauth2APIPostOAuth2TokenRequest { r.scope = &scope return r } -func (r Oauth2ApiPostOAuth2TokenRequest) RefreshToken(refreshToken string) Oauth2ApiPostOAuth2TokenRequest { +func (r Oauth2APIPostOAuth2TokenRequest) RefreshToken(refreshToken string) Oauth2APIPostOAuth2TokenRequest { r.refreshToken = &refreshToken return r } -func (r Oauth2ApiPostOAuth2TokenRequest) ClientSecret(clientSecret string) Oauth2ApiPostOAuth2TokenRequest { +func (r Oauth2APIPostOAuth2TokenRequest) ClientSecret(clientSecret string) Oauth2APIPostOAuth2TokenRequest { r.clientSecret = &clientSecret return r } -func (r Oauth2ApiPostOAuth2TokenRequest) Execute() (*OAuth2Token, *http.Response, error) { +func (r Oauth2APIPostOAuth2TokenRequest) Execute() (*OAuth2Token, *http.Response, error) { return r.ApiService.PostOAuth2TokenExecute(r) } @@ -1165,10 +1171,10 @@ PostOAuth2Token OAuth2 トークンエンドポイント OAuth2 トークンエンドポイント @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return Oauth2ApiPostOAuth2TokenRequest + @return Oauth2APIPostOAuth2TokenRequest */ -func (a *Oauth2ApiService) PostOAuth2Token(ctx context.Context) Oauth2ApiPostOAuth2TokenRequest { - return Oauth2ApiPostOAuth2TokenRequest{ +func (a *Oauth2APIService) PostOAuth2Token(ctx context.Context) Oauth2APIPostOAuth2TokenRequest { + return Oauth2APIPostOAuth2TokenRequest{ ApiService: a, ctx: ctx, } @@ -1177,7 +1183,7 @@ func (a *Oauth2ApiService) PostOAuth2Token(ctx context.Context) Oauth2ApiPostOAu // Execute executes the request // // @return OAuth2Token -func (a *Oauth2ApiService) PostOAuth2TokenExecute(r Oauth2ApiPostOAuth2TokenRequest) (*OAuth2Token, *http.Response, error) { +func (a *Oauth2APIService) PostOAuth2TokenExecute(r Oauth2APIPostOAuth2TokenRequest) (*OAuth2Token, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -1185,7 +1191,7 @@ func (a *Oauth2ApiService) PostOAuth2TokenExecute(r Oauth2ApiPostOAuth2TokenRequ localVarReturnValue *OAuth2Token ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2ApiService.PostOAuth2Token") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2APIService.PostOAuth2Token") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1216,33 +1222,33 @@ func (a *Oauth2ApiService) PostOAuth2TokenExecute(r Oauth2ApiPostOAuth2TokenRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - parameterAddToHeaderOrQuery(localVarFormParams, "grant_type", r.grantType, "") + parameterAddToHeaderOrQuery(localVarFormParams, "grant_type", r.grantType, "", "") if r.code != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "code", r.code, "") + parameterAddToHeaderOrQuery(localVarFormParams, "code", r.code, "", "") } if r.redirectUri != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "redirect_uri", r.redirectUri, "") + parameterAddToHeaderOrQuery(localVarFormParams, "redirect_uri", r.redirectUri, "", "") } if r.clientId != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "client_id", r.clientId, "") + parameterAddToHeaderOrQuery(localVarFormParams, "client_id", r.clientId, "", "") } if r.codeVerifier != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "code_verifier", r.codeVerifier, "") + parameterAddToHeaderOrQuery(localVarFormParams, "code_verifier", r.codeVerifier, "", "") } if r.username != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "username", r.username, "") + parameterAddToHeaderOrQuery(localVarFormParams, "username", r.username, "", "") } if r.password != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "password", r.password, "") + parameterAddToHeaderOrQuery(localVarFormParams, "password", r.password, "", "") } if r.scope != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "scope", r.scope, "") + parameterAddToHeaderOrQuery(localVarFormParams, "scope", r.scope, "", "") } if r.refreshToken != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "refresh_token", r.refreshToken, "") + parameterAddToHeaderOrQuery(localVarFormParams, "refresh_token", r.refreshToken, "", "") } if r.clientSecret != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "client_secret", r.clientSecret, "") + parameterAddToHeaderOrQuery(localVarFormParams, "client_secret", r.clientSecret, "", "") } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { @@ -1281,13 +1287,13 @@ func (a *Oauth2ApiService) PostOAuth2TokenExecute(r Oauth2ApiPostOAuth2TokenRequ return localVarReturnValue, localVarHTTPResponse, nil } -type Oauth2ApiRevokeClientTokensRequest struct { +type Oauth2APIRevokeClientTokensRequest struct { ctx context.Context - ApiService *Oauth2ApiService + ApiService *Oauth2APIService clientId string } -func (r Oauth2ApiRevokeClientTokensRequest) Execute() (*http.Response, error) { +func (r Oauth2APIRevokeClientTokensRequest) Execute() (*http.Response, error) { return r.ApiService.RevokeClientTokensExecute(r) } @@ -1298,10 +1304,10 @@ RevokeClientTokens OAuthクライアントのトークンを削除 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param clientId OAuth2クライアントUUID - @return Oauth2ApiRevokeClientTokensRequest + @return Oauth2APIRevokeClientTokensRequest */ -func (a *Oauth2ApiService) RevokeClientTokens(ctx context.Context, clientId string) Oauth2ApiRevokeClientTokensRequest { - return Oauth2ApiRevokeClientTokensRequest{ +func (a *Oauth2APIService) RevokeClientTokens(ctx context.Context, clientId string) Oauth2APIRevokeClientTokensRequest { + return Oauth2APIRevokeClientTokensRequest{ ApiService: a, ctx: ctx, clientId: clientId, @@ -1309,14 +1315,14 @@ func (a *Oauth2ApiService) RevokeClientTokens(ctx context.Context, clientId stri } // Execute executes the request -func (a *Oauth2ApiService) RevokeClientTokensExecute(r Oauth2ApiRevokeClientTokensRequest) (*http.Response, error) { +func (a *Oauth2APIService) RevokeClientTokensExecute(r Oauth2APIRevokeClientTokensRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2ApiService.RevokeClientTokens") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2APIService.RevokeClientTokens") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -1373,13 +1379,13 @@ func (a *Oauth2ApiService) RevokeClientTokensExecute(r Oauth2ApiRevokeClientToke return localVarHTTPResponse, nil } -type Oauth2ApiRevokeMyTokenRequest struct { +type Oauth2APIRevokeMyTokenRequest struct { ctx context.Context - ApiService *Oauth2ApiService + ApiService *Oauth2APIService tokenId string } -func (r Oauth2ApiRevokeMyTokenRequest) Execute() (*http.Response, error) { +func (r Oauth2APIRevokeMyTokenRequest) Execute() (*http.Response, error) { return r.ApiService.RevokeMyTokenExecute(r) } @@ -1390,10 +1396,10 @@ RevokeMyToken トークンの認可を取り消す @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param tokenId OAuth2トークンUUID - @return Oauth2ApiRevokeMyTokenRequest + @return Oauth2APIRevokeMyTokenRequest */ -func (a *Oauth2ApiService) RevokeMyToken(ctx context.Context, tokenId string) Oauth2ApiRevokeMyTokenRequest { - return Oauth2ApiRevokeMyTokenRequest{ +func (a *Oauth2APIService) RevokeMyToken(ctx context.Context, tokenId string) Oauth2APIRevokeMyTokenRequest { + return Oauth2APIRevokeMyTokenRequest{ ApiService: a, ctx: ctx, tokenId: tokenId, @@ -1401,14 +1407,14 @@ func (a *Oauth2ApiService) RevokeMyToken(ctx context.Context, tokenId string) Oa } // Execute executes the request -func (a *Oauth2ApiService) RevokeMyTokenExecute(r Oauth2ApiRevokeMyTokenRequest) (*http.Response, error) { +func (a *Oauth2APIService) RevokeMyTokenExecute(r Oauth2APIRevokeMyTokenRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2ApiService.RevokeMyToken") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2APIService.RevokeMyToken") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -1465,19 +1471,19 @@ func (a *Oauth2ApiService) RevokeMyTokenExecute(r Oauth2ApiRevokeMyTokenRequest) return localVarHTTPResponse, nil } -type Oauth2ApiRevokeOAuth2TokenRequest struct { +type Oauth2APIRevokeOAuth2TokenRequest struct { ctx context.Context - ApiService *Oauth2ApiService + ApiService *Oauth2APIService token *string } // 無効化するOAuth2トークンまたはOAuth2リフレッシュトークン -func (r Oauth2ApiRevokeOAuth2TokenRequest) Token(token string) Oauth2ApiRevokeOAuth2TokenRequest { +func (r Oauth2APIRevokeOAuth2TokenRequest) Token(token string) Oauth2APIRevokeOAuth2TokenRequest { r.token = &token return r } -func (r Oauth2ApiRevokeOAuth2TokenRequest) Execute() (*http.Response, error) { +func (r Oauth2APIRevokeOAuth2TokenRequest) Execute() (*http.Response, error) { return r.ApiService.RevokeOAuth2TokenExecute(r) } @@ -1487,24 +1493,24 @@ RevokeOAuth2Token OAuth2 トークン無効化エンドポイント OAuth2 トークン無効化エンドポイント @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return Oauth2ApiRevokeOAuth2TokenRequest + @return Oauth2APIRevokeOAuth2TokenRequest */ -func (a *Oauth2ApiService) RevokeOAuth2Token(ctx context.Context) Oauth2ApiRevokeOAuth2TokenRequest { - return Oauth2ApiRevokeOAuth2TokenRequest{ +func (a *Oauth2APIService) RevokeOAuth2Token(ctx context.Context) Oauth2APIRevokeOAuth2TokenRequest { + return Oauth2APIRevokeOAuth2TokenRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *Oauth2ApiService) RevokeOAuth2TokenExecute(r Oauth2ApiRevokeOAuth2TokenRequest) (*http.Response, error) { +func (a *Oauth2APIService) RevokeOAuth2TokenExecute(r Oauth2APIRevokeOAuth2TokenRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2ApiService.RevokeOAuth2Token") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "Oauth2APIService.RevokeOAuth2Token") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -1535,7 +1541,7 @@ func (a *Oauth2ApiService) RevokeOAuth2TokenExecute(r Oauth2ApiRevokeOAuth2Token if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - parameterAddToHeaderOrQuery(localVarFormParams, "token", r.token, "") + parameterAddToHeaderOrQuery(localVarFormParams, "token", r.token, "", "") req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err diff --git a/api_ogp.go b/api_ogp.go index 2cfa267..e7095fc 100644 --- a/api_ogp.go +++ b/api_ogp.go @@ -18,22 +18,22 @@ import ( "net/url" ) -// OgpApiService OgpApi service -type OgpApiService service +// OgpAPIService OgpAPI service +type OgpAPIService service -type OgpApiDeleteOgpCacheRequest struct { +type OgpAPIDeleteOgpCacheRequest struct { ctx context.Context - ApiService *OgpApiService + ApiService *OgpAPIService url *string } // OGPのキャッシュを削除したいURL -func (r OgpApiDeleteOgpCacheRequest) Url(url string) OgpApiDeleteOgpCacheRequest { +func (r OgpAPIDeleteOgpCacheRequest) Url(url string) OgpAPIDeleteOgpCacheRequest { r.url = &url return r } -func (r OgpApiDeleteOgpCacheRequest) Execute() (*http.Response, error) { +func (r OgpAPIDeleteOgpCacheRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteOgpCacheExecute(r) } @@ -43,24 +43,24 @@ DeleteOgpCache OGP情報のキャッシュを削除 指定されたURLのOGP情報のキャッシュを削除します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return OgpApiDeleteOgpCacheRequest + @return OgpAPIDeleteOgpCacheRequest */ -func (a *OgpApiService) DeleteOgpCache(ctx context.Context) OgpApiDeleteOgpCacheRequest { - return OgpApiDeleteOgpCacheRequest{ +func (a *OgpAPIService) DeleteOgpCache(ctx context.Context) OgpAPIDeleteOgpCacheRequest { + return OgpAPIDeleteOgpCacheRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *OgpApiService) DeleteOgpCacheExecute(r OgpApiDeleteOgpCacheRequest) (*http.Response, error) { +func (a *OgpAPIService) DeleteOgpCacheExecute(r OgpAPIDeleteOgpCacheRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OgpApiService.DeleteOgpCache") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OgpAPIService.DeleteOgpCache") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -74,7 +74,7 @@ func (a *OgpApiService) DeleteOgpCacheExecute(r OgpApiDeleteOgpCacheRequest) (*h return nil, reportError("url is required and must be specified") } - parameterAddToHeaderOrQuery(localVarQueryParams, "url", r.url, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "url", r.url, "form", "") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -120,19 +120,19 @@ func (a *OgpApiService) DeleteOgpCacheExecute(r OgpApiDeleteOgpCacheRequest) (*h return localVarHTTPResponse, nil } -type OgpApiGetOgpRequest struct { +type OgpAPIGetOgpRequest struct { ctx context.Context - ApiService *OgpApiService + ApiService *OgpAPIService url *string } // OGPを取得したいURL -func (r OgpApiGetOgpRequest) Url(url string) OgpApiGetOgpRequest { +func (r OgpAPIGetOgpRequest) Url(url string) OgpAPIGetOgpRequest { r.url = &url return r } -func (r OgpApiGetOgpRequest) Execute() (*Ogp, *http.Response, error) { +func (r OgpAPIGetOgpRequest) Execute() (*Ogp, *http.Response, error) { return r.ApiService.GetOgpExecute(r) } @@ -143,10 +143,10 @@ GetOgp OGP情報を取得 指定されたURLに対するOGP情報が見つからなかった場合、typeがemptyに設定された空のOGP情報を返します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return OgpApiGetOgpRequest + @return OgpAPIGetOgpRequest */ -func (a *OgpApiService) GetOgp(ctx context.Context) OgpApiGetOgpRequest { - return OgpApiGetOgpRequest{ +func (a *OgpAPIService) GetOgp(ctx context.Context) OgpAPIGetOgpRequest { + return OgpAPIGetOgpRequest{ ApiService: a, ctx: ctx, } @@ -155,7 +155,7 @@ func (a *OgpApiService) GetOgp(ctx context.Context) OgpApiGetOgpRequest { // Execute executes the request // // @return Ogp -func (a *OgpApiService) GetOgpExecute(r OgpApiGetOgpRequest) (*Ogp, *http.Response, error) { +func (a *OgpAPIService) GetOgpExecute(r OgpAPIGetOgpRequest) (*Ogp, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -163,7 +163,7 @@ func (a *OgpApiService) GetOgpExecute(r OgpApiGetOgpRequest) (*Ogp, *http.Respon localVarReturnValue *Ogp ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OgpApiService.GetOgp") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OgpAPIService.GetOgp") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -177,7 +177,7 @@ func (a *OgpApiService) GetOgpExecute(r OgpApiGetOgpRequest) (*Ogp, *http.Respon return localVarReturnValue, nil, reportError("url is required and must be specified") } - parameterAddToHeaderOrQuery(localVarQueryParams, "url", r.url, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "url", r.url, "form", "") // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/api_pin.go b/api_pin.go index d90a8cc..a44fc5c 100644 --- a/api_pin.go +++ b/api_pin.go @@ -19,16 +19,16 @@ import ( "strings" ) -// PinApiService PinApi service -type PinApiService service +// PinAPIService PinAPI service +type PinAPIService service -type PinApiCreatePinRequest struct { +type PinAPICreatePinRequest struct { ctx context.Context - ApiService *PinApiService + ApiService *PinAPIService messageId string } -func (r PinApiCreatePinRequest) Execute() (*MessagePin, *http.Response, error) { +func (r PinAPICreatePinRequest) Execute() (*MessagePin, *http.Response, error) { return r.ApiService.CreatePinExecute(r) } @@ -40,10 +40,10 @@ CreatePin ピン留めする @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID - @return PinApiCreatePinRequest + @return PinAPICreatePinRequest */ -func (a *PinApiService) CreatePin(ctx context.Context, messageId string) PinApiCreatePinRequest { - return PinApiCreatePinRequest{ +func (a *PinAPIService) CreatePin(ctx context.Context, messageId string) PinAPICreatePinRequest { + return PinAPICreatePinRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -53,7 +53,7 @@ func (a *PinApiService) CreatePin(ctx context.Context, messageId string) PinApiC // Execute executes the request // // @return MessagePin -func (a *PinApiService) CreatePinExecute(r PinApiCreatePinRequest) (*MessagePin, *http.Response, error) { +func (a *PinAPIService) CreatePinExecute(r PinAPICreatePinRequest) (*MessagePin, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -61,7 +61,7 @@ func (a *PinApiService) CreatePinExecute(r PinApiCreatePinRequest) (*MessagePin, localVarReturnValue *MessagePin ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PinApiService.CreatePin") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PinAPIService.CreatePin") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -127,13 +127,13 @@ func (a *PinApiService) CreatePinExecute(r PinApiCreatePinRequest) (*MessagePin, return localVarReturnValue, localVarHTTPResponse, nil } -type PinApiGetChannelPinsRequest struct { +type PinAPIGetChannelPinsRequest struct { ctx context.Context - ApiService *PinApiService + ApiService *PinAPIService channelId string } -func (r PinApiGetChannelPinsRequest) Execute() ([]Pin, *http.Response, error) { +func (r PinAPIGetChannelPinsRequest) Execute() ([]Pin, *http.Response, error) { return r.ApiService.GetChannelPinsExecute(r) } @@ -144,10 +144,10 @@ GetChannelPins チャンネルピンのリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return PinApiGetChannelPinsRequest + @return PinAPIGetChannelPinsRequest */ -func (a *PinApiService) GetChannelPins(ctx context.Context, channelId string) PinApiGetChannelPinsRequest { - return PinApiGetChannelPinsRequest{ +func (a *PinAPIService) GetChannelPins(ctx context.Context, channelId string) PinAPIGetChannelPinsRequest { + return PinAPIGetChannelPinsRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -157,7 +157,7 @@ func (a *PinApiService) GetChannelPins(ctx context.Context, channelId string) Pi // Execute executes the request // // @return []Pin -func (a *PinApiService) GetChannelPinsExecute(r PinApiGetChannelPinsRequest) ([]Pin, *http.Response, error) { +func (a *PinAPIService) GetChannelPinsExecute(r PinAPIGetChannelPinsRequest) ([]Pin, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -165,7 +165,7 @@ func (a *PinApiService) GetChannelPinsExecute(r PinApiGetChannelPinsRequest) ([] localVarReturnValue []Pin ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PinApiService.GetChannelPins") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PinAPIService.GetChannelPins") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -231,13 +231,13 @@ func (a *PinApiService) GetChannelPinsExecute(r PinApiGetChannelPinsRequest) ([] return localVarReturnValue, localVarHTTPResponse, nil } -type PinApiGetPinRequest struct { +type PinAPIGetPinRequest struct { ctx context.Context - ApiService *PinApiService + ApiService *PinAPIService messageId string } -func (r PinApiGetPinRequest) Execute() (*MessagePin, *http.Response, error) { +func (r PinAPIGetPinRequest) Execute() (*MessagePin, *http.Response, error) { return r.ApiService.GetPinExecute(r) } @@ -248,10 +248,10 @@ GetPin ピン留めを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID - @return PinApiGetPinRequest + @return PinAPIGetPinRequest */ -func (a *PinApiService) GetPin(ctx context.Context, messageId string) PinApiGetPinRequest { - return PinApiGetPinRequest{ +func (a *PinAPIService) GetPin(ctx context.Context, messageId string) PinAPIGetPinRequest { + return PinAPIGetPinRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -261,7 +261,7 @@ func (a *PinApiService) GetPin(ctx context.Context, messageId string) PinApiGetP // Execute executes the request // // @return MessagePin -func (a *PinApiService) GetPinExecute(r PinApiGetPinRequest) (*MessagePin, *http.Response, error) { +func (a *PinAPIService) GetPinExecute(r PinAPIGetPinRequest) (*MessagePin, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -269,7 +269,7 @@ func (a *PinApiService) GetPinExecute(r PinApiGetPinRequest) (*MessagePin, *http localVarReturnValue *MessagePin ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PinApiService.GetPin") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PinAPIService.GetPin") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -335,13 +335,13 @@ func (a *PinApiService) GetPinExecute(r PinApiGetPinRequest) (*MessagePin, *http return localVarReturnValue, localVarHTTPResponse, nil } -type PinApiRemovePinRequest struct { +type PinAPIRemovePinRequest struct { ctx context.Context - ApiService *PinApiService + ApiService *PinAPIService messageId string } -func (r PinApiRemovePinRequest) Execute() (*http.Response, error) { +func (r PinAPIRemovePinRequest) Execute() (*http.Response, error) { return r.ApiService.RemovePinExecute(r) } @@ -352,10 +352,10 @@ RemovePin ピン留めを外す @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID - @return PinApiRemovePinRequest + @return PinAPIRemovePinRequest */ -func (a *PinApiService) RemovePin(ctx context.Context, messageId string) PinApiRemovePinRequest { - return PinApiRemovePinRequest{ +func (a *PinAPIService) RemovePin(ctx context.Context, messageId string) PinAPIRemovePinRequest { + return PinAPIRemovePinRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -363,14 +363,14 @@ func (a *PinApiService) RemovePin(ctx context.Context, messageId string) PinApiR } // Execute executes the request -func (a *PinApiService) RemovePinExecute(r PinApiRemovePinRequest) (*http.Response, error) { +func (a *PinAPIService) RemovePinExecute(r PinAPIRemovePinRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PinApiService.RemovePin") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PinAPIService.RemovePin") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_public.go b/api_public.go index 73f04c3..5c33ed8 100644 --- a/api_public.go +++ b/api_public.go @@ -20,16 +20,16 @@ import ( "strings" ) -// PublicApiService PublicApi service -type PublicApiService service +// PublicAPIService PublicAPI service +type PublicAPIService service -type PublicApiGetPublicUserIconRequest struct { +type PublicAPIGetPublicUserIconRequest struct { ctx context.Context - ApiService *PublicApiService + ApiService *PublicAPIService username string } -func (r PublicApiGetPublicUserIconRequest) Execute() (*os.File, *http.Response, error) { +func (r PublicAPIGetPublicUserIconRequest) Execute() (*os.File, *http.Response, error) { return r.ApiService.GetPublicUserIconExecute(r) } @@ -40,10 +40,10 @@ GetPublicUserIcon ユーザーのアイコン画像を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param username ユーザー名 - @return PublicApiGetPublicUserIconRequest + @return PublicAPIGetPublicUserIconRequest */ -func (a *PublicApiService) GetPublicUserIcon(ctx context.Context, username string) PublicApiGetPublicUserIconRequest { - return PublicApiGetPublicUserIconRequest{ +func (a *PublicAPIService) GetPublicUserIcon(ctx context.Context, username string) PublicAPIGetPublicUserIconRequest { + return PublicAPIGetPublicUserIconRequest{ ApiService: a, ctx: ctx, username: username, @@ -53,7 +53,7 @@ func (a *PublicApiService) GetPublicUserIcon(ctx context.Context, username strin // Execute executes the request // // @return *os.File -func (a *PublicApiService) GetPublicUserIconExecute(r PublicApiGetPublicUserIconRequest) (*os.File, *http.Response, error) { +func (a *PublicAPIService) GetPublicUserIconExecute(r PublicAPIGetPublicUserIconRequest) (*os.File, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -61,7 +61,7 @@ func (a *PublicApiService) GetPublicUserIconExecute(r PublicApiGetPublicUserIcon localVarReturnValue *os.File ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.GetPublicUserIcon") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicAPIService.GetPublicUserIcon") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -127,12 +127,12 @@ func (a *PublicApiService) GetPublicUserIconExecute(r PublicApiGetPublicUserIcon return localVarReturnValue, localVarHTTPResponse, nil } -type PublicApiGetServerVersionRequest struct { +type PublicAPIGetServerVersionRequest struct { ctx context.Context - ApiService *PublicApiService + ApiService *PublicAPIService } -func (r PublicApiGetServerVersionRequest) Execute() (*Version, *http.Response, error) { +func (r PublicAPIGetServerVersionRequest) Execute() (*Version, *http.Response, error) { return r.ApiService.GetServerVersionExecute(r) } @@ -142,10 +142,10 @@ GetServerVersion バージョンを取得 サーバーバージョン及びサーバーフラグ情報を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return PublicApiGetServerVersionRequest + @return PublicAPIGetServerVersionRequest */ -func (a *PublicApiService) GetServerVersion(ctx context.Context) PublicApiGetServerVersionRequest { - return PublicApiGetServerVersionRequest{ +func (a *PublicAPIService) GetServerVersion(ctx context.Context) PublicAPIGetServerVersionRequest { + return PublicAPIGetServerVersionRequest{ ApiService: a, ctx: ctx, } @@ -154,7 +154,7 @@ func (a *PublicApiService) GetServerVersion(ctx context.Context) PublicApiGetSer // Execute executes the request // // @return Version -func (a *PublicApiService) GetServerVersionExecute(r PublicApiGetServerVersionRequest) (*Version, *http.Response, error) { +func (a *PublicAPIService) GetServerVersionExecute(r PublicAPIGetServerVersionRequest) (*Version, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -162,7 +162,7 @@ func (a *PublicApiService) GetServerVersionExecute(r PublicApiGetServerVersionRe localVarReturnValue *Version ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.GetServerVersion") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicAPIService.GetServerVersion") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_qall.go b/api_qall.go index 996e401..fc80407 100644 --- a/api_qall.go +++ b/api_qall.go @@ -20,23 +20,23 @@ import ( "strings" ) -// QallApiService QallApi service -type QallApiService service +// QallAPIService QallAPI service +type QallAPIService service -type QallApiChangeParticipantRoleRequest struct { +type QallAPIChangeParticipantRoleRequest struct { ctx context.Context - ApiService *QallApiService + ApiService *QallAPIService roomId string qallParticipantRequest *[]QallParticipantRequest } // 発言権限を変更する参加者の情報 -func (r QallApiChangeParticipantRoleRequest) QallParticipantRequest(qallParticipantRequest []QallParticipantRequest) QallApiChangeParticipantRoleRequest { +func (r QallAPIChangeParticipantRoleRequest) QallParticipantRequest(qallParticipantRequest []QallParticipantRequest) QallAPIChangeParticipantRoleRequest { r.qallParticipantRequest = &qallParticipantRequest return r } -func (r QallApiChangeParticipantRoleRequest) Execute() (*QallParticipantResponse, *http.Response, error) { +func (r QallAPIChangeParticipantRoleRequest) Execute() (*QallParticipantResponse, *http.Response, error) { return r.ApiService.ChangeParticipantRoleExecute(r) } @@ -47,10 +47,10 @@ ChangeParticipantRole ルームでの発言権限を変更 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param roomId ルームUUID - @return QallApiChangeParticipantRoleRequest + @return QallAPIChangeParticipantRoleRequest */ -func (a *QallApiService) ChangeParticipantRole(ctx context.Context, roomId string) QallApiChangeParticipantRoleRequest { - return QallApiChangeParticipantRoleRequest{ +func (a *QallAPIService) ChangeParticipantRole(ctx context.Context, roomId string) QallAPIChangeParticipantRoleRequest { + return QallAPIChangeParticipantRoleRequest{ ApiService: a, ctx: ctx, roomId: roomId, @@ -60,7 +60,7 @@ func (a *QallApiService) ChangeParticipantRole(ctx context.Context, roomId strin // Execute executes the request // // @return QallParticipantResponse -func (a *QallApiService) ChangeParticipantRoleExecute(r QallApiChangeParticipantRoleRequest) (*QallParticipantResponse, *http.Response, error) { +func (a *QallAPIService) ChangeParticipantRoleExecute(r QallAPIChangeParticipantRoleRequest) (*QallParticipantResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} @@ -68,7 +68,7 @@ func (a *QallApiService) ChangeParticipantRoleExecute(r QallApiChangeParticipant localVarReturnValue *QallParticipantResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallApiService.ChangeParticipantRole") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallAPIService.ChangeParticipantRole") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -139,26 +139,26 @@ func (a *QallApiService) ChangeParticipantRoleExecute(r QallApiChangeParticipant return localVarReturnValue, localVarHTTPResponse, nil } -type QallApiGetLiveKitTokenRequest struct { +type QallAPIGetLiveKitTokenRequest struct { ctx context.Context - ApiService *QallApiService + ApiService *QallAPIService roomId *string isWebinar *bool } // ルームUUID -func (r QallApiGetLiveKitTokenRequest) RoomId(roomId string) QallApiGetLiveKitTokenRequest { +func (r QallAPIGetLiveKitTokenRequest) RoomId(roomId string) QallAPIGetLiveKitTokenRequest { r.roomId = &roomId return r } // ウェビナールームかどうか(デフォルト false) -func (r QallApiGetLiveKitTokenRequest) IsWebinar(isWebinar bool) QallApiGetLiveKitTokenRequest { +func (r QallAPIGetLiveKitTokenRequest) IsWebinar(isWebinar bool) QallAPIGetLiveKitTokenRequest { r.isWebinar = &isWebinar return r } -func (r QallApiGetLiveKitTokenRequest) Execute() (*QallTokenResponse, *http.Response, error) { +func (r QallAPIGetLiveKitTokenRequest) Execute() (*QallTokenResponse, *http.Response, error) { return r.ApiService.GetLiveKitTokenExecute(r) } @@ -168,10 +168,10 @@ GetLiveKitToken LiveKitトークンを取得 指定したルームに参加するためのLiveKitトークンを取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return QallApiGetLiveKitTokenRequest + @return QallAPIGetLiveKitTokenRequest */ -func (a *QallApiService) GetLiveKitToken(ctx context.Context) QallApiGetLiveKitTokenRequest { - return QallApiGetLiveKitTokenRequest{ +func (a *QallAPIService) GetLiveKitToken(ctx context.Context) QallAPIGetLiveKitTokenRequest { + return QallAPIGetLiveKitTokenRequest{ ApiService: a, ctx: ctx, } @@ -180,7 +180,7 @@ func (a *QallApiService) GetLiveKitToken(ctx context.Context) QallApiGetLiveKitT // Execute executes the request // // @return QallTokenResponse -func (a *QallApiService) GetLiveKitTokenExecute(r QallApiGetLiveKitTokenRequest) (*QallTokenResponse, *http.Response, error) { +func (a *QallAPIService) GetLiveKitTokenExecute(r QallAPIGetLiveKitTokenRequest) (*QallTokenResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -188,7 +188,7 @@ func (a *QallApiService) GetLiveKitTokenExecute(r QallApiGetLiveKitTokenRequest) localVarReturnValue *QallTokenResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallApiService.GetLiveKitToken") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallAPIService.GetLiveKitToken") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -200,10 +200,10 @@ func (a *QallApiService) GetLiveKitTokenExecute(r QallApiGetLiveKitTokenRequest) localVarFormParams := url.Values{} if r.roomId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "roomId", r.roomId, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "roomId", r.roomId, "form", "") } if r.isWebinar != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "isWebinar", r.isWebinar, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "isWebinar", r.isWebinar, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -259,12 +259,12 @@ func (a *QallApiService) GetLiveKitTokenExecute(r QallApiGetLiveKitTokenRequest) return localVarReturnValue, localVarHTTPResponse, nil } -type QallApiGetQallEndpointsRequest struct { +type QallAPIGetQallEndpointsRequest struct { ctx context.Context - ApiService *QallApiService + ApiService *QallAPIService } -func (r QallApiGetQallEndpointsRequest) Execute() (*QallEndpointResponse, *http.Response, error) { +func (r QallAPIGetQallEndpointsRequest) Execute() (*QallEndpointResponse, *http.Response, error) { return r.ApiService.GetQallEndpointsExecute(r) } @@ -274,10 +274,10 @@ GetQallEndpoints LiveKitエンドポイントを取得 接続可能なLiveKitエンドポイントを取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return QallApiGetQallEndpointsRequest + @return QallAPIGetQallEndpointsRequest */ -func (a *QallApiService) GetQallEndpoints(ctx context.Context) QallApiGetQallEndpointsRequest { - return QallApiGetQallEndpointsRequest{ +func (a *QallAPIService) GetQallEndpoints(ctx context.Context) QallAPIGetQallEndpointsRequest { + return QallAPIGetQallEndpointsRequest{ ApiService: a, ctx: ctx, } @@ -286,7 +286,7 @@ func (a *QallApiService) GetQallEndpoints(ctx context.Context) QallApiGetQallEnd // Execute executes the request // // @return QallEndpointResponse -func (a *QallApiService) GetQallEndpointsExecute(r QallApiGetQallEndpointsRequest) (*QallEndpointResponse, *http.Response, error) { +func (a *QallAPIService) GetQallEndpointsExecute(r QallAPIGetQallEndpointsRequest) (*QallEndpointResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -294,7 +294,7 @@ func (a *QallApiService) GetQallEndpointsExecute(r QallApiGetQallEndpointsReques localVarReturnValue *QallEndpointResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallApiService.GetQallEndpoints") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallAPIService.GetQallEndpoints") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -359,13 +359,13 @@ func (a *QallApiService) GetQallEndpointsExecute(r QallApiGetQallEndpointsReques return localVarReturnValue, localVarHTTPResponse, nil } -type QallApiGetRoomMetadataRequest struct { +type QallAPIGetRoomMetadataRequest struct { ctx context.Context - ApiService *QallApiService + ApiService *QallAPIService roomId string } -func (r QallApiGetRoomMetadataRequest) Execute() (*QallMetadataResponse, *http.Response, error) { +func (r QallAPIGetRoomMetadataRequest) Execute() (*QallMetadataResponse, *http.Response, error) { return r.ApiService.GetRoomMetadataExecute(r) } @@ -376,10 +376,10 @@ GetRoomMetadata ルームのメタデータを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param roomId ルームUUID - @return QallApiGetRoomMetadataRequest + @return QallAPIGetRoomMetadataRequest */ -func (a *QallApiService) GetRoomMetadata(ctx context.Context, roomId string) QallApiGetRoomMetadataRequest { - return QallApiGetRoomMetadataRequest{ +func (a *QallAPIService) GetRoomMetadata(ctx context.Context, roomId string) QallAPIGetRoomMetadataRequest { + return QallAPIGetRoomMetadataRequest{ ApiService: a, ctx: ctx, roomId: roomId, @@ -389,7 +389,7 @@ func (a *QallApiService) GetRoomMetadata(ctx context.Context, roomId string) Qal // Execute executes the request // // @return QallMetadataResponse -func (a *QallApiService) GetRoomMetadataExecute(r QallApiGetRoomMetadataRequest) (*QallMetadataResponse, *http.Response, error) { +func (a *QallAPIService) GetRoomMetadataExecute(r QallAPIGetRoomMetadataRequest) (*QallMetadataResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -397,7 +397,7 @@ func (a *QallApiService) GetRoomMetadataExecute(r QallApiGetRoomMetadataRequest) localVarReturnValue *QallMetadataResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallApiService.GetRoomMetadata") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallAPIService.GetRoomMetadata") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -463,12 +463,12 @@ func (a *QallApiService) GetRoomMetadataExecute(r QallApiGetRoomMetadataRequest) return localVarReturnValue, localVarHTTPResponse, nil } -type QallApiGetRoomsRequest struct { +type QallAPIGetRoomsRequest struct { ctx context.Context - ApiService *QallApiService + ApiService *QallAPIService } -func (r QallApiGetRoomsRequest) Execute() ([]QallRoomWithParticipants, *http.Response, error) { +func (r QallAPIGetRoomsRequest) Execute() ([]QallRoomWithParticipants, *http.Response, error) { return r.ApiService.GetRoomsExecute(r) } @@ -478,10 +478,10 @@ GetRooms ルームと参加者の一覧を取得 現在存在する(またはアクティブな)ルームと、そのルームに所属している参加者情報を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return QallApiGetRoomsRequest + @return QallAPIGetRoomsRequest */ -func (a *QallApiService) GetRooms(ctx context.Context) QallApiGetRoomsRequest { - return QallApiGetRoomsRequest{ +func (a *QallAPIService) GetRooms(ctx context.Context) QallAPIGetRoomsRequest { + return QallAPIGetRoomsRequest{ ApiService: a, ctx: ctx, } @@ -490,7 +490,7 @@ func (a *QallApiService) GetRooms(ctx context.Context) QallApiGetRoomsRequest { // Execute executes the request // // @return []QallRoomWithParticipants -func (a *QallApiService) GetRoomsExecute(r QallApiGetRoomsRequest) ([]QallRoomWithParticipants, *http.Response, error) { +func (a *QallAPIService) GetRoomsExecute(r QallAPIGetRoomsRequest) ([]QallRoomWithParticipants, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -498,7 +498,7 @@ func (a *QallApiService) GetRoomsExecute(r QallApiGetRoomsRequest) ([]QallRoomWi localVarReturnValue []QallRoomWithParticipants ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallApiService.GetRooms") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallAPIService.GetRooms") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -563,12 +563,12 @@ func (a *QallApiService) GetRoomsExecute(r QallApiGetRoomsRequest) ([]QallRoomWi return localVarReturnValue, localVarHTTPResponse, nil } -type QallApiGetSoundboardListRequest struct { +type QallAPIGetSoundboardListRequest struct { ctx context.Context - ApiService *QallApiService + ApiService *QallAPIService } -func (r QallApiGetSoundboardListRequest) Execute() ([]SoundboardItem, *http.Response, error) { +func (r QallAPIGetSoundboardListRequest) Execute() ([]SoundboardItem, *http.Response, error) { return r.ApiService.GetSoundboardListExecute(r) } @@ -578,10 +578,10 @@ GetSoundboardList サウンドボード用の音声一覧を取得 DBに保存されたサウンドボード情報を取得します。 各アイテムには soundId, soundName, stampId が含まれます。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return QallApiGetSoundboardListRequest + @return QallAPIGetSoundboardListRequest */ -func (a *QallApiService) GetSoundboardList(ctx context.Context) QallApiGetSoundboardListRequest { - return QallApiGetSoundboardListRequest{ +func (a *QallAPIService) GetSoundboardList(ctx context.Context) QallAPIGetSoundboardListRequest { + return QallAPIGetSoundboardListRequest{ ApiService: a, ctx: ctx, } @@ -590,7 +590,7 @@ func (a *QallApiService) GetSoundboardList(ctx context.Context) QallApiGetSoundb // Execute executes the request // // @return []SoundboardItem -func (a *QallApiService) GetSoundboardListExecute(r QallApiGetSoundboardListRequest) ([]SoundboardItem, *http.Response, error) { +func (a *QallAPIService) GetSoundboardListExecute(r QallAPIGetSoundboardListRequest) ([]SoundboardItem, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -598,7 +598,7 @@ func (a *QallApiService) GetSoundboardListExecute(r QallApiGetSoundboardListRequ localVarReturnValue []SoundboardItem ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallApiService.GetSoundboardList") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallAPIService.GetSoundboardList") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -663,18 +663,18 @@ func (a *QallApiService) GetSoundboardListExecute(r QallApiGetSoundboardListRequ return localVarReturnValue, localVarHTTPResponse, nil } -type QallApiLiveKitWebhookRequest struct { +type QallAPILiveKitWebhookRequest struct { ctx context.Context - ApiService *QallApiService + ApiService *QallAPIService body *map[string]interface{} } -func (r QallApiLiveKitWebhookRequest) Body(body map[string]interface{}) QallApiLiveKitWebhookRequest { +func (r QallAPILiveKitWebhookRequest) Body(body map[string]interface{}) QallAPILiveKitWebhookRequest { r.body = &body return r } -func (r QallApiLiveKitWebhookRequest) Execute() (*http.Response, error) { +func (r QallAPILiveKitWebhookRequest) Execute() (*http.Response, error) { return r.ApiService.LiveKitWebhookExecute(r) } @@ -684,24 +684,24 @@ LiveKitWebhook LiveKit Webhook受信 LiveKit側で設定したWebhookから呼び出されるエンドポイントです。 参加者の入室・退出などのイベントを受け取り、サーバ内で処理を行います。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return QallApiLiveKitWebhookRequest + @return QallAPILiveKitWebhookRequest */ -func (a *QallApiService) LiveKitWebhook(ctx context.Context) QallApiLiveKitWebhookRequest { - return QallApiLiveKitWebhookRequest{ +func (a *QallAPIService) LiveKitWebhook(ctx context.Context) QallAPILiveKitWebhookRequest { + return QallAPILiveKitWebhookRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *QallApiService) LiveKitWebhookExecute(r QallApiLiveKitWebhookRequest) (*http.Response, error) { +func (a *QallAPIService) LiveKitWebhookExecute(r QallAPILiveKitWebhookRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallApiService.LiveKitWebhook") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallAPIService.LiveKitWebhook") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -762,33 +762,33 @@ func (a *QallApiService) LiveKitWebhookExecute(r QallApiLiveKitWebhookRequest) ( return localVarHTTPResponse, nil } -type QallApiPostSoundboardRequest struct { +type QallAPIPostSoundboardRequest struct { ctx context.Context - ApiService *QallApiService + ApiService *QallAPIService audio *os.File soundName *string stampId *string } // アップロードする音声ファイル(20秒以内) -func (r QallApiPostSoundboardRequest) Audio(audio *os.File) QallApiPostSoundboardRequest { +func (r QallAPIPostSoundboardRequest) Audio(audio *os.File) QallAPIPostSoundboardRequest { r.audio = audio return r } // ユーザが自由につけるサウンド名 -func (r QallApiPostSoundboardRequest) SoundName(soundName string) QallApiPostSoundboardRequest { +func (r QallAPIPostSoundboardRequest) SoundName(soundName string) QallAPIPostSoundboardRequest { r.soundName = &soundName return r } // アイコンスタンプID -func (r QallApiPostSoundboardRequest) StampId(stampId string) QallApiPostSoundboardRequest { +func (r QallAPIPostSoundboardRequest) StampId(stampId string) QallAPIPostSoundboardRequest { r.stampId = &stampId return r } -func (r QallApiPostSoundboardRequest) Execute() (*SoundboardUploadResponse, *http.Response, error) { +func (r QallAPIPostSoundboardRequest) Execute() (*SoundboardUploadResponse, *http.Response, error) { return r.ApiService.PostSoundboardExecute(r) } @@ -798,10 +798,10 @@ PostSoundboard サウンドボード用の短い音声ファイルをアップ 15秒程度の短い音声ファイルを multipart/form-data で送信し、S3(互換ストレージ)にアップロードします。 クライアントは「soundName」というフィールドを送信し、それをDBに保存して関連付けを行います。 また、サーバ側で soundId を自動生成し、S3のファイル名に使用します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return QallApiPostSoundboardRequest + @return QallAPIPostSoundboardRequest */ -func (a *QallApiService) PostSoundboard(ctx context.Context) QallApiPostSoundboardRequest { - return QallApiPostSoundboardRequest{ +func (a *QallAPIService) PostSoundboard(ctx context.Context) QallAPIPostSoundboardRequest { + return QallAPIPostSoundboardRequest{ ApiService: a, ctx: ctx, } @@ -810,7 +810,7 @@ func (a *QallApiService) PostSoundboard(ctx context.Context) QallApiPostSoundboa // Execute executes the request // // @return SoundboardUploadResponse -func (a *QallApiService) PostSoundboardExecute(r QallApiPostSoundboardRequest) (*SoundboardUploadResponse, *http.Response, error) { +func (a *QallAPIService) PostSoundboardExecute(r QallAPIPostSoundboardRequest) (*SoundboardUploadResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -818,7 +818,7 @@ func (a *QallApiService) PostSoundboardExecute(r QallApiPostSoundboardRequest) ( localVarReturnValue *SoundboardUploadResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallApiService.PostSoundboard") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallAPIService.PostSoundboard") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -857,7 +857,6 @@ func (a *QallApiService) PostSoundboardExecute(r QallApiPostSoundboardRequest) ( var audioLocalVarFileBytes []byte audioLocalVarFormFileName = "audio" - audioLocalVarFile := r.audio if audioLocalVarFile != nil { @@ -868,9 +867,9 @@ func (a *QallApiService) PostSoundboardExecute(r QallApiPostSoundboardRequest) ( audioLocalVarFile.Close() formFiles = append(formFiles, formFile{fileBytes: audioLocalVarFileBytes, fileName: audioLocalVarFileName, formFileName: audioLocalVarFormFileName}) } - parameterAddToHeaderOrQuery(localVarFormParams, "soundName", r.soundName, "") + parameterAddToHeaderOrQuery(localVarFormParams, "soundName", r.soundName, "", "") if r.stampId != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "stampId", r.stampId, "") + parameterAddToHeaderOrQuery(localVarFormParams, "stampId", r.stampId, "", "") } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { @@ -909,18 +908,18 @@ func (a *QallApiService) PostSoundboardExecute(r QallApiPostSoundboardRequest) ( return localVarReturnValue, localVarHTTPResponse, nil } -type QallApiPostSoundboardPlayRequest struct { +type QallAPIPostSoundboardPlayRequest struct { ctx context.Context - ApiService *QallApiService + ApiService *QallAPIService soundboardPlayRequest *SoundboardPlayRequest } -func (r QallApiPostSoundboardPlayRequest) SoundboardPlayRequest(soundboardPlayRequest SoundboardPlayRequest) QallApiPostSoundboardPlayRequest { +func (r QallAPIPostSoundboardPlayRequest) SoundboardPlayRequest(soundboardPlayRequest SoundboardPlayRequest) QallAPIPostSoundboardPlayRequest { r.soundboardPlayRequest = &soundboardPlayRequest return r } -func (r QallApiPostSoundboardPlayRequest) Execute() (*SoundboardPlayResponse, *http.Response, error) { +func (r QallAPIPostSoundboardPlayRequest) Execute() (*SoundboardPlayResponse, *http.Response, error) { return r.ApiService.PostSoundboardPlayExecute(r) } @@ -930,10 +929,10 @@ PostSoundboardPlay アップロード済み音声を LiveKit ルームで再生 S3上にある音声ファイルの署名付きURLを生成し、 Ingressを介して指定ルームに音声を流します。 該当ルームに参加しているユーザであれば再生可能とします。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return QallApiPostSoundboardPlayRequest + @return QallAPIPostSoundboardPlayRequest */ -func (a *QallApiService) PostSoundboardPlay(ctx context.Context) QallApiPostSoundboardPlayRequest { - return QallApiPostSoundboardPlayRequest{ +func (a *QallAPIService) PostSoundboardPlay(ctx context.Context) QallAPIPostSoundboardPlayRequest { + return QallAPIPostSoundboardPlayRequest{ ApiService: a, ctx: ctx, } @@ -942,7 +941,7 @@ func (a *QallApiService) PostSoundboardPlay(ctx context.Context) QallApiPostSoun // Execute executes the request // // @return SoundboardPlayResponse -func (a *QallApiService) PostSoundboardPlayExecute(r QallApiPostSoundboardPlayRequest) (*SoundboardPlayResponse, *http.Response, error) { +func (a *QallAPIService) PostSoundboardPlayExecute(r QallAPIPostSoundboardPlayRequest) (*SoundboardPlayResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -950,7 +949,7 @@ func (a *QallApiService) PostSoundboardPlayExecute(r QallApiPostSoundboardPlayRe localVarReturnValue *SoundboardPlayResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallApiService.PostSoundboardPlay") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallAPIService.PostSoundboardPlay") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1020,20 +1019,20 @@ func (a *QallApiService) PostSoundboardPlayExecute(r QallApiPostSoundboardPlayRe return localVarReturnValue, localVarHTTPResponse, nil } -type QallApiUpdateRoomMetadataRequest struct { +type QallAPIUpdateRoomMetadataRequest struct { ctx context.Context - ApiService *QallApiService + ApiService *QallAPIService roomId string qallMetadataRequest *QallMetadataRequest } // ルームのメタデータ -func (r QallApiUpdateRoomMetadataRequest) QallMetadataRequest(qallMetadataRequest QallMetadataRequest) QallApiUpdateRoomMetadataRequest { +func (r QallAPIUpdateRoomMetadataRequest) QallMetadataRequest(qallMetadataRequest QallMetadataRequest) QallAPIUpdateRoomMetadataRequest { r.qallMetadataRequest = &qallMetadataRequest return r } -func (r QallApiUpdateRoomMetadataRequest) Execute() (*http.Response, error) { +func (r QallAPIUpdateRoomMetadataRequest) Execute() (*http.Response, error) { return r.ApiService.UpdateRoomMetadataExecute(r) } @@ -1044,10 +1043,10 @@ UpdateRoomMetadata ルームのメタデータを更新 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param roomId ルームUUID - @return QallApiUpdateRoomMetadataRequest + @return QallAPIUpdateRoomMetadataRequest */ -func (a *QallApiService) UpdateRoomMetadata(ctx context.Context, roomId string) QallApiUpdateRoomMetadataRequest { - return QallApiUpdateRoomMetadataRequest{ +func (a *QallAPIService) UpdateRoomMetadata(ctx context.Context, roomId string) QallAPIUpdateRoomMetadataRequest { + return QallAPIUpdateRoomMetadataRequest{ ApiService: a, ctx: ctx, roomId: roomId, @@ -1055,14 +1054,14 @@ func (a *QallApiService) UpdateRoomMetadata(ctx context.Context, roomId string) } // Execute executes the request -func (a *QallApiService) UpdateRoomMetadataExecute(r QallApiUpdateRoomMetadataRequest) (*http.Response, error) { +func (a *QallAPIService) UpdateRoomMetadataExecute(r QallAPIUpdateRoomMetadataRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallApiService.UpdateRoomMetadata") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QallAPIService.UpdateRoomMetadata") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_stamp.go b/api_stamp.go index 76ebfd2..669ba99 100644 --- a/api_stamp.go +++ b/api_stamp.go @@ -20,23 +20,23 @@ import ( "strings" ) -// StampApiService StampApi service -type StampApiService service +// StampAPIService StampAPI service +type StampAPIService service -type StampApiAddMessageStampRequest struct { +type StampAPIAddMessageStampRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService messageId string stampId string postMessageStampRequest *PostMessageStampRequest } -func (r StampApiAddMessageStampRequest) PostMessageStampRequest(postMessageStampRequest PostMessageStampRequest) StampApiAddMessageStampRequest { +func (r StampAPIAddMessageStampRequest) PostMessageStampRequest(postMessageStampRequest PostMessageStampRequest) StampAPIAddMessageStampRequest { r.postMessageStampRequest = &postMessageStampRequest return r } -func (r StampApiAddMessageStampRequest) Execute() (*http.Response, error) { +func (r StampAPIAddMessageStampRequest) Execute() (*http.Response, error) { return r.ApiService.AddMessageStampExecute(r) } @@ -48,10 +48,10 @@ AddMessageStamp スタンプを押す @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID @param stampId スタンプUUID - @return StampApiAddMessageStampRequest + @return StampAPIAddMessageStampRequest */ -func (a *StampApiService) AddMessageStamp(ctx context.Context, messageId string, stampId string) StampApiAddMessageStampRequest { - return StampApiAddMessageStampRequest{ +func (a *StampAPIService) AddMessageStamp(ctx context.Context, messageId string, stampId string) StampAPIAddMessageStampRequest { + return StampAPIAddMessageStampRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -60,14 +60,14 @@ func (a *StampApiService) AddMessageStamp(ctx context.Context, messageId string, } // Execute executes the request -func (a *StampApiService) AddMessageStampExecute(r StampApiAddMessageStampRequest) (*http.Response, error) { +func (a *StampAPIService) AddMessageStampExecute(r StampAPIAddMessageStampRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.AddMessageStamp") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.AddMessageStamp") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -127,20 +127,20 @@ func (a *StampApiService) AddMessageStampExecute(r StampApiAddMessageStampReques return localVarHTTPResponse, nil } -type StampApiChangeStampImageRequest struct { +type StampAPIChangeStampImageRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService stampId string file *os.File } // スタンプ画像(1MBまでのpng, jpeg, gif) -func (r StampApiChangeStampImageRequest) File(file *os.File) StampApiChangeStampImageRequest { +func (r StampAPIChangeStampImageRequest) File(file *os.File) StampAPIChangeStampImageRequest { r.file = file return r } -func (r StampApiChangeStampImageRequest) Execute() (*http.Response, error) { +func (r StampAPIChangeStampImageRequest) Execute() (*http.Response, error) { return r.ApiService.ChangeStampImageExecute(r) } @@ -151,10 +151,10 @@ ChangeStampImage スタンプ画像を変更 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param stampId スタンプUUID - @return StampApiChangeStampImageRequest + @return StampAPIChangeStampImageRequest */ -func (a *StampApiService) ChangeStampImage(ctx context.Context, stampId string) StampApiChangeStampImageRequest { - return StampApiChangeStampImageRequest{ +func (a *StampAPIService) ChangeStampImage(ctx context.Context, stampId string) StampAPIChangeStampImageRequest { + return StampAPIChangeStampImageRequest{ ApiService: a, ctx: ctx, stampId: stampId, @@ -162,14 +162,14 @@ func (a *StampApiService) ChangeStampImage(ctx context.Context, stampId string) } // Execute executes the request -func (a *StampApiService) ChangeStampImageExecute(r StampApiChangeStampImageRequest) (*http.Response, error) { +func (a *StampAPIService) ChangeStampImageExecute(r StampAPIChangeStampImageRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.ChangeStampImage") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.ChangeStampImage") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -206,7 +206,6 @@ func (a *StampApiService) ChangeStampImageExecute(r StampApiChangeStampImageRequ var fileLocalVarFileBytes []byte fileLocalVarFormFileName = "file" - fileLocalVarFile := r.file if fileLocalVarFile != nil { @@ -245,26 +244,26 @@ func (a *StampApiService) ChangeStampImageExecute(r StampApiChangeStampImageRequ return localVarHTTPResponse, nil } -type StampApiCreateStampRequest struct { +type StampAPICreateStampRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService name *string file *os.File } // スタンプ名 -func (r StampApiCreateStampRequest) Name(name string) StampApiCreateStampRequest { +func (r StampAPICreateStampRequest) Name(name string) StampAPICreateStampRequest { r.name = &name return r } // スタンプ画像(1MBまでのpng, jpeg, gif) -func (r StampApiCreateStampRequest) File(file *os.File) StampApiCreateStampRequest { +func (r StampAPICreateStampRequest) File(file *os.File) StampAPICreateStampRequest { r.file = file return r } -func (r StampApiCreateStampRequest) Execute() (*Stamp, *http.Response, error) { +func (r StampAPICreateStampRequest) Execute() (*Stamp, *http.Response, error) { return r.ApiService.CreateStampExecute(r) } @@ -274,10 +273,10 @@ CreateStamp スタンプを作成 スタンプを新規作成します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return StampApiCreateStampRequest + @return StampAPICreateStampRequest */ -func (a *StampApiService) CreateStamp(ctx context.Context) StampApiCreateStampRequest { - return StampApiCreateStampRequest{ +func (a *StampAPIService) CreateStamp(ctx context.Context) StampAPICreateStampRequest { + return StampAPICreateStampRequest{ ApiService: a, ctx: ctx, } @@ -286,7 +285,7 @@ func (a *StampApiService) CreateStamp(ctx context.Context) StampApiCreateStampRe // Execute executes the request // // @return Stamp -func (a *StampApiService) CreateStampExecute(r StampApiCreateStampRequest) (*Stamp, *http.Response, error) { +func (a *StampAPIService) CreateStampExecute(r StampAPICreateStampRequest) (*Stamp, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -294,7 +293,7 @@ func (a *StampApiService) CreateStampExecute(r StampApiCreateStampRequest) (*Sta localVarReturnValue *Stamp ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.CreateStamp") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.CreateStamp") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -328,13 +327,12 @@ func (a *StampApiService) CreateStampExecute(r StampApiCreateStampRequest) (*Sta if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - parameterAddToHeaderOrQuery(localVarFormParams, "name", r.name, "") + parameterAddToHeaderOrQuery(localVarFormParams, "name", r.name, "", "") var fileLocalVarFormFileName string var fileLocalVarFileName string var fileLocalVarFileBytes []byte fileLocalVarFormFileName = "file" - fileLocalVarFile := r.file if fileLocalVarFile != nil { @@ -382,18 +380,18 @@ func (a *StampApiService) CreateStampExecute(r StampApiCreateStampRequest) (*Sta return localVarReturnValue, localVarHTTPResponse, nil } -type StampApiCreateStampPaletteRequest struct { +type StampAPICreateStampPaletteRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService postStampPaletteRequest *PostStampPaletteRequest } -func (r StampApiCreateStampPaletteRequest) PostStampPaletteRequest(postStampPaletteRequest PostStampPaletteRequest) StampApiCreateStampPaletteRequest { +func (r StampAPICreateStampPaletteRequest) PostStampPaletteRequest(postStampPaletteRequest PostStampPaletteRequest) StampAPICreateStampPaletteRequest { r.postStampPaletteRequest = &postStampPaletteRequest return r } -func (r StampApiCreateStampPaletteRequest) Execute() (*StampPalette, *http.Response, error) { +func (r StampAPICreateStampPaletteRequest) Execute() (*StampPalette, *http.Response, error) { return r.ApiService.CreateStampPaletteExecute(r) } @@ -403,10 +401,10 @@ CreateStampPalette スタンプパレットを作成 スタンプパレットを作成します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return StampApiCreateStampPaletteRequest + @return StampAPICreateStampPaletteRequest */ -func (a *StampApiService) CreateStampPalette(ctx context.Context) StampApiCreateStampPaletteRequest { - return StampApiCreateStampPaletteRequest{ +func (a *StampAPIService) CreateStampPalette(ctx context.Context) StampAPICreateStampPaletteRequest { + return StampAPICreateStampPaletteRequest{ ApiService: a, ctx: ctx, } @@ -415,7 +413,7 @@ func (a *StampApiService) CreateStampPalette(ctx context.Context) StampApiCreate // Execute executes the request // // @return StampPalette -func (a *StampApiService) CreateStampPaletteExecute(r StampApiCreateStampPaletteRequest) (*StampPalette, *http.Response, error) { +func (a *StampAPIService) CreateStampPaletteExecute(r StampAPICreateStampPaletteRequest) (*StampPalette, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -423,7 +421,7 @@ func (a *StampApiService) CreateStampPaletteExecute(r StampApiCreateStampPalette localVarReturnValue *StampPalette ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.CreateStampPalette") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.CreateStampPalette") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -490,13 +488,13 @@ func (a *StampApiService) CreateStampPaletteExecute(r StampApiCreateStampPalette return localVarReturnValue, localVarHTTPResponse, nil } -type StampApiDeleteStampRequest struct { +type StampAPIDeleteStampRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService stampId string } -func (r StampApiDeleteStampRequest) Execute() (*http.Response, error) { +func (r StampAPIDeleteStampRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteStampExecute(r) } @@ -508,10 +506,10 @@ DeleteStamp スタンプを削除 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param stampId スタンプUUID - @return StampApiDeleteStampRequest + @return StampAPIDeleteStampRequest */ -func (a *StampApiService) DeleteStamp(ctx context.Context, stampId string) StampApiDeleteStampRequest { - return StampApiDeleteStampRequest{ +func (a *StampAPIService) DeleteStamp(ctx context.Context, stampId string) StampAPIDeleteStampRequest { + return StampAPIDeleteStampRequest{ ApiService: a, ctx: ctx, stampId: stampId, @@ -519,14 +517,14 @@ func (a *StampApiService) DeleteStamp(ctx context.Context, stampId string) Stamp } // Execute executes the request -func (a *StampApiService) DeleteStampExecute(r StampApiDeleteStampRequest) (*http.Response, error) { +func (a *StampAPIService) DeleteStampExecute(r StampAPIDeleteStampRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.DeleteStamp") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.DeleteStamp") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -583,13 +581,13 @@ func (a *StampApiService) DeleteStampExecute(r StampApiDeleteStampRequest) (*htt return localVarHTTPResponse, nil } -type StampApiDeleteStampPaletteRequest struct { +type StampAPIDeleteStampPaletteRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService paletteId string } -func (r StampApiDeleteStampPaletteRequest) Execute() (*http.Response, error) { +func (r StampAPIDeleteStampPaletteRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteStampPaletteExecute(r) } @@ -601,10 +599,10 @@ DeleteStampPalette スタンプパレットを削除 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param paletteId スタンプパレットUUID - @return StampApiDeleteStampPaletteRequest + @return StampAPIDeleteStampPaletteRequest */ -func (a *StampApiService) DeleteStampPalette(ctx context.Context, paletteId string) StampApiDeleteStampPaletteRequest { - return StampApiDeleteStampPaletteRequest{ +func (a *StampAPIService) DeleteStampPalette(ctx context.Context, paletteId string) StampAPIDeleteStampPaletteRequest { + return StampAPIDeleteStampPaletteRequest{ ApiService: a, ctx: ctx, paletteId: paletteId, @@ -612,14 +610,14 @@ func (a *StampApiService) DeleteStampPalette(ctx context.Context, paletteId stri } // Execute executes the request -func (a *StampApiService) DeleteStampPaletteExecute(r StampApiDeleteStampPaletteRequest) (*http.Response, error) { +func (a *StampAPIService) DeleteStampPaletteExecute(r StampAPIDeleteStampPaletteRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.DeleteStampPalette") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.DeleteStampPalette") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -676,19 +674,19 @@ func (a *StampApiService) DeleteStampPaletteExecute(r StampApiDeleteStampPalette return localVarHTTPResponse, nil } -type StampApiEditStampRequest struct { +type StampAPIEditStampRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService stampId string patchStampRequest *PatchStampRequest } -func (r StampApiEditStampRequest) PatchStampRequest(patchStampRequest PatchStampRequest) StampApiEditStampRequest { +func (r StampAPIEditStampRequest) PatchStampRequest(patchStampRequest PatchStampRequest) StampAPIEditStampRequest { r.patchStampRequest = &patchStampRequest return r } -func (r StampApiEditStampRequest) Execute() (*http.Response, error) { +func (r StampAPIEditStampRequest) Execute() (*http.Response, error) { return r.ApiService.EditStampExecute(r) } @@ -699,10 +697,10 @@ EditStamp スタンプ情報を変更 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param stampId スタンプUUID - @return StampApiEditStampRequest + @return StampAPIEditStampRequest */ -func (a *StampApiService) EditStamp(ctx context.Context, stampId string) StampApiEditStampRequest { - return StampApiEditStampRequest{ +func (a *StampAPIService) EditStamp(ctx context.Context, stampId string) StampAPIEditStampRequest { + return StampAPIEditStampRequest{ ApiService: a, ctx: ctx, stampId: stampId, @@ -710,14 +708,14 @@ func (a *StampApiService) EditStamp(ctx context.Context, stampId string) StampAp } // Execute executes the request -func (a *StampApiService) EditStampExecute(r StampApiEditStampRequest) (*http.Response, error) { +func (a *StampAPIService) EditStampExecute(r StampAPIEditStampRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.EditStamp") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.EditStamp") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -776,19 +774,19 @@ func (a *StampApiService) EditStampExecute(r StampApiEditStampRequest) (*http.Re return localVarHTTPResponse, nil } -type StampApiEditStampPaletteRequest struct { +type StampAPIEditStampPaletteRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService paletteId string patchStampPaletteRequest *PatchStampPaletteRequest } -func (r StampApiEditStampPaletteRequest) PatchStampPaletteRequest(patchStampPaletteRequest PatchStampPaletteRequest) StampApiEditStampPaletteRequest { +func (r StampAPIEditStampPaletteRequest) PatchStampPaletteRequest(patchStampPaletteRequest PatchStampPaletteRequest) StampAPIEditStampPaletteRequest { r.patchStampPaletteRequest = &patchStampPaletteRequest return r } -func (r StampApiEditStampPaletteRequest) Execute() (*http.Response, error) { +func (r StampAPIEditStampPaletteRequest) Execute() (*http.Response, error) { return r.ApiService.EditStampPaletteExecute(r) } @@ -801,10 +799,10 @@ EditStampPalette スタンプパレットを編集 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param paletteId スタンプパレットUUID - @return StampApiEditStampPaletteRequest + @return StampAPIEditStampPaletteRequest */ -func (a *StampApiService) EditStampPalette(ctx context.Context, paletteId string) StampApiEditStampPaletteRequest { - return StampApiEditStampPaletteRequest{ +func (a *StampAPIService) EditStampPalette(ctx context.Context, paletteId string) StampAPIEditStampPaletteRequest { + return StampAPIEditStampPaletteRequest{ ApiService: a, ctx: ctx, paletteId: paletteId, @@ -812,14 +810,14 @@ func (a *StampApiService) EditStampPalette(ctx context.Context, paletteId string } // Execute executes the request -func (a *StampApiService) EditStampPaletteExecute(r StampApiEditStampPaletteRequest) (*http.Response, error) { +func (a *StampAPIService) EditStampPaletteExecute(r StampAPIEditStampPaletteRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.EditStampPalette") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.EditStampPalette") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -878,13 +876,13 @@ func (a *StampApiService) EditStampPaletteExecute(r StampApiEditStampPaletteRequ return localVarHTTPResponse, nil } -type StampApiGetMessageStampsRequest struct { +type StampAPIGetMessageStampsRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService messageId string } -func (r StampApiGetMessageStampsRequest) Execute() ([]MessageStamp, *http.Response, error) { +func (r StampAPIGetMessageStampsRequest) Execute() ([]MessageStamp, *http.Response, error) { return r.ApiService.GetMessageStampsExecute(r) } @@ -895,10 +893,10 @@ GetMessageStamps メッセージのスタンプリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID - @return StampApiGetMessageStampsRequest + @return StampAPIGetMessageStampsRequest */ -func (a *StampApiService) GetMessageStamps(ctx context.Context, messageId string) StampApiGetMessageStampsRequest { - return StampApiGetMessageStampsRequest{ +func (a *StampAPIService) GetMessageStamps(ctx context.Context, messageId string) StampAPIGetMessageStampsRequest { + return StampAPIGetMessageStampsRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -908,7 +906,7 @@ func (a *StampApiService) GetMessageStamps(ctx context.Context, messageId string // Execute executes the request // // @return []MessageStamp -func (a *StampApiService) GetMessageStampsExecute(r StampApiGetMessageStampsRequest) ([]MessageStamp, *http.Response, error) { +func (a *StampAPIService) GetMessageStampsExecute(r StampAPIGetMessageStampsRequest) ([]MessageStamp, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -916,7 +914,7 @@ func (a *StampApiService) GetMessageStampsExecute(r StampApiGetMessageStampsRequ localVarReturnValue []MessageStamp ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.GetMessageStamps") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.GetMessageStamps") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -982,19 +980,19 @@ func (a *StampApiService) GetMessageStampsExecute(r StampApiGetMessageStampsRequ return localVarReturnValue, localVarHTTPResponse, nil } -type StampApiGetMyStampHistoryRequest struct { +type StampAPIGetMyStampHistoryRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService limit *int32 } // 件数 -func (r StampApiGetMyStampHistoryRequest) Limit(limit int32) StampApiGetMyStampHistoryRequest { +func (r StampAPIGetMyStampHistoryRequest) Limit(limit int32) StampAPIGetMyStampHistoryRequest { r.limit = &limit return r } -func (r StampApiGetMyStampHistoryRequest) Execute() ([]StampHistoryEntry, *http.Response, error) { +func (r StampAPIGetMyStampHistoryRequest) Execute() ([]StampHistoryEntry, *http.Response, error) { return r.ApiService.GetMyStampHistoryExecute(r) } @@ -1007,10 +1005,10 @@ GetMyStampHistory スタンプ履歴を取得 このAPIが返すスタンプ履歴は厳密な履歴ではありません。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return StampApiGetMyStampHistoryRequest + @return StampAPIGetMyStampHistoryRequest */ -func (a *StampApiService) GetMyStampHistory(ctx context.Context) StampApiGetMyStampHistoryRequest { - return StampApiGetMyStampHistoryRequest{ +func (a *StampAPIService) GetMyStampHistory(ctx context.Context) StampAPIGetMyStampHistoryRequest { + return StampAPIGetMyStampHistoryRequest{ ApiService: a, ctx: ctx, } @@ -1019,7 +1017,7 @@ func (a *StampApiService) GetMyStampHistory(ctx context.Context) StampApiGetMySt // Execute executes the request // // @return []StampHistoryEntry -func (a *StampApiService) GetMyStampHistoryExecute(r StampApiGetMyStampHistoryRequest) ([]StampHistoryEntry, *http.Response, error) { +func (a *StampAPIService) GetMyStampHistoryExecute(r StampAPIGetMyStampHistoryRequest) ([]StampHistoryEntry, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1027,7 +1025,7 @@ func (a *StampApiService) GetMyStampHistoryExecute(r StampApiGetMyStampHistoryRe localVarReturnValue []StampHistoryEntry ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.GetMyStampHistory") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.GetMyStampHistory") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1039,7 +1037,10 @@ func (a *StampApiService) GetMyStampHistoryExecute(r StampApiGetMyStampHistoryRe localVarFormParams := url.Values{} if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } else { + var defaultValue int32 = 100 + r.limit = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1095,13 +1096,13 @@ func (a *StampApiService) GetMyStampHistoryExecute(r StampApiGetMyStampHistoryRe return localVarReturnValue, localVarHTTPResponse, nil } -type StampApiGetStampRequest struct { +type StampAPIGetStampRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService stampId string } -func (r StampApiGetStampRequest) Execute() (*Stamp, *http.Response, error) { +func (r StampAPIGetStampRequest) Execute() (*Stamp, *http.Response, error) { return r.ApiService.GetStampExecute(r) } @@ -1112,10 +1113,10 @@ GetStamp スタンプ情報を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param stampId スタンプUUID - @return StampApiGetStampRequest + @return StampAPIGetStampRequest */ -func (a *StampApiService) GetStamp(ctx context.Context, stampId string) StampApiGetStampRequest { - return StampApiGetStampRequest{ +func (a *StampAPIService) GetStamp(ctx context.Context, stampId string) StampAPIGetStampRequest { + return StampAPIGetStampRequest{ ApiService: a, ctx: ctx, stampId: stampId, @@ -1125,7 +1126,7 @@ func (a *StampApiService) GetStamp(ctx context.Context, stampId string) StampApi // Execute executes the request // // @return Stamp -func (a *StampApiService) GetStampExecute(r StampApiGetStampRequest) (*Stamp, *http.Response, error) { +func (a *StampAPIService) GetStampExecute(r StampAPIGetStampRequest) (*Stamp, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1133,7 +1134,7 @@ func (a *StampApiService) GetStampExecute(r StampApiGetStampRequest) (*Stamp, *h localVarReturnValue *Stamp ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.GetStamp") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.GetStamp") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1199,13 +1200,13 @@ func (a *StampApiService) GetStampExecute(r StampApiGetStampRequest) (*Stamp, *h return localVarReturnValue, localVarHTTPResponse, nil } -type StampApiGetStampImageRequest struct { +type StampAPIGetStampImageRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService stampId string } -func (r StampApiGetStampImageRequest) Execute() (*os.File, *http.Response, error) { +func (r StampAPIGetStampImageRequest) Execute() (*os.File, *http.Response, error) { return r.ApiService.GetStampImageExecute(r) } @@ -1216,10 +1217,10 @@ GetStampImage スタンプ画像を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param stampId スタンプUUID - @return StampApiGetStampImageRequest + @return StampAPIGetStampImageRequest */ -func (a *StampApiService) GetStampImage(ctx context.Context, stampId string) StampApiGetStampImageRequest { - return StampApiGetStampImageRequest{ +func (a *StampAPIService) GetStampImage(ctx context.Context, stampId string) StampAPIGetStampImageRequest { + return StampAPIGetStampImageRequest{ ApiService: a, ctx: ctx, stampId: stampId, @@ -1229,7 +1230,7 @@ func (a *StampApiService) GetStampImage(ctx context.Context, stampId string) Sta // Execute executes the request // // @return *os.File -func (a *StampApiService) GetStampImageExecute(r StampApiGetStampImageRequest) (*os.File, *http.Response, error) { +func (a *StampAPIService) GetStampImageExecute(r StampAPIGetStampImageRequest) (*os.File, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1237,7 +1238,7 @@ func (a *StampApiService) GetStampImageExecute(r StampApiGetStampImageRequest) ( localVarReturnValue *os.File ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.GetStampImage") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.GetStampImage") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1303,13 +1304,13 @@ func (a *StampApiService) GetStampImageExecute(r StampApiGetStampImageRequest) ( return localVarReturnValue, localVarHTTPResponse, nil } -type StampApiGetStampPaletteRequest struct { +type StampAPIGetStampPaletteRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService paletteId string } -func (r StampApiGetStampPaletteRequest) Execute() (*StampPalette, *http.Response, error) { +func (r StampAPIGetStampPaletteRequest) Execute() (*StampPalette, *http.Response, error) { return r.ApiService.GetStampPaletteExecute(r) } @@ -1320,10 +1321,10 @@ GetStampPalette スタンプパレットを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param paletteId スタンプパレットUUID - @return StampApiGetStampPaletteRequest + @return StampAPIGetStampPaletteRequest */ -func (a *StampApiService) GetStampPalette(ctx context.Context, paletteId string) StampApiGetStampPaletteRequest { - return StampApiGetStampPaletteRequest{ +func (a *StampAPIService) GetStampPalette(ctx context.Context, paletteId string) StampAPIGetStampPaletteRequest { + return StampAPIGetStampPaletteRequest{ ApiService: a, ctx: ctx, paletteId: paletteId, @@ -1333,7 +1334,7 @@ func (a *StampApiService) GetStampPalette(ctx context.Context, paletteId string) // Execute executes the request // // @return StampPalette -func (a *StampApiService) GetStampPaletteExecute(r StampApiGetStampPaletteRequest) (*StampPalette, *http.Response, error) { +func (a *StampAPIService) GetStampPaletteExecute(r StampAPIGetStampPaletteRequest) (*StampPalette, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1341,7 +1342,7 @@ func (a *StampApiService) GetStampPaletteExecute(r StampApiGetStampPaletteReques localVarReturnValue *StampPalette ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.GetStampPalette") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.GetStampPalette") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1407,12 +1408,12 @@ func (a *StampApiService) GetStampPaletteExecute(r StampApiGetStampPaletteReques return localVarReturnValue, localVarHTTPResponse, nil } -type StampApiGetStampPalettesRequest struct { +type StampAPIGetStampPalettesRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService } -func (r StampApiGetStampPalettesRequest) Execute() ([]StampPalette, *http.Response, error) { +func (r StampAPIGetStampPalettesRequest) Execute() ([]StampPalette, *http.Response, error) { return r.ApiService.GetStampPalettesExecute(r) } @@ -1422,10 +1423,10 @@ GetStampPalettes スタンプパレットのリストを取得 自身が所有しているスタンプパレットのリストを取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return StampApiGetStampPalettesRequest + @return StampAPIGetStampPalettesRequest */ -func (a *StampApiService) GetStampPalettes(ctx context.Context) StampApiGetStampPalettesRequest { - return StampApiGetStampPalettesRequest{ +func (a *StampAPIService) GetStampPalettes(ctx context.Context) StampAPIGetStampPalettesRequest { + return StampAPIGetStampPalettesRequest{ ApiService: a, ctx: ctx, } @@ -1434,7 +1435,7 @@ func (a *StampApiService) GetStampPalettes(ctx context.Context) StampApiGetStamp // Execute executes the request // // @return []StampPalette -func (a *StampApiService) GetStampPalettesExecute(r StampApiGetStampPalettesRequest) ([]StampPalette, *http.Response, error) { +func (a *StampAPIService) GetStampPalettesExecute(r StampAPIGetStampPalettesRequest) ([]StampPalette, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1442,7 +1443,7 @@ func (a *StampApiService) GetStampPalettesExecute(r StampApiGetStampPalettesRequ localVarReturnValue []StampPalette ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.GetStampPalettes") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.GetStampPalettes") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1507,13 +1508,13 @@ func (a *StampApiService) GetStampPalettesExecute(r StampApiGetStampPalettesRequ return localVarReturnValue, localVarHTTPResponse, nil } -type StampApiGetStampStatsRequest struct { +type StampAPIGetStampStatsRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService stampId string } -func (r StampApiGetStampStatsRequest) Execute() (*StampStats, *http.Response, error) { +func (r StampAPIGetStampStatsRequest) Execute() (*StampStats, *http.Response, error) { return r.ApiService.GetStampStatsExecute(r) } @@ -1524,10 +1525,10 @@ GetStampStats スタンプ統計情報を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param stampId スタンプUUID - @return StampApiGetStampStatsRequest + @return StampAPIGetStampStatsRequest */ -func (a *StampApiService) GetStampStats(ctx context.Context, stampId string) StampApiGetStampStatsRequest { - return StampApiGetStampStatsRequest{ +func (a *StampAPIService) GetStampStats(ctx context.Context, stampId string) StampAPIGetStampStatsRequest { + return StampAPIGetStampStatsRequest{ ApiService: a, ctx: ctx, stampId: stampId, @@ -1537,7 +1538,7 @@ func (a *StampApiService) GetStampStats(ctx context.Context, stampId string) Sta // Execute executes the request // // @return StampStats -func (a *StampApiService) GetStampStatsExecute(r StampApiGetStampStatsRequest) (*StampStats, *http.Response, error) { +func (a *StampAPIService) GetStampStatsExecute(r StampAPIGetStampStatsRequest) (*StampStats, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1545,7 +1546,7 @@ func (a *StampApiService) GetStampStatsExecute(r StampApiGetStampStatsRequest) ( localVarReturnValue *StampStats ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.GetStampStats") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.GetStampStats") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1611,27 +1612,27 @@ func (a *StampApiService) GetStampStatsExecute(r StampApiGetStampStatsRequest) ( return localVarReturnValue, localVarHTTPResponse, nil } -type StampApiGetStampsRequest struct { +type StampAPIGetStampsRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService includeUnicode *bool type_ *string } // Unicode絵文字を含ませるかどうか Deprecated: typeクエリを指定しなければ全てのスタンプを取得できるため、そちらを利用してください // Deprecated -func (r StampApiGetStampsRequest) IncludeUnicode(includeUnicode bool) StampApiGetStampsRequest { +func (r StampAPIGetStampsRequest) IncludeUnicode(includeUnicode bool) StampAPIGetStampsRequest { r.includeUnicode = &includeUnicode return r } // 取得するスタンプの種類 -func (r StampApiGetStampsRequest) Type_(type_ string) StampApiGetStampsRequest { +func (r StampAPIGetStampsRequest) Type_(type_ string) StampAPIGetStampsRequest { r.type_ = &type_ return r } -func (r StampApiGetStampsRequest) Execute() ([]StampWithThumbnail, *http.Response, error) { +func (r StampAPIGetStampsRequest) Execute() ([]StampWithThumbnail, *http.Response, error) { return r.ApiService.GetStampsExecute(r) } @@ -1641,10 +1642,10 @@ GetStamps スタンプリストを取得 スタンプのリストを取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return StampApiGetStampsRequest + @return StampAPIGetStampsRequest */ -func (a *StampApiService) GetStamps(ctx context.Context) StampApiGetStampsRequest { - return StampApiGetStampsRequest{ +func (a *StampAPIService) GetStamps(ctx context.Context) StampAPIGetStampsRequest { + return StampAPIGetStampsRequest{ ApiService: a, ctx: ctx, } @@ -1653,7 +1654,7 @@ func (a *StampApiService) GetStamps(ctx context.Context) StampApiGetStampsReques // Execute executes the request // // @return []StampWithThumbnail -func (a *StampApiService) GetStampsExecute(r StampApiGetStampsRequest) ([]StampWithThumbnail, *http.Response, error) { +func (a *StampAPIService) GetStampsExecute(r StampAPIGetStampsRequest) ([]StampWithThumbnail, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1661,7 +1662,7 @@ func (a *StampApiService) GetStampsExecute(r StampApiGetStampsRequest) ([]StampW localVarReturnValue []StampWithThumbnail ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.GetStamps") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.GetStamps") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1673,10 +1674,13 @@ func (a *StampApiService) GetStampsExecute(r StampApiGetStampsRequest) ([]StampW localVarFormParams := url.Values{} if r.includeUnicode != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "include-unicode", r.includeUnicode, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "include-unicode", r.includeUnicode, "form", "") + } else { + var defaultValue bool = true + r.includeUnicode = &defaultValue } if r.type_ != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1732,14 +1736,14 @@ func (a *StampApiService) GetStampsExecute(r StampApiGetStampsRequest) ([]StampW return localVarReturnValue, localVarHTTPResponse, nil } -type StampApiRemoveMessageStampRequest struct { +type StampAPIRemoveMessageStampRequest struct { ctx context.Context - ApiService *StampApiService + ApiService *StampAPIService messageId string stampId string } -func (r StampApiRemoveMessageStampRequest) Execute() (*http.Response, error) { +func (r StampAPIRemoveMessageStampRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveMessageStampExecute(r) } @@ -1751,10 +1755,10 @@ RemoveMessageStamp スタンプを消す @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param messageId メッセージUUID @param stampId スタンプUUID - @return StampApiRemoveMessageStampRequest + @return StampAPIRemoveMessageStampRequest */ -func (a *StampApiService) RemoveMessageStamp(ctx context.Context, messageId string, stampId string) StampApiRemoveMessageStampRequest { - return StampApiRemoveMessageStampRequest{ +func (a *StampAPIService) RemoveMessageStamp(ctx context.Context, messageId string, stampId string) StampAPIRemoveMessageStampRequest { + return StampAPIRemoveMessageStampRequest{ ApiService: a, ctx: ctx, messageId: messageId, @@ -1763,14 +1767,14 @@ func (a *StampApiService) RemoveMessageStamp(ctx context.Context, messageId stri } // Execute executes the request -func (a *StampApiService) RemoveMessageStampExecute(r StampApiRemoveMessageStampRequest) (*http.Response, error) { +func (a *StampAPIService) RemoveMessageStampExecute(r StampAPIRemoveMessageStampRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampApiService.RemoveMessageStamp") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StampAPIService.RemoveMessageStamp") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_star.go b/api_star.go index 43797be..eccb940 100644 --- a/api_star.go +++ b/api_star.go @@ -19,21 +19,21 @@ import ( "strings" ) -// StarApiService StarApi service -type StarApiService service +// StarAPIService StarAPI service +type StarAPIService service -type StarApiAddMyStarRequest struct { +type StarAPIAddMyStarRequest struct { ctx context.Context - ApiService *StarApiService + ApiService *StarAPIService postStarRequest *PostStarRequest } -func (r StarApiAddMyStarRequest) PostStarRequest(postStarRequest PostStarRequest) StarApiAddMyStarRequest { +func (r StarAPIAddMyStarRequest) PostStarRequest(postStarRequest PostStarRequest) StarAPIAddMyStarRequest { r.postStarRequest = &postStarRequest return r } -func (r StarApiAddMyStarRequest) Execute() (*http.Response, error) { +func (r StarAPIAddMyStarRequest) Execute() (*http.Response, error) { return r.ApiService.AddMyStarExecute(r) } @@ -45,24 +45,24 @@ AddMyStar チャンネルをスターに追加 不正なチャンネルIDを指定した場合、400を返します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return StarApiAddMyStarRequest + @return StarAPIAddMyStarRequest */ -func (a *StarApiService) AddMyStar(ctx context.Context) StarApiAddMyStarRequest { - return StarApiAddMyStarRequest{ +func (a *StarAPIService) AddMyStar(ctx context.Context) StarAPIAddMyStarRequest { + return StarAPIAddMyStarRequest{ ApiService: a, ctx: ctx, } } // Execute executes the request -func (a *StarApiService) AddMyStarExecute(r StarApiAddMyStarRequest) (*http.Response, error) { +func (a *StarAPIService) AddMyStarExecute(r StarAPIAddMyStarRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StarApiService.AddMyStar") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StarAPIService.AddMyStar") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -120,12 +120,12 @@ func (a *StarApiService) AddMyStarExecute(r StarApiAddMyStarRequest) (*http.Resp return localVarHTTPResponse, nil } -type StarApiGetMyStarsRequest struct { +type StarAPIGetMyStarsRequest struct { ctx context.Context - ApiService *StarApiService + ApiService *StarAPIService } -func (r StarApiGetMyStarsRequest) Execute() ([]string, *http.Response, error) { +func (r StarAPIGetMyStarsRequest) Execute() ([]string, *http.Response, error) { return r.ApiService.GetMyStarsExecute(r) } @@ -135,10 +135,10 @@ GetMyStars スターチャンネルリストを取得 自分がスターしているチャンネルのUUIDの配列を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return StarApiGetMyStarsRequest + @return StarAPIGetMyStarsRequest */ -func (a *StarApiService) GetMyStars(ctx context.Context) StarApiGetMyStarsRequest { - return StarApiGetMyStarsRequest{ +func (a *StarAPIService) GetMyStars(ctx context.Context) StarAPIGetMyStarsRequest { + return StarAPIGetMyStarsRequest{ ApiService: a, ctx: ctx, } @@ -147,7 +147,7 @@ func (a *StarApiService) GetMyStars(ctx context.Context) StarApiGetMyStarsReques // Execute executes the request // // @return []string -func (a *StarApiService) GetMyStarsExecute(r StarApiGetMyStarsRequest) ([]string, *http.Response, error) { +func (a *StarAPIService) GetMyStarsExecute(r StarAPIGetMyStarsRequest) ([]string, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -155,7 +155,7 @@ func (a *StarApiService) GetMyStarsExecute(r StarApiGetMyStarsRequest) ([]string localVarReturnValue []string ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StarApiService.GetMyStars") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StarAPIService.GetMyStars") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -220,13 +220,13 @@ func (a *StarApiService) GetMyStarsExecute(r StarApiGetMyStarsRequest) ([]string return localVarReturnValue, localVarHTTPResponse, nil } -type StarApiRemoveMyStarRequest struct { +type StarAPIRemoveMyStarRequest struct { ctx context.Context - ApiService *StarApiService + ApiService *StarAPIService channelId string } -func (r StarApiRemoveMyStarRequest) Execute() (*http.Response, error) { +func (r StarAPIRemoveMyStarRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveMyStarExecute(r) } @@ -237,10 +237,10 @@ RemoveMyStar チャンネルをスターから削除します @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param channelId チャンネルUUID - @return StarApiRemoveMyStarRequest + @return StarAPIRemoveMyStarRequest */ -func (a *StarApiService) RemoveMyStar(ctx context.Context, channelId string) StarApiRemoveMyStarRequest { - return StarApiRemoveMyStarRequest{ +func (a *StarAPIService) RemoveMyStar(ctx context.Context, channelId string) StarAPIRemoveMyStarRequest { + return StarAPIRemoveMyStarRequest{ ApiService: a, ctx: ctx, channelId: channelId, @@ -248,14 +248,14 @@ func (a *StarApiService) RemoveMyStar(ctx context.Context, channelId string) Sta } // Execute executes the request -func (a *StarApiService) RemoveMyStarExecute(r StarApiRemoveMyStarRequest) (*http.Response, error) { +func (a *StarAPIService) RemoveMyStarExecute(r StarAPIRemoveMyStarRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StarApiService.RemoveMyStar") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StarAPIService.RemoveMyStar") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_user.go b/api_user.go index a3e3dfb..af7b5dd 100644 --- a/api_user.go +++ b/api_user.go @@ -21,22 +21,22 @@ import ( "time" ) -// UserApiService UserApi service -type UserApiService service +// UserAPIService UserAPI service +type UserAPIService service -type UserApiAddUserTagRequest struct { +type UserAPIAddUserTagRequest struct { ctx context.Context - ApiService *UserApiService + ApiService *UserAPIService userId string postUserTagRequest *PostUserTagRequest } -func (r UserApiAddUserTagRequest) PostUserTagRequest(postUserTagRequest PostUserTagRequest) UserApiAddUserTagRequest { +func (r UserAPIAddUserTagRequest) PostUserTagRequest(postUserTagRequest PostUserTagRequest) UserAPIAddUserTagRequest { r.postUserTagRequest = &postUserTagRequest return r } -func (r UserApiAddUserTagRequest) Execute() (*UserTag, *http.Response, error) { +func (r UserAPIAddUserTagRequest) Execute() (*UserTag, *http.Response, error) { return r.ApiService.AddUserTagExecute(r) } @@ -48,10 +48,10 @@ Webhookユーザーにタグを追加することは出来ません。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID - @return UserApiAddUserTagRequest + @return UserAPIAddUserTagRequest */ -func (a *UserApiService) AddUserTag(ctx context.Context, userId string) UserApiAddUserTagRequest { - return UserApiAddUserTagRequest{ +func (a *UserAPIService) AddUserTag(ctx context.Context, userId string) UserAPIAddUserTagRequest { + return UserAPIAddUserTagRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -61,7 +61,7 @@ func (a *UserApiService) AddUserTag(ctx context.Context, userId string) UserApiA // Execute executes the request // // @return UserTag -func (a *UserApiService) AddUserTagExecute(r UserApiAddUserTagRequest) (*UserTag, *http.Response, error) { +func (a *UserAPIService) AddUserTagExecute(r UserAPIAddUserTagRequest) (*UserTag, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -69,7 +69,7 @@ func (a *UserApiService) AddUserTagExecute(r UserApiAddUserTagRequest) (*UserTag localVarReturnValue *UserTag ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.AddUserTag") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.AddUserTag") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -137,20 +137,20 @@ func (a *UserApiService) AddUserTagExecute(r UserApiAddUserTagRequest) (*UserTag return localVarReturnValue, localVarHTTPResponse, nil } -type UserApiChangeUserIconRequest struct { +type UserAPIChangeUserIconRequest struct { ctx context.Context - ApiService *UserApiService + ApiService *UserAPIService userId string file *os.File } // アイコン画像(2MBまでのpng, jpeg, gif) -func (r UserApiChangeUserIconRequest) File(file *os.File) UserApiChangeUserIconRequest { +func (r UserAPIChangeUserIconRequest) File(file *os.File) UserAPIChangeUserIconRequest { r.file = file return r } -func (r UserApiChangeUserIconRequest) Execute() (*http.Response, error) { +func (r UserAPIChangeUserIconRequest) Execute() (*http.Response, error) { return r.ApiService.ChangeUserIconExecute(r) } @@ -162,10 +162,10 @@ ChangeUserIcon ユーザーのアイコン画像を変更します @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID - @return UserApiChangeUserIconRequest + @return UserAPIChangeUserIconRequest */ -func (a *UserApiService) ChangeUserIcon(ctx context.Context, userId string) UserApiChangeUserIconRequest { - return UserApiChangeUserIconRequest{ +func (a *UserAPIService) ChangeUserIcon(ctx context.Context, userId string) UserAPIChangeUserIconRequest { + return UserAPIChangeUserIconRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -173,14 +173,14 @@ func (a *UserApiService) ChangeUserIcon(ctx context.Context, userId string) User } // Execute executes the request -func (a *UserApiService) ChangeUserIconExecute(r UserApiChangeUserIconRequest) (*http.Response, error) { +func (a *UserAPIService) ChangeUserIconExecute(r UserAPIChangeUserIconRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.ChangeUserIcon") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ChangeUserIcon") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -217,7 +217,6 @@ func (a *UserApiService) ChangeUserIconExecute(r UserApiChangeUserIconRequest) ( var fileLocalVarFileBytes []byte fileLocalVarFormFileName = "file" - fileLocalVarFile := r.file if fileLocalVarFile != nil { @@ -256,19 +255,19 @@ func (a *UserApiService) ChangeUserIconExecute(r UserApiChangeUserIconRequest) ( return localVarHTTPResponse, nil } -type UserApiChangeUserPasswordRequest struct { +type UserAPIChangeUserPasswordRequest struct { ctx context.Context - ApiService *UserApiService + ApiService *UserAPIService userId string putUserPasswordRequest *PutUserPasswordRequest } -func (r UserApiChangeUserPasswordRequest) PutUserPasswordRequest(putUserPasswordRequest PutUserPasswordRequest) UserApiChangeUserPasswordRequest { +func (r UserAPIChangeUserPasswordRequest) PutUserPasswordRequest(putUserPasswordRequest PutUserPasswordRequest) UserAPIChangeUserPasswordRequest { r.putUserPasswordRequest = &putUserPasswordRequest return r } -func (r UserApiChangeUserPasswordRequest) Execute() (*http.Response, error) { +func (r UserAPIChangeUserPasswordRequest) Execute() (*http.Response, error) { return r.ApiService.ChangeUserPasswordExecute(r) } @@ -280,10 +279,10 @@ ChangeUserPassword ユーザーのパスワードを変更 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID - @return UserApiChangeUserPasswordRequest + @return UserAPIChangeUserPasswordRequest */ -func (a *UserApiService) ChangeUserPassword(ctx context.Context, userId string) UserApiChangeUserPasswordRequest { - return UserApiChangeUserPasswordRequest{ +func (a *UserAPIService) ChangeUserPassword(ctx context.Context, userId string) UserAPIChangeUserPasswordRequest { + return UserAPIChangeUserPasswordRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -291,14 +290,14 @@ func (a *UserApiService) ChangeUserPassword(ctx context.Context, userId string) } // Execute executes the request -func (a *UserApiService) ChangeUserPasswordExecute(r UserApiChangeUserPasswordRequest) (*http.Response, error) { +func (a *UserAPIService) ChangeUserPasswordExecute(r UserAPIChangeUserPasswordRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.ChangeUserPassword") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ChangeUserPassword") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -357,18 +356,18 @@ func (a *UserApiService) ChangeUserPasswordExecute(r UserApiChangeUserPasswordRe return localVarHTTPResponse, nil } -type UserApiCreateUserRequest struct { +type UserAPICreateUserRequest struct { ctx context.Context - ApiService *UserApiService + ApiService *UserAPIService postUserRequest *PostUserRequest } -func (r UserApiCreateUserRequest) PostUserRequest(postUserRequest PostUserRequest) UserApiCreateUserRequest { +func (r UserAPICreateUserRequest) PostUserRequest(postUserRequest PostUserRequest) UserAPICreateUserRequest { r.postUserRequest = &postUserRequest return r } -func (r UserApiCreateUserRequest) Execute() (*UserDetail, *http.Response, error) { +func (r UserAPICreateUserRequest) Execute() (*UserDetail, *http.Response, error) { return r.ApiService.CreateUserExecute(r) } @@ -379,10 +378,10 @@ CreateUser ユーザーを登録 管理者権限が必要です。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return UserApiCreateUserRequest + @return UserAPICreateUserRequest */ -func (a *UserApiService) CreateUser(ctx context.Context) UserApiCreateUserRequest { - return UserApiCreateUserRequest{ +func (a *UserAPIService) CreateUser(ctx context.Context) UserAPICreateUserRequest { + return UserAPICreateUserRequest{ ApiService: a, ctx: ctx, } @@ -391,7 +390,7 @@ func (a *UserApiService) CreateUser(ctx context.Context) UserApiCreateUserReques // Execute executes the request // // @return UserDetail -func (a *UserApiService) CreateUserExecute(r UserApiCreateUserRequest) (*UserDetail, *http.Response, error) { +func (a *UserAPIService) CreateUserExecute(r UserAPICreateUserRequest) (*UserDetail, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -399,7 +398,7 @@ func (a *UserApiService) CreateUserExecute(r UserApiCreateUserRequest) (*UserDet localVarReturnValue *UserDetail ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.CreateUser") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -466,19 +465,19 @@ func (a *UserApiService) CreateUserExecute(r UserApiCreateUserRequest) (*UserDet return localVarReturnValue, localVarHTTPResponse, nil } -type UserApiEditUserRequest struct { +type UserAPIEditUserRequest struct { ctx context.Context - ApiService *UserApiService + ApiService *UserAPIService userId string patchUserRequest *PatchUserRequest } -func (r UserApiEditUserRequest) PatchUserRequest(patchUserRequest PatchUserRequest) UserApiEditUserRequest { +func (r UserAPIEditUserRequest) PatchUserRequest(patchUserRequest PatchUserRequest) UserAPIEditUserRequest { r.patchUserRequest = &patchUserRequest return r } -func (r UserApiEditUserRequest) Execute() (*http.Response, error) { +func (r UserAPIEditUserRequest) Execute() (*http.Response, error) { return r.ApiService.EditUserExecute(r) } @@ -490,10 +489,10 @@ EditUser ユーザー情報を変更 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID - @return UserApiEditUserRequest + @return UserAPIEditUserRequest */ -func (a *UserApiService) EditUser(ctx context.Context, userId string) UserApiEditUserRequest { - return UserApiEditUserRequest{ +func (a *UserAPIService) EditUser(ctx context.Context, userId string) UserAPIEditUserRequest { + return UserAPIEditUserRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -501,14 +500,14 @@ func (a *UserApiService) EditUser(ctx context.Context, userId string) UserApiEdi } // Execute executes the request -func (a *UserApiService) EditUserExecute(r UserApiEditUserRequest) (*http.Response, error) { +func (a *UserAPIService) EditUserExecute(r UserAPIEditUserRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.EditUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.EditUser") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -567,20 +566,20 @@ func (a *UserApiService) EditUserExecute(r UserApiEditUserRequest) (*http.Respon return localVarHTTPResponse, nil } -type UserApiEditUserTagRequest struct { +type UserAPIEditUserTagRequest struct { ctx context.Context - ApiService *UserApiService + ApiService *UserAPIService userId string tagId string patchUserTagRequest *PatchUserTagRequest } -func (r UserApiEditUserTagRequest) PatchUserTagRequest(patchUserTagRequest PatchUserTagRequest) UserApiEditUserTagRequest { +func (r UserAPIEditUserTagRequest) PatchUserTagRequest(patchUserTagRequest PatchUserTagRequest) UserAPIEditUserTagRequest { r.patchUserTagRequest = &patchUserTagRequest return r } -func (r UserApiEditUserTagRequest) Execute() (*http.Response, error) { +func (r UserAPIEditUserTagRequest) Execute() (*http.Response, error) { return r.ApiService.EditUserTagExecute(r) } @@ -593,10 +592,10 @@ EditUserTag ユーザーのタグを編集 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID @param tagId タグUUID - @return UserApiEditUserTagRequest + @return UserAPIEditUserTagRequest */ -func (a *UserApiService) EditUserTag(ctx context.Context, userId string, tagId string) UserApiEditUserTagRequest { - return UserApiEditUserTagRequest{ +func (a *UserAPIService) EditUserTag(ctx context.Context, userId string, tagId string) UserAPIEditUserTagRequest { + return UserAPIEditUserTagRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -605,14 +604,14 @@ func (a *UserApiService) EditUserTag(ctx context.Context, userId string, tagId s } // Execute executes the request -func (a *UserApiService) EditUserTagExecute(r UserApiEditUserTagRequest) (*http.Response, error) { +func (a *UserAPIService) EditUserTagExecute(r UserAPIEditUserTagRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.EditUserTag") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.EditUserTag") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -672,9 +671,9 @@ func (a *UserApiService) EditUserTagExecute(r UserApiEditUserTagRequest) (*http. return localVarHTTPResponse, nil } -type UserApiGetDirectMessagesRequest struct { +type UserAPIGetDirectMessagesRequest struct { ctx context.Context - ApiService *UserApiService + ApiService *UserAPIService userId string limit *int32 offset *int32 @@ -685,42 +684,42 @@ type UserApiGetDirectMessagesRequest struct { } // 取得する件数 -func (r UserApiGetDirectMessagesRequest) Limit(limit int32) UserApiGetDirectMessagesRequest { +func (r UserAPIGetDirectMessagesRequest) Limit(limit int32) UserAPIGetDirectMessagesRequest { r.limit = &limit return r } // 取得するオフセット -func (r UserApiGetDirectMessagesRequest) Offset(offset int32) UserApiGetDirectMessagesRequest { +func (r UserAPIGetDirectMessagesRequest) Offset(offset int32) UserAPIGetDirectMessagesRequest { r.offset = &offset return r } // 取得する時間範囲の開始日時 -func (r UserApiGetDirectMessagesRequest) Since(since time.Time) UserApiGetDirectMessagesRequest { +func (r UserAPIGetDirectMessagesRequest) Since(since time.Time) UserAPIGetDirectMessagesRequest { r.since = &since return r } // 取得する時間範囲の終了日時 -func (r UserApiGetDirectMessagesRequest) Until(until time.Time) UserApiGetDirectMessagesRequest { +func (r UserAPIGetDirectMessagesRequest) Until(until time.Time) UserAPIGetDirectMessagesRequest { r.until = &until return r } // 範囲の端を含めるかどうか -func (r UserApiGetDirectMessagesRequest) Inclusive(inclusive bool) UserApiGetDirectMessagesRequest { +func (r UserAPIGetDirectMessagesRequest) Inclusive(inclusive bool) UserAPIGetDirectMessagesRequest { r.inclusive = &inclusive return r } // 昇順か降順か -func (r UserApiGetDirectMessagesRequest) Order(order string) UserApiGetDirectMessagesRequest { +func (r UserAPIGetDirectMessagesRequest) Order(order string) UserAPIGetDirectMessagesRequest { r.order = &order return r } -func (r UserApiGetDirectMessagesRequest) Execute() ([]Message, *http.Response, error) { +func (r UserAPIGetDirectMessagesRequest) Execute() ([]Message, *http.Response, error) { return r.ApiService.GetDirectMessagesExecute(r) } @@ -731,10 +730,10 @@ GetDirectMessages ダイレクトメッセージのリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID - @return UserApiGetDirectMessagesRequest + @return UserAPIGetDirectMessagesRequest */ -func (a *UserApiService) GetDirectMessages(ctx context.Context, userId string) UserApiGetDirectMessagesRequest { - return UserApiGetDirectMessagesRequest{ +func (a *UserAPIService) GetDirectMessages(ctx context.Context, userId string) UserAPIGetDirectMessagesRequest { + return UserAPIGetDirectMessagesRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -744,7 +743,7 @@ func (a *UserApiService) GetDirectMessages(ctx context.Context, userId string) U // Execute executes the request // // @return []Message -func (a *UserApiService) GetDirectMessagesExecute(r UserApiGetDirectMessagesRequest) ([]Message, *http.Response, error) { +func (a *UserAPIService) GetDirectMessagesExecute(r UserAPIGetDirectMessagesRequest) ([]Message, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -752,7 +751,7 @@ func (a *UserApiService) GetDirectMessagesExecute(r UserApiGetDirectMessagesRequ localVarReturnValue []Message ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetDirectMessages") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.GetDirectMessages") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -765,22 +764,34 @@ func (a *UserApiService) GetDirectMessagesExecute(r UserApiGetDirectMessagesRequ localVarFormParams := url.Values{} if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") } if r.offset != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } else { + var defaultValue int32 = 0 + r.offset = &defaultValue } if r.since != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "form", "") + } else { + var defaultValue time.Time + r.since = &defaultValue } if r.until != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "form", "") } if r.inclusive != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "inclusive", r.inclusive, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "inclusive", r.inclusive, "form", "") + } else { + var defaultValue bool = false + r.inclusive = &defaultValue } if r.order != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "form", "") + } else { + var defaultValue string = "desc" + r.order = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -836,13 +847,13 @@ func (a *UserApiService) GetDirectMessagesExecute(r UserApiGetDirectMessagesRequ return localVarReturnValue, localVarHTTPResponse, nil } -type UserApiGetUserRequest struct { +type UserAPIGetUserRequest struct { ctx context.Context - ApiService *UserApiService + ApiService *UserAPIService userId string } -func (r UserApiGetUserRequest) Execute() (*UserDetail, *http.Response, error) { +func (r UserAPIGetUserRequest) Execute() (*UserDetail, *http.Response, error) { return r.ApiService.GetUserExecute(r) } @@ -853,10 +864,10 @@ GetUser ユーザー詳細情報を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID - @return UserApiGetUserRequest + @return UserAPIGetUserRequest */ -func (a *UserApiService) GetUser(ctx context.Context, userId string) UserApiGetUserRequest { - return UserApiGetUserRequest{ +func (a *UserAPIService) GetUser(ctx context.Context, userId string) UserAPIGetUserRequest { + return UserAPIGetUserRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -866,7 +877,7 @@ func (a *UserApiService) GetUser(ctx context.Context, userId string) UserApiGetU // Execute executes the request // // @return UserDetail -func (a *UserApiService) GetUserExecute(r UserApiGetUserRequest) (*UserDetail, *http.Response, error) { +func (a *UserAPIService) GetUserExecute(r UserAPIGetUserRequest) (*UserDetail, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -874,7 +885,7 @@ func (a *UserApiService) GetUserExecute(r UserApiGetUserRequest) (*UserDetail, * localVarReturnValue *UserDetail ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.GetUser") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -940,13 +951,13 @@ func (a *UserApiService) GetUserExecute(r UserApiGetUserRequest) (*UserDetail, * return localVarReturnValue, localVarHTTPResponse, nil } -type UserApiGetUserDMChannelRequest struct { +type UserAPIGetUserDMChannelRequest struct { ctx context.Context - ApiService *UserApiService + ApiService *UserAPIService userId string } -func (r UserApiGetUserDMChannelRequest) Execute() (*DMChannel, *http.Response, error) { +func (r UserAPIGetUserDMChannelRequest) Execute() (*DMChannel, *http.Response, error) { return r.ApiService.GetUserDMChannelExecute(r) } @@ -958,10 +969,10 @@ GetUserDMChannel DMチャンネル情報を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId - @return UserApiGetUserDMChannelRequest + @return UserAPIGetUserDMChannelRequest */ -func (a *UserApiService) GetUserDMChannel(ctx context.Context, userId string) UserApiGetUserDMChannelRequest { - return UserApiGetUserDMChannelRequest{ +func (a *UserAPIService) GetUserDMChannel(ctx context.Context, userId string) UserAPIGetUserDMChannelRequest { + return UserAPIGetUserDMChannelRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -971,7 +982,7 @@ func (a *UserApiService) GetUserDMChannel(ctx context.Context, userId string) Us // Execute executes the request // // @return DMChannel -func (a *UserApiService) GetUserDMChannelExecute(r UserApiGetUserDMChannelRequest) (*DMChannel, *http.Response, error) { +func (a *UserAPIService) GetUserDMChannelExecute(r UserAPIGetUserDMChannelRequest) (*DMChannel, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -979,7 +990,7 @@ func (a *UserApiService) GetUserDMChannelExecute(r UserApiGetUserDMChannelReques localVarReturnValue *DMChannel ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserDMChannel") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.GetUserDMChannel") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1045,13 +1056,13 @@ func (a *UserApiService) GetUserDMChannelExecute(r UserApiGetUserDMChannelReques return localVarReturnValue, localVarHTTPResponse, nil } -type UserApiGetUserIconRequest struct { +type UserAPIGetUserIconRequest struct { ctx context.Context - ApiService *UserApiService + ApiService *UserAPIService userId string } -func (r UserApiGetUserIconRequest) Execute() (*os.File, *http.Response, error) { +func (r UserAPIGetUserIconRequest) Execute() (*os.File, *http.Response, error) { return r.ApiService.GetUserIconExecute(r) } @@ -1062,10 +1073,10 @@ GetUserIcon ユーザーのアイコン画像を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID - @return UserApiGetUserIconRequest + @return UserAPIGetUserIconRequest */ -func (a *UserApiService) GetUserIcon(ctx context.Context, userId string) UserApiGetUserIconRequest { - return UserApiGetUserIconRequest{ +func (a *UserAPIService) GetUserIcon(ctx context.Context, userId string) UserAPIGetUserIconRequest { + return UserAPIGetUserIconRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -1075,7 +1086,7 @@ func (a *UserApiService) GetUserIcon(ctx context.Context, userId string) UserApi // Execute executes the request // // @return *os.File -func (a *UserApiService) GetUserIconExecute(r UserApiGetUserIconRequest) (*os.File, *http.Response, error) { +func (a *UserAPIService) GetUserIconExecute(r UserAPIGetUserIconRequest) (*os.File, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1083,7 +1094,7 @@ func (a *UserApiService) GetUserIconExecute(r UserApiGetUserIconRequest) (*os.Fi localVarReturnValue *os.File ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserIcon") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.GetUserIcon") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1149,13 +1160,13 @@ func (a *UserApiService) GetUserIconExecute(r UserApiGetUserIconRequest) (*os.Fi return localVarReturnValue, localVarHTTPResponse, nil } -type UserApiGetUserStatsRequest struct { +type UserAPIGetUserStatsRequest struct { ctx context.Context - ApiService *UserApiService + ApiService *UserAPIService userId string } -func (r UserApiGetUserStatsRequest) Execute() (*UserStats, *http.Response, error) { +func (r UserAPIGetUserStatsRequest) Execute() (*UserStats, *http.Response, error) { return r.ApiService.GetUserStatsExecute(r) } @@ -1166,10 +1177,10 @@ GetUserStats ユーザー統計情報を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID - @return UserApiGetUserStatsRequest + @return UserAPIGetUserStatsRequest */ -func (a *UserApiService) GetUserStats(ctx context.Context, userId string) UserApiGetUserStatsRequest { - return UserApiGetUserStatsRequest{ +func (a *UserAPIService) GetUserStats(ctx context.Context, userId string) UserAPIGetUserStatsRequest { + return UserAPIGetUserStatsRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -1179,7 +1190,7 @@ func (a *UserApiService) GetUserStats(ctx context.Context, userId string) UserAp // Execute executes the request // // @return UserStats -func (a *UserApiService) GetUserStatsExecute(r UserApiGetUserStatsRequest) (*UserStats, *http.Response, error) { +func (a *UserAPIService) GetUserStatsExecute(r UserAPIGetUserStatsRequest) (*UserStats, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1187,7 +1198,7 @@ func (a *UserApiService) GetUserStatsExecute(r UserApiGetUserStatsRequest) (*Use localVarReturnValue *UserStats ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserStats") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.GetUserStats") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1253,13 +1264,13 @@ func (a *UserApiService) GetUserStatsExecute(r UserApiGetUserStatsRequest) (*Use return localVarReturnValue, localVarHTTPResponse, nil } -type UserApiGetUserTagsRequest struct { +type UserAPIGetUserTagsRequest struct { ctx context.Context - ApiService *UserApiService + ApiService *UserAPIService userId string } -func (r UserApiGetUserTagsRequest) Execute() ([]UserTag, *http.Response, error) { +func (r UserAPIGetUserTagsRequest) Execute() ([]UserTag, *http.Response, error) { return r.ApiService.GetUserTagsExecute(r) } @@ -1270,10 +1281,10 @@ GetUserTags ユーザーのタグリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID - @return UserApiGetUserTagsRequest + @return UserAPIGetUserTagsRequest */ -func (a *UserApiService) GetUserTags(ctx context.Context, userId string) UserApiGetUserTagsRequest { - return UserApiGetUserTagsRequest{ +func (a *UserAPIService) GetUserTags(ctx context.Context, userId string) UserAPIGetUserTagsRequest { + return UserAPIGetUserTagsRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -1283,7 +1294,7 @@ func (a *UserApiService) GetUserTags(ctx context.Context, userId string) UserApi // Execute executes the request // // @return []UserTag -func (a *UserApiService) GetUserTagsExecute(r UserApiGetUserTagsRequest) ([]UserTag, *http.Response, error) { +func (a *UserAPIService) GetUserTagsExecute(r UserAPIGetUserTagsRequest) ([]UserTag, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1291,7 +1302,7 @@ func (a *UserApiService) GetUserTagsExecute(r UserApiGetUserTagsRequest) ([]User localVarReturnValue []UserTag ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserTags") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.GetUserTags") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1357,26 +1368,26 @@ func (a *UserApiService) GetUserTagsExecute(r UserApiGetUserTagsRequest) ([]User return localVarReturnValue, localVarHTTPResponse, nil } -type UserApiGetUsersRequest struct { +type UserAPIGetUsersRequest struct { ctx context.Context - ApiService *UserApiService + ApiService *UserAPIService includeSuspended *bool name *string } // アカウントがアクティブでないユーザーを含め、全てのユーザーを取得するかどうか -func (r UserApiGetUsersRequest) IncludeSuspended(includeSuspended bool) UserApiGetUsersRequest { +func (r UserAPIGetUsersRequest) IncludeSuspended(includeSuspended bool) UserAPIGetUsersRequest { r.includeSuspended = &includeSuspended return r } // 名前が一致するアカウントのみを取得する -func (r UserApiGetUsersRequest) Name(name string) UserApiGetUsersRequest { +func (r UserAPIGetUsersRequest) Name(name string) UserAPIGetUsersRequest { r.name = &name return r } -func (r UserApiGetUsersRequest) Execute() ([]User, *http.Response, error) { +func (r UserAPIGetUsersRequest) Execute() ([]User, *http.Response, error) { return r.ApiService.GetUsersExecute(r) } @@ -1388,10 +1399,10 @@ GetUsers ユーザーのリストを取得 `include-suspended`と`name`を同時に指定することはできません。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return UserApiGetUsersRequest + @return UserAPIGetUsersRequest */ -func (a *UserApiService) GetUsers(ctx context.Context) UserApiGetUsersRequest { - return UserApiGetUsersRequest{ +func (a *UserAPIService) GetUsers(ctx context.Context) UserAPIGetUsersRequest { + return UserAPIGetUsersRequest{ ApiService: a, ctx: ctx, } @@ -1400,7 +1411,7 @@ func (a *UserApiService) GetUsers(ctx context.Context) UserApiGetUsersRequest { // Execute executes the request // // @return []User -func (a *UserApiService) GetUsersExecute(r UserApiGetUsersRequest) ([]User, *http.Response, error) { +func (a *UserAPIService) GetUsersExecute(r UserAPIGetUsersRequest) ([]User, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1408,7 +1419,7 @@ func (a *UserApiService) GetUsersExecute(r UserApiGetUsersRequest) ([]User, *htt localVarReturnValue []User ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUsers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.GetUsers") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1420,10 +1431,13 @@ func (a *UserApiService) GetUsersExecute(r UserApiGetUsersRequest) ([]User, *htt localVarFormParams := url.Values{} if r.includeSuspended != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "include-suspended", r.includeSuspended, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "include-suspended", r.includeSuspended, "form", "") + } else { + var defaultValue bool = false + r.includeSuspended = &defaultValue } if r.name != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1479,19 +1493,19 @@ func (a *UserApiService) GetUsersExecute(r UserApiGetUsersRequest) ([]User, *htt return localVarReturnValue, localVarHTTPResponse, nil } -type UserApiPostDirectMessageRequest struct { +type UserAPIPostDirectMessageRequest struct { ctx context.Context - ApiService *UserApiService + ApiService *UserAPIService userId string postMessageRequest *PostMessageRequest } -func (r UserApiPostDirectMessageRequest) PostMessageRequest(postMessageRequest PostMessageRequest) UserApiPostDirectMessageRequest { +func (r UserAPIPostDirectMessageRequest) PostMessageRequest(postMessageRequest PostMessageRequest) UserAPIPostDirectMessageRequest { r.postMessageRequest = &postMessageRequest return r } -func (r UserApiPostDirectMessageRequest) Execute() (*Message, *http.Response, error) { +func (r UserAPIPostDirectMessageRequest) Execute() (*Message, *http.Response, error) { return r.ApiService.PostDirectMessageExecute(r) } @@ -1502,10 +1516,10 @@ PostDirectMessage ダイレクトメッセージを送信 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID - @return UserApiPostDirectMessageRequest + @return UserAPIPostDirectMessageRequest */ -func (a *UserApiService) PostDirectMessage(ctx context.Context, userId string) UserApiPostDirectMessageRequest { - return UserApiPostDirectMessageRequest{ +func (a *UserAPIService) PostDirectMessage(ctx context.Context, userId string) UserAPIPostDirectMessageRequest { + return UserAPIPostDirectMessageRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -1515,7 +1529,7 @@ func (a *UserApiService) PostDirectMessage(ctx context.Context, userId string) U // Execute executes the request // // @return Message -func (a *UserApiService) PostDirectMessageExecute(r UserApiPostDirectMessageRequest) (*Message, *http.Response, error) { +func (a *UserAPIService) PostDirectMessageExecute(r UserAPIPostDirectMessageRequest) (*Message, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -1523,7 +1537,7 @@ func (a *UserApiService) PostDirectMessageExecute(r UserApiPostDirectMessageRequ localVarReturnValue *Message ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.PostDirectMessage") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.PostDirectMessage") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1591,14 +1605,14 @@ func (a *UserApiService) PostDirectMessageExecute(r UserApiPostDirectMessageRequ return localVarReturnValue, localVarHTTPResponse, nil } -type UserApiRemoveUserTagRequest struct { +type UserAPIRemoveUserTagRequest struct { ctx context.Context - ApiService *UserApiService + ApiService *UserAPIService userId string tagId string } -func (r UserApiRemoveUserTagRequest) Execute() (*http.Response, error) { +func (r UserAPIRemoveUserTagRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveUserTagExecute(r) } @@ -1610,10 +1624,10 @@ RemoveUserTag ユーザーからタグを削除します @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID @param tagId タグUUID - @return UserApiRemoveUserTagRequest + @return UserAPIRemoveUserTagRequest */ -func (a *UserApiService) RemoveUserTag(ctx context.Context, userId string, tagId string) UserApiRemoveUserTagRequest { - return UserApiRemoveUserTagRequest{ +func (a *UserAPIService) RemoveUserTag(ctx context.Context, userId string, tagId string) UserAPIRemoveUserTagRequest { + return UserAPIRemoveUserTagRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -1622,14 +1636,14 @@ func (a *UserApiService) RemoveUserTag(ctx context.Context, userId string, tagId } // Execute executes the request -func (a *UserApiService) RemoveUserTagExecute(r UserApiRemoveUserTagRequest) (*http.Response, error) { +func (a *UserAPIService) RemoveUserTagExecute(r UserAPIRemoveUserTagRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.RemoveUserTag") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.RemoveUserTag") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_user_tag.go b/api_user_tag.go index 3300a1f..9e1584d 100644 --- a/api_user_tag.go +++ b/api_user_tag.go @@ -19,21 +19,21 @@ import ( "strings" ) -// UserTagApiService UserTagApi service -type UserTagApiService service +// UserTagAPIService UserTagAPI service +type UserTagAPIService service -type UserTagApiAddMyUserTagRequest struct { +type UserTagAPIAddMyUserTagRequest struct { ctx context.Context - ApiService *UserTagApiService + ApiService *UserTagAPIService postUserTagRequest *PostUserTagRequest } -func (r UserTagApiAddMyUserTagRequest) PostUserTagRequest(postUserTagRequest PostUserTagRequest) UserTagApiAddMyUserTagRequest { +func (r UserTagAPIAddMyUserTagRequest) PostUserTagRequest(postUserTagRequest PostUserTagRequest) UserTagAPIAddMyUserTagRequest { r.postUserTagRequest = &postUserTagRequest return r } -func (r UserTagApiAddMyUserTagRequest) Execute() (*UserTag, *http.Response, error) { +func (r UserTagAPIAddMyUserTagRequest) Execute() (*UserTag, *http.Response, error) { return r.ApiService.AddMyUserTagExecute(r) } @@ -43,10 +43,10 @@ AddMyUserTag 自分にタグを追加 自分に新しくタグを追加します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return UserTagApiAddMyUserTagRequest + @return UserTagAPIAddMyUserTagRequest */ -func (a *UserTagApiService) AddMyUserTag(ctx context.Context) UserTagApiAddMyUserTagRequest { - return UserTagApiAddMyUserTagRequest{ +func (a *UserTagAPIService) AddMyUserTag(ctx context.Context) UserTagAPIAddMyUserTagRequest { + return UserTagAPIAddMyUserTagRequest{ ApiService: a, ctx: ctx, } @@ -55,7 +55,7 @@ func (a *UserTagApiService) AddMyUserTag(ctx context.Context) UserTagApiAddMyUse // Execute executes the request // // @return UserTag -func (a *UserTagApiService) AddMyUserTagExecute(r UserTagApiAddMyUserTagRequest) (*UserTag, *http.Response, error) { +func (a *UserTagAPIService) AddMyUserTagExecute(r UserTagAPIAddMyUserTagRequest) (*UserTag, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -63,7 +63,7 @@ func (a *UserTagApiService) AddMyUserTagExecute(r UserTagApiAddMyUserTagRequest) localVarReturnValue *UserTag ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagApiService.AddMyUserTag") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagAPIService.AddMyUserTag") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -130,19 +130,19 @@ func (a *UserTagApiService) AddMyUserTagExecute(r UserTagApiAddMyUserTagRequest) return localVarReturnValue, localVarHTTPResponse, nil } -type UserTagApiAddUserTagRequest struct { +type UserTagAPIAddUserTagRequest struct { ctx context.Context - ApiService *UserTagApiService + ApiService *UserTagAPIService userId string postUserTagRequest *PostUserTagRequest } -func (r UserTagApiAddUserTagRequest) PostUserTagRequest(postUserTagRequest PostUserTagRequest) UserTagApiAddUserTagRequest { +func (r UserTagAPIAddUserTagRequest) PostUserTagRequest(postUserTagRequest PostUserTagRequest) UserTagAPIAddUserTagRequest { r.postUserTagRequest = &postUserTagRequest return r } -func (r UserTagApiAddUserTagRequest) Execute() (*UserTag, *http.Response, error) { +func (r UserTagAPIAddUserTagRequest) Execute() (*UserTag, *http.Response, error) { return r.ApiService.AddUserTagExecute(r) } @@ -154,10 +154,10 @@ Webhookユーザーにタグを追加することは出来ません。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID - @return UserTagApiAddUserTagRequest + @return UserTagAPIAddUserTagRequest */ -func (a *UserTagApiService) AddUserTag(ctx context.Context, userId string) UserTagApiAddUserTagRequest { - return UserTagApiAddUserTagRequest{ +func (a *UserTagAPIService) AddUserTag(ctx context.Context, userId string) UserTagAPIAddUserTagRequest { + return UserTagAPIAddUserTagRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -167,7 +167,7 @@ func (a *UserTagApiService) AddUserTag(ctx context.Context, userId string) UserT // Execute executes the request // // @return UserTag -func (a *UserTagApiService) AddUserTagExecute(r UserTagApiAddUserTagRequest) (*UserTag, *http.Response, error) { +func (a *UserTagAPIService) AddUserTagExecute(r UserTagAPIAddUserTagRequest) (*UserTag, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -175,7 +175,7 @@ func (a *UserTagApiService) AddUserTagExecute(r UserTagApiAddUserTagRequest) (*U localVarReturnValue *UserTag ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagApiService.AddUserTag") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagAPIService.AddUserTag") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -243,19 +243,19 @@ func (a *UserTagApiService) AddUserTagExecute(r UserTagApiAddUserTagRequest) (*U return localVarReturnValue, localVarHTTPResponse, nil } -type UserTagApiEditMyUserTagRequest struct { +type UserTagAPIEditMyUserTagRequest struct { ctx context.Context - ApiService *UserTagApiService + ApiService *UserTagAPIService tagId string patchUserTagRequest *PatchUserTagRequest } -func (r UserTagApiEditMyUserTagRequest) PatchUserTagRequest(patchUserTagRequest PatchUserTagRequest) UserTagApiEditMyUserTagRequest { +func (r UserTagAPIEditMyUserTagRequest) PatchUserTagRequest(patchUserTagRequest PatchUserTagRequest) UserTagAPIEditMyUserTagRequest { r.patchUserTagRequest = &patchUserTagRequest return r } -func (r UserTagApiEditMyUserTagRequest) Execute() (*http.Response, error) { +func (r UserTagAPIEditMyUserTagRequest) Execute() (*http.Response, error) { return r.ApiService.EditMyUserTagExecute(r) } @@ -266,10 +266,10 @@ EditMyUserTag 自分のタグを編集 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param tagId タグUUID - @return UserTagApiEditMyUserTagRequest + @return UserTagAPIEditMyUserTagRequest */ -func (a *UserTagApiService) EditMyUserTag(ctx context.Context, tagId string) UserTagApiEditMyUserTagRequest { - return UserTagApiEditMyUserTagRequest{ +func (a *UserTagAPIService) EditMyUserTag(ctx context.Context, tagId string) UserTagAPIEditMyUserTagRequest { + return UserTagAPIEditMyUserTagRequest{ ApiService: a, ctx: ctx, tagId: tagId, @@ -277,14 +277,14 @@ func (a *UserTagApiService) EditMyUserTag(ctx context.Context, tagId string) Use } // Execute executes the request -func (a *UserTagApiService) EditMyUserTagExecute(r UserTagApiEditMyUserTagRequest) (*http.Response, error) { +func (a *UserTagAPIService) EditMyUserTagExecute(r UserTagAPIEditMyUserTagRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagApiService.EditMyUserTag") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagAPIService.EditMyUserTag") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -343,20 +343,20 @@ func (a *UserTagApiService) EditMyUserTagExecute(r UserTagApiEditMyUserTagReques return localVarHTTPResponse, nil } -type UserTagApiEditUserTagRequest struct { +type UserTagAPIEditUserTagRequest struct { ctx context.Context - ApiService *UserTagApiService + ApiService *UserTagAPIService userId string tagId string patchUserTagRequest *PatchUserTagRequest } -func (r UserTagApiEditUserTagRequest) PatchUserTagRequest(patchUserTagRequest PatchUserTagRequest) UserTagApiEditUserTagRequest { +func (r UserTagAPIEditUserTagRequest) PatchUserTagRequest(patchUserTagRequest PatchUserTagRequest) UserTagAPIEditUserTagRequest { r.patchUserTagRequest = &patchUserTagRequest return r } -func (r UserTagApiEditUserTagRequest) Execute() (*http.Response, error) { +func (r UserTagAPIEditUserTagRequest) Execute() (*http.Response, error) { return r.ApiService.EditUserTagExecute(r) } @@ -369,10 +369,10 @@ EditUserTag ユーザーのタグを編集 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID @param tagId タグUUID - @return UserTagApiEditUserTagRequest + @return UserTagAPIEditUserTagRequest */ -func (a *UserTagApiService) EditUserTag(ctx context.Context, userId string, tagId string) UserTagApiEditUserTagRequest { - return UserTagApiEditUserTagRequest{ +func (a *UserTagAPIService) EditUserTag(ctx context.Context, userId string, tagId string) UserTagAPIEditUserTagRequest { + return UserTagAPIEditUserTagRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -381,14 +381,14 @@ func (a *UserTagApiService) EditUserTag(ctx context.Context, userId string, tagI } // Execute executes the request -func (a *UserTagApiService) EditUserTagExecute(r UserTagApiEditUserTagRequest) (*http.Response, error) { +func (a *UserTagAPIService) EditUserTagExecute(r UserTagAPIEditUserTagRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagApiService.EditUserTag") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagAPIService.EditUserTag") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -448,12 +448,12 @@ func (a *UserTagApiService) EditUserTagExecute(r UserTagApiEditUserTagRequest) ( return localVarHTTPResponse, nil } -type UserTagApiGetMyUserTagsRequest struct { +type UserTagAPIGetMyUserTagsRequest struct { ctx context.Context - ApiService *UserTagApiService + ApiService *UserTagAPIService } -func (r UserTagApiGetMyUserTagsRequest) Execute() ([]UserTag, *http.Response, error) { +func (r UserTagAPIGetMyUserTagsRequest) Execute() ([]UserTag, *http.Response, error) { return r.ApiService.GetMyUserTagsExecute(r) } @@ -463,10 +463,10 @@ GetMyUserTags 自分のタグリストを取得 自分に付けられているタグの配列を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return UserTagApiGetMyUserTagsRequest + @return UserTagAPIGetMyUserTagsRequest */ -func (a *UserTagApiService) GetMyUserTags(ctx context.Context) UserTagApiGetMyUserTagsRequest { - return UserTagApiGetMyUserTagsRequest{ +func (a *UserTagAPIService) GetMyUserTags(ctx context.Context) UserTagAPIGetMyUserTagsRequest { + return UserTagAPIGetMyUserTagsRequest{ ApiService: a, ctx: ctx, } @@ -475,7 +475,7 @@ func (a *UserTagApiService) GetMyUserTags(ctx context.Context) UserTagApiGetMyUs // Execute executes the request // // @return []UserTag -func (a *UserTagApiService) GetMyUserTagsExecute(r UserTagApiGetMyUserTagsRequest) ([]UserTag, *http.Response, error) { +func (a *UserTagAPIService) GetMyUserTagsExecute(r UserTagAPIGetMyUserTagsRequest) ([]UserTag, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -483,7 +483,7 @@ func (a *UserTagApiService) GetMyUserTagsExecute(r UserTagApiGetMyUserTagsReques localVarReturnValue []UserTag ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagApiService.GetMyUserTags") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagAPIService.GetMyUserTags") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -548,13 +548,13 @@ func (a *UserTagApiService) GetMyUserTagsExecute(r UserTagApiGetMyUserTagsReques return localVarReturnValue, localVarHTTPResponse, nil } -type UserTagApiGetTagRequest struct { +type UserTagAPIGetTagRequest struct { ctx context.Context - ApiService *UserTagApiService + ApiService *UserTagAPIService tagId string } -func (r UserTagApiGetTagRequest) Execute() (*Tag, *http.Response, error) { +func (r UserTagAPIGetTagRequest) Execute() (*Tag, *http.Response, error) { return r.ApiService.GetTagExecute(r) } @@ -565,10 +565,10 @@ GetTag タグ情報を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param tagId タグUUID - @return UserTagApiGetTagRequest + @return UserTagAPIGetTagRequest */ -func (a *UserTagApiService) GetTag(ctx context.Context, tagId string) UserTagApiGetTagRequest { - return UserTagApiGetTagRequest{ +func (a *UserTagAPIService) GetTag(ctx context.Context, tagId string) UserTagAPIGetTagRequest { + return UserTagAPIGetTagRequest{ ApiService: a, ctx: ctx, tagId: tagId, @@ -578,7 +578,7 @@ func (a *UserTagApiService) GetTag(ctx context.Context, tagId string) UserTagApi // Execute executes the request // // @return Tag -func (a *UserTagApiService) GetTagExecute(r UserTagApiGetTagRequest) (*Tag, *http.Response, error) { +func (a *UserTagAPIService) GetTagExecute(r UserTagAPIGetTagRequest) (*Tag, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -586,7 +586,7 @@ func (a *UserTagApiService) GetTagExecute(r UserTagApiGetTagRequest) (*Tag, *htt localVarReturnValue *Tag ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagApiService.GetTag") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagAPIService.GetTag") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -652,13 +652,13 @@ func (a *UserTagApiService) GetTagExecute(r UserTagApiGetTagRequest) (*Tag, *htt return localVarReturnValue, localVarHTTPResponse, nil } -type UserTagApiGetUserTagsRequest struct { +type UserTagAPIGetUserTagsRequest struct { ctx context.Context - ApiService *UserTagApiService + ApiService *UserTagAPIService userId string } -func (r UserTagApiGetUserTagsRequest) Execute() ([]UserTag, *http.Response, error) { +func (r UserTagAPIGetUserTagsRequest) Execute() ([]UserTag, *http.Response, error) { return r.ApiService.GetUserTagsExecute(r) } @@ -669,10 +669,10 @@ GetUserTags ユーザーのタグリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID - @return UserTagApiGetUserTagsRequest + @return UserTagAPIGetUserTagsRequest */ -func (a *UserTagApiService) GetUserTags(ctx context.Context, userId string) UserTagApiGetUserTagsRequest { - return UserTagApiGetUserTagsRequest{ +func (a *UserTagAPIService) GetUserTags(ctx context.Context, userId string) UserTagAPIGetUserTagsRequest { + return UserTagAPIGetUserTagsRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -682,7 +682,7 @@ func (a *UserTagApiService) GetUserTags(ctx context.Context, userId string) User // Execute executes the request // // @return []UserTag -func (a *UserTagApiService) GetUserTagsExecute(r UserTagApiGetUserTagsRequest) ([]UserTag, *http.Response, error) { +func (a *UserTagAPIService) GetUserTagsExecute(r UserTagAPIGetUserTagsRequest) ([]UserTag, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -690,7 +690,7 @@ func (a *UserTagApiService) GetUserTagsExecute(r UserTagApiGetUserTagsRequest) ( localVarReturnValue []UserTag ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagApiService.GetUserTags") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagAPIService.GetUserTags") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -756,13 +756,13 @@ func (a *UserTagApiService) GetUserTagsExecute(r UserTagApiGetUserTagsRequest) ( return localVarReturnValue, localVarHTTPResponse, nil } -type UserTagApiRemoveMyUserTagRequest struct { +type UserTagAPIRemoveMyUserTagRequest struct { ctx context.Context - ApiService *UserTagApiService + ApiService *UserTagAPIService tagId string } -func (r UserTagApiRemoveMyUserTagRequest) Execute() (*http.Response, error) { +func (r UserTagAPIRemoveMyUserTagRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveMyUserTagExecute(r) } @@ -773,10 +773,10 @@ RemoveMyUserTag 自分からタグを削除します @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param tagId タグUUID - @return UserTagApiRemoveMyUserTagRequest + @return UserTagAPIRemoveMyUserTagRequest */ -func (a *UserTagApiService) RemoveMyUserTag(ctx context.Context, tagId string) UserTagApiRemoveMyUserTagRequest { - return UserTagApiRemoveMyUserTagRequest{ +func (a *UserTagAPIService) RemoveMyUserTag(ctx context.Context, tagId string) UserTagAPIRemoveMyUserTagRequest { + return UserTagAPIRemoveMyUserTagRequest{ ApiService: a, ctx: ctx, tagId: tagId, @@ -784,14 +784,14 @@ func (a *UserTagApiService) RemoveMyUserTag(ctx context.Context, tagId string) U } // Execute executes the request -func (a *UserTagApiService) RemoveMyUserTagExecute(r UserTagApiRemoveMyUserTagRequest) (*http.Response, error) { +func (a *UserTagAPIService) RemoveMyUserTagExecute(r UserTagAPIRemoveMyUserTagRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagApiService.RemoveMyUserTag") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagAPIService.RemoveMyUserTag") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -848,14 +848,14 @@ func (a *UserTagApiService) RemoveMyUserTagExecute(r UserTagApiRemoveMyUserTagRe return localVarHTTPResponse, nil } -type UserTagApiRemoveUserTagRequest struct { +type UserTagAPIRemoveUserTagRequest struct { ctx context.Context - ApiService *UserTagApiService + ApiService *UserTagAPIService userId string tagId string } -func (r UserTagApiRemoveUserTagRequest) Execute() (*http.Response, error) { +func (r UserTagAPIRemoveUserTagRequest) Execute() (*http.Response, error) { return r.ApiService.RemoveUserTagExecute(r) } @@ -867,10 +867,10 @@ RemoveUserTag ユーザーからタグを削除します @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param userId ユーザーUUID @param tagId タグUUID - @return UserTagApiRemoveUserTagRequest + @return UserTagAPIRemoveUserTagRequest */ -func (a *UserTagApiService) RemoveUserTag(ctx context.Context, userId string, tagId string) UserTagApiRemoveUserTagRequest { - return UserTagApiRemoveUserTagRequest{ +func (a *UserTagAPIService) RemoveUserTag(ctx context.Context, userId string, tagId string) UserTagAPIRemoveUserTagRequest { + return UserTagAPIRemoveUserTagRequest{ ApiService: a, ctx: ctx, userId: userId, @@ -879,14 +879,14 @@ func (a *UserTagApiService) RemoveUserTag(ctx context.Context, userId string, ta } // Execute executes the request -func (a *UserTagApiService) RemoveUserTagExecute(r UserTagApiRemoveUserTagRequest) (*http.Response, error) { +func (a *UserTagAPIService) RemoveUserTagExecute(r UserTagAPIRemoveUserTagRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagApiService.RemoveUserTag") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserTagAPIService.RemoveUserTag") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_webhook.go b/api_webhook.go index 71b9960..64a9d2a 100644 --- a/api_webhook.go +++ b/api_webhook.go @@ -21,23 +21,23 @@ import ( "time" ) -// WebhookApiService WebhookApi service -type WebhookApiService service +// WebhookAPIService WebhookAPI service +type WebhookAPIService service -type WebhookApiChangeWebhookIconRequest struct { +type WebhookAPIChangeWebhookIconRequest struct { ctx context.Context - ApiService *WebhookApiService + ApiService *WebhookAPIService webhookId string file *os.File } // アイコン画像(2MBまでのpng, jpeg, gif) -func (r WebhookApiChangeWebhookIconRequest) File(file *os.File) WebhookApiChangeWebhookIconRequest { +func (r WebhookAPIChangeWebhookIconRequest) File(file *os.File) WebhookAPIChangeWebhookIconRequest { r.file = file return r } -func (r WebhookApiChangeWebhookIconRequest) Execute() (*http.Response, error) { +func (r WebhookAPIChangeWebhookIconRequest) Execute() (*http.Response, error) { return r.ApiService.ChangeWebhookIconExecute(r) } @@ -48,10 +48,10 @@ ChangeWebhookIcon Webhookのアイコンを変更 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param webhookId WebhookUUID - @return WebhookApiChangeWebhookIconRequest + @return WebhookAPIChangeWebhookIconRequest */ -func (a *WebhookApiService) ChangeWebhookIcon(ctx context.Context, webhookId string) WebhookApiChangeWebhookIconRequest { - return WebhookApiChangeWebhookIconRequest{ +func (a *WebhookAPIService) ChangeWebhookIcon(ctx context.Context, webhookId string) WebhookAPIChangeWebhookIconRequest { + return WebhookAPIChangeWebhookIconRequest{ ApiService: a, ctx: ctx, webhookId: webhookId, @@ -59,14 +59,14 @@ func (a *WebhookApiService) ChangeWebhookIcon(ctx context.Context, webhookId str } // Execute executes the request -func (a *WebhookApiService) ChangeWebhookIconExecute(r WebhookApiChangeWebhookIconRequest) (*http.Response, error) { +func (a *WebhookAPIService) ChangeWebhookIconExecute(r WebhookAPIChangeWebhookIconRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookApiService.ChangeWebhookIcon") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookAPIService.ChangeWebhookIcon") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -103,7 +103,6 @@ func (a *WebhookApiService) ChangeWebhookIconExecute(r WebhookApiChangeWebhookIc var fileLocalVarFileBytes []byte fileLocalVarFormFileName = "file" - fileLocalVarFile := r.file if fileLocalVarFile != nil { @@ -142,18 +141,18 @@ func (a *WebhookApiService) ChangeWebhookIconExecute(r WebhookApiChangeWebhookIc return localVarHTTPResponse, nil } -type WebhookApiCreateWebhookRequest struct { +type WebhookAPICreateWebhookRequest struct { ctx context.Context - ApiService *WebhookApiService + ApiService *WebhookAPIService postWebhookRequest *PostWebhookRequest } -func (r WebhookApiCreateWebhookRequest) PostWebhookRequest(postWebhookRequest PostWebhookRequest) WebhookApiCreateWebhookRequest { +func (r WebhookAPICreateWebhookRequest) PostWebhookRequest(postWebhookRequest PostWebhookRequest) WebhookAPICreateWebhookRequest { r.postWebhookRequest = &postWebhookRequest return r } -func (r WebhookApiCreateWebhookRequest) Execute() (*Webhook, *http.Response, error) { +func (r WebhookAPICreateWebhookRequest) Execute() (*Webhook, *http.Response, error) { return r.ApiService.CreateWebhookExecute(r) } @@ -164,10 +163,10 @@ Webhookを新規作成します。 `secret`が空文字の場合、insecureウェブフックが作成されます。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return WebhookApiCreateWebhookRequest + @return WebhookAPICreateWebhookRequest */ -func (a *WebhookApiService) CreateWebhook(ctx context.Context) WebhookApiCreateWebhookRequest { - return WebhookApiCreateWebhookRequest{ +func (a *WebhookAPIService) CreateWebhook(ctx context.Context) WebhookAPICreateWebhookRequest { + return WebhookAPICreateWebhookRequest{ ApiService: a, ctx: ctx, } @@ -176,7 +175,7 @@ func (a *WebhookApiService) CreateWebhook(ctx context.Context) WebhookApiCreateW // Execute executes the request // // @return Webhook -func (a *WebhookApiService) CreateWebhookExecute(r WebhookApiCreateWebhookRequest) (*Webhook, *http.Response, error) { +func (a *WebhookAPIService) CreateWebhookExecute(r WebhookAPICreateWebhookRequest) (*Webhook, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -184,7 +183,7 @@ func (a *WebhookApiService) CreateWebhookExecute(r WebhookApiCreateWebhookReques localVarReturnValue *Webhook ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookApiService.CreateWebhook") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookAPIService.CreateWebhook") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -251,13 +250,13 @@ func (a *WebhookApiService) CreateWebhookExecute(r WebhookApiCreateWebhookReques return localVarReturnValue, localVarHTTPResponse, nil } -type WebhookApiDeleteWebhookRequest struct { +type WebhookAPIDeleteWebhookRequest struct { ctx context.Context - ApiService *WebhookApiService + ApiService *WebhookAPIService webhookId string } -func (r WebhookApiDeleteWebhookRequest) Execute() (*http.Response, error) { +func (r WebhookAPIDeleteWebhookRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteWebhookExecute(r) } @@ -269,10 +268,10 @@ Webhookによって投稿されたメッセージは削除されません。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param webhookId WebhookUUID - @return WebhookApiDeleteWebhookRequest + @return WebhookAPIDeleteWebhookRequest */ -func (a *WebhookApiService) DeleteWebhook(ctx context.Context, webhookId string) WebhookApiDeleteWebhookRequest { - return WebhookApiDeleteWebhookRequest{ +func (a *WebhookAPIService) DeleteWebhook(ctx context.Context, webhookId string) WebhookAPIDeleteWebhookRequest { + return WebhookAPIDeleteWebhookRequest{ ApiService: a, ctx: ctx, webhookId: webhookId, @@ -280,14 +279,14 @@ func (a *WebhookApiService) DeleteWebhook(ctx context.Context, webhookId string) } // Execute executes the request -func (a *WebhookApiService) DeleteWebhookExecute(r WebhookApiDeleteWebhookRequest) (*http.Response, error) { +func (a *WebhookAPIService) DeleteWebhookExecute(r WebhookAPIDeleteWebhookRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookApiService.DeleteWebhook") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookAPIService.DeleteWebhook") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -344,19 +343,19 @@ func (a *WebhookApiService) DeleteWebhookExecute(r WebhookApiDeleteWebhookReques return localVarHTTPResponse, nil } -type WebhookApiEditWebhookRequest struct { +type WebhookAPIEditWebhookRequest struct { ctx context.Context - ApiService *WebhookApiService + ApiService *WebhookAPIService webhookId string patchWebhookRequest *PatchWebhookRequest } -func (r WebhookApiEditWebhookRequest) PatchWebhookRequest(patchWebhookRequest PatchWebhookRequest) WebhookApiEditWebhookRequest { +func (r WebhookAPIEditWebhookRequest) PatchWebhookRequest(patchWebhookRequest PatchWebhookRequest) WebhookAPIEditWebhookRequest { r.patchWebhookRequest = &patchWebhookRequest return r } -func (r WebhookApiEditWebhookRequest) Execute() (*http.Response, error) { +func (r WebhookAPIEditWebhookRequest) Execute() (*http.Response, error) { return r.ApiService.EditWebhookExecute(r) } @@ -367,10 +366,10 @@ EditWebhook Webhook情報を変更 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param webhookId WebhookUUID - @return WebhookApiEditWebhookRequest + @return WebhookAPIEditWebhookRequest */ -func (a *WebhookApiService) EditWebhook(ctx context.Context, webhookId string) WebhookApiEditWebhookRequest { - return WebhookApiEditWebhookRequest{ +func (a *WebhookAPIService) EditWebhook(ctx context.Context, webhookId string) WebhookAPIEditWebhookRequest { + return WebhookAPIEditWebhookRequest{ ApiService: a, ctx: ctx, webhookId: webhookId, @@ -378,14 +377,14 @@ func (a *WebhookApiService) EditWebhook(ctx context.Context, webhookId string) W } // Execute executes the request -func (a *WebhookApiService) EditWebhookExecute(r WebhookApiEditWebhookRequest) (*http.Response, error) { +func (a *WebhookAPIService) EditWebhookExecute(r WebhookAPIEditWebhookRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookApiService.EditWebhook") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookAPIService.EditWebhook") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -444,13 +443,13 @@ func (a *WebhookApiService) EditWebhookExecute(r WebhookApiEditWebhookRequest) ( return localVarHTTPResponse, nil } -type WebhookApiGetWebhookRequest struct { +type WebhookAPIGetWebhookRequest struct { ctx context.Context - ApiService *WebhookApiService + ApiService *WebhookAPIService webhookId string } -func (r WebhookApiGetWebhookRequest) Execute() (*Webhook, *http.Response, error) { +func (r WebhookAPIGetWebhookRequest) Execute() (*Webhook, *http.Response, error) { return r.ApiService.GetWebhookExecute(r) } @@ -461,10 +460,10 @@ GetWebhook Webhook情報を取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param webhookId WebhookUUID - @return WebhookApiGetWebhookRequest + @return WebhookAPIGetWebhookRequest */ -func (a *WebhookApiService) GetWebhook(ctx context.Context, webhookId string) WebhookApiGetWebhookRequest { - return WebhookApiGetWebhookRequest{ +func (a *WebhookAPIService) GetWebhook(ctx context.Context, webhookId string) WebhookAPIGetWebhookRequest { + return WebhookAPIGetWebhookRequest{ ApiService: a, ctx: ctx, webhookId: webhookId, @@ -474,7 +473,7 @@ func (a *WebhookApiService) GetWebhook(ctx context.Context, webhookId string) We // Execute executes the request // // @return Webhook -func (a *WebhookApiService) GetWebhookExecute(r WebhookApiGetWebhookRequest) (*Webhook, *http.Response, error) { +func (a *WebhookAPIService) GetWebhookExecute(r WebhookAPIGetWebhookRequest) (*Webhook, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -482,7 +481,7 @@ func (a *WebhookApiService) GetWebhookExecute(r WebhookApiGetWebhookRequest) (*W localVarReturnValue *Webhook ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookApiService.GetWebhook") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookAPIService.GetWebhook") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -548,13 +547,13 @@ func (a *WebhookApiService) GetWebhookExecute(r WebhookApiGetWebhookRequest) (*W return localVarReturnValue, localVarHTTPResponse, nil } -type WebhookApiGetWebhookIconRequest struct { +type WebhookAPIGetWebhookIconRequest struct { ctx context.Context - ApiService *WebhookApiService + ApiService *WebhookAPIService webhookId string } -func (r WebhookApiGetWebhookIconRequest) Execute() (*os.File, *http.Response, error) { +func (r WebhookAPIGetWebhookIconRequest) Execute() (*os.File, *http.Response, error) { return r.ApiService.GetWebhookIconExecute(r) } @@ -565,10 +564,10 @@ GetWebhookIcon Webhookのアイコンを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param webhookId WebhookUUID - @return WebhookApiGetWebhookIconRequest + @return WebhookAPIGetWebhookIconRequest */ -func (a *WebhookApiService) GetWebhookIcon(ctx context.Context, webhookId string) WebhookApiGetWebhookIconRequest { - return WebhookApiGetWebhookIconRequest{ +func (a *WebhookAPIService) GetWebhookIcon(ctx context.Context, webhookId string) WebhookAPIGetWebhookIconRequest { + return WebhookAPIGetWebhookIconRequest{ ApiService: a, ctx: ctx, webhookId: webhookId, @@ -578,7 +577,7 @@ func (a *WebhookApiService) GetWebhookIcon(ctx context.Context, webhookId string // Execute executes the request // // @return *os.File -func (a *WebhookApiService) GetWebhookIconExecute(r WebhookApiGetWebhookIconRequest) (*os.File, *http.Response, error) { +func (a *WebhookAPIService) GetWebhookIconExecute(r WebhookAPIGetWebhookIconRequest) (*os.File, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -586,7 +585,7 @@ func (a *WebhookApiService) GetWebhookIconExecute(r WebhookApiGetWebhookIconRequ localVarReturnValue *os.File ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookApiService.GetWebhookIcon") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookAPIService.GetWebhookIcon") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -652,9 +651,9 @@ func (a *WebhookApiService) GetWebhookIconExecute(r WebhookApiGetWebhookIconRequ return localVarReturnValue, localVarHTTPResponse, nil } -type WebhookApiGetWebhookMessagesRequest struct { +type WebhookAPIGetWebhookMessagesRequest struct { ctx context.Context - ApiService *WebhookApiService + ApiService *WebhookAPIService webhookId string limit *int32 offset *int32 @@ -665,42 +664,42 @@ type WebhookApiGetWebhookMessagesRequest struct { } // 取得する件数 -func (r WebhookApiGetWebhookMessagesRequest) Limit(limit int32) WebhookApiGetWebhookMessagesRequest { +func (r WebhookAPIGetWebhookMessagesRequest) Limit(limit int32) WebhookAPIGetWebhookMessagesRequest { r.limit = &limit return r } // 取得するオフセット -func (r WebhookApiGetWebhookMessagesRequest) Offset(offset int32) WebhookApiGetWebhookMessagesRequest { +func (r WebhookAPIGetWebhookMessagesRequest) Offset(offset int32) WebhookAPIGetWebhookMessagesRequest { r.offset = &offset return r } // 取得する時間範囲の開始日時 -func (r WebhookApiGetWebhookMessagesRequest) Since(since time.Time) WebhookApiGetWebhookMessagesRequest { +func (r WebhookAPIGetWebhookMessagesRequest) Since(since time.Time) WebhookAPIGetWebhookMessagesRequest { r.since = &since return r } // 取得する時間範囲の終了日時 -func (r WebhookApiGetWebhookMessagesRequest) Until(until time.Time) WebhookApiGetWebhookMessagesRequest { +func (r WebhookAPIGetWebhookMessagesRequest) Until(until time.Time) WebhookAPIGetWebhookMessagesRequest { r.until = &until return r } // 範囲の端を含めるかどうか -func (r WebhookApiGetWebhookMessagesRequest) Inclusive(inclusive bool) WebhookApiGetWebhookMessagesRequest { +func (r WebhookAPIGetWebhookMessagesRequest) Inclusive(inclusive bool) WebhookAPIGetWebhookMessagesRequest { r.inclusive = &inclusive return r } // 昇順か降順か -func (r WebhookApiGetWebhookMessagesRequest) Order(order string) WebhookApiGetWebhookMessagesRequest { +func (r WebhookAPIGetWebhookMessagesRequest) Order(order string) WebhookAPIGetWebhookMessagesRequest { r.order = &order return r } -func (r WebhookApiGetWebhookMessagesRequest) Execute() ([]Message, *http.Response, error) { +func (r WebhookAPIGetWebhookMessagesRequest) Execute() ([]Message, *http.Response, error) { return r.ApiService.GetWebhookMessagesExecute(r) } @@ -711,10 +710,10 @@ GetWebhookMessages Webhookの投稿メッセージのリストを取得 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param webhookId WebhookUUID - @return WebhookApiGetWebhookMessagesRequest + @return WebhookAPIGetWebhookMessagesRequest */ -func (a *WebhookApiService) GetWebhookMessages(ctx context.Context, webhookId string) WebhookApiGetWebhookMessagesRequest { - return WebhookApiGetWebhookMessagesRequest{ +func (a *WebhookAPIService) GetWebhookMessages(ctx context.Context, webhookId string) WebhookAPIGetWebhookMessagesRequest { + return WebhookAPIGetWebhookMessagesRequest{ ApiService: a, ctx: ctx, webhookId: webhookId, @@ -724,7 +723,7 @@ func (a *WebhookApiService) GetWebhookMessages(ctx context.Context, webhookId st // Execute executes the request // // @return []Message -func (a *WebhookApiService) GetWebhookMessagesExecute(r WebhookApiGetWebhookMessagesRequest) ([]Message, *http.Response, error) { +func (a *WebhookAPIService) GetWebhookMessagesExecute(r WebhookAPIGetWebhookMessagesRequest) ([]Message, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -732,7 +731,7 @@ func (a *WebhookApiService) GetWebhookMessagesExecute(r WebhookApiGetWebhookMess localVarReturnValue []Message ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookApiService.GetWebhookMessages") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookAPIService.GetWebhookMessages") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -745,22 +744,34 @@ func (a *WebhookApiService) GetWebhookMessagesExecute(r WebhookApiGetWebhookMess localVarFormParams := url.Values{} if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") } if r.offset != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "form", "") + } else { + var defaultValue int32 = 0 + r.offset = &defaultValue } if r.since != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "form", "") + } else { + var defaultValue time.Time + r.since = &defaultValue } if r.until != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "form", "") } if r.inclusive != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "inclusive", r.inclusive, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "inclusive", r.inclusive, "form", "") + } else { + var defaultValue bool = false + r.inclusive = &defaultValue } if r.order != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "form", "") + } else { + var defaultValue string = "desc" + r.order = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -816,19 +827,19 @@ func (a *WebhookApiService) GetWebhookMessagesExecute(r WebhookApiGetWebhookMess return localVarReturnValue, localVarHTTPResponse, nil } -type WebhookApiGetWebhooksRequest struct { +type WebhookAPIGetWebhooksRequest struct { ctx context.Context - ApiService *WebhookApiService + ApiService *WebhookAPIService all *bool } // 全てのWebhookを取得します。権限が必要です。 -func (r WebhookApiGetWebhooksRequest) All(all bool) WebhookApiGetWebhooksRequest { +func (r WebhookAPIGetWebhooksRequest) All(all bool) WebhookAPIGetWebhooksRequest { r.all = &all return r } -func (r WebhookApiGetWebhooksRequest) Execute() ([]Webhook, *http.Response, error) { +func (r WebhookAPIGetWebhooksRequest) Execute() ([]Webhook, *http.Response, error) { return r.ApiService.GetWebhooksExecute(r) } @@ -839,10 +850,10 @@ Webhookのリストを取得します。 allがtrueで無い場合は、自分がオーナーのWebhookのリストを返します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return WebhookApiGetWebhooksRequest + @return WebhookAPIGetWebhooksRequest */ -func (a *WebhookApiService) GetWebhooks(ctx context.Context) WebhookApiGetWebhooksRequest { - return WebhookApiGetWebhooksRequest{ +func (a *WebhookAPIService) GetWebhooks(ctx context.Context) WebhookAPIGetWebhooksRequest { + return WebhookAPIGetWebhooksRequest{ ApiService: a, ctx: ctx, } @@ -851,7 +862,7 @@ func (a *WebhookApiService) GetWebhooks(ctx context.Context) WebhookApiGetWebhoo // Execute executes the request // // @return []Webhook -func (a *WebhookApiService) GetWebhooksExecute(r WebhookApiGetWebhooksRequest) ([]Webhook, *http.Response, error) { +func (a *WebhookAPIService) GetWebhooksExecute(r WebhookAPIGetWebhooksRequest) ([]Webhook, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -859,7 +870,7 @@ func (a *WebhookApiService) GetWebhooksExecute(r WebhookApiGetWebhooksRequest) ( localVarReturnValue []Webhook ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookApiService.GetWebhooks") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookAPIService.GetWebhooks") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -871,7 +882,10 @@ func (a *WebhookApiService) GetWebhooksExecute(r WebhookApiGetWebhooksRequest) ( localVarFormParams := url.Values{} if r.all != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "all", r.all, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "all", r.all, "form", "") + } else { + var defaultValue bool = false + r.all = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -927,9 +941,9 @@ func (a *WebhookApiService) GetWebhooksExecute(r WebhookApiGetWebhooksRequest) ( return localVarReturnValue, localVarHTTPResponse, nil } -type WebhookApiPostWebhookRequest struct { +type WebhookAPIPostWebhookRequest struct { ctx context.Context - ApiService *WebhookApiService + ApiService *WebhookAPIService webhookId string xTRAQSignature *string xTRAQChannelId *string @@ -938,29 +952,29 @@ type WebhookApiPostWebhookRequest struct { } // リクエストボディシグネチャ(Secretが設定されている場合は必須) -func (r WebhookApiPostWebhookRequest) XTRAQSignature(xTRAQSignature string) WebhookApiPostWebhookRequest { +func (r WebhookAPIPostWebhookRequest) XTRAQSignature(xTRAQSignature string) WebhookAPIPostWebhookRequest { r.xTRAQSignature = &xTRAQSignature return r } // 投稿先のチャンネルID(変更する場合) -func (r WebhookApiPostWebhookRequest) XTRAQChannelId(xTRAQChannelId string) WebhookApiPostWebhookRequest { +func (r WebhookAPIPostWebhookRequest) XTRAQChannelId(xTRAQChannelId string) WebhookAPIPostWebhookRequest { r.xTRAQChannelId = &xTRAQChannelId return r } // メンション・チャンネルリンクを自動埋め込みする場合に1を指定する -func (r WebhookApiPostWebhookRequest) Embed(embed int32) WebhookApiPostWebhookRequest { +func (r WebhookAPIPostWebhookRequest) Embed(embed int32) WebhookAPIPostWebhookRequest { r.embed = &embed return r } -func (r WebhookApiPostWebhookRequest) Body(body string) WebhookApiPostWebhookRequest { +func (r WebhookAPIPostWebhookRequest) Body(body string) WebhookAPIPostWebhookRequest { r.body = &body return r } -func (r WebhookApiPostWebhookRequest) Execute() (*http.Response, error) { +func (r WebhookAPIPostWebhookRequest) Execute() (*http.Response, error) { return r.ApiService.PostWebhookExecute(r) } @@ -973,10 +987,10 @@ secureなウェブフックに対しては`X-TRAQ-Signature`ヘッダーが必 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param webhookId WebhookUUID - @return WebhookApiPostWebhookRequest + @return WebhookAPIPostWebhookRequest */ -func (a *WebhookApiService) PostWebhook(ctx context.Context, webhookId string) WebhookApiPostWebhookRequest { - return WebhookApiPostWebhookRequest{ +func (a *WebhookAPIService) PostWebhook(ctx context.Context, webhookId string) WebhookAPIPostWebhookRequest { + return WebhookAPIPostWebhookRequest{ ApiService: a, ctx: ctx, webhookId: webhookId, @@ -984,14 +998,14 @@ func (a *WebhookApiService) PostWebhook(ctx context.Context, webhookId string) W } // Execute executes the request -func (a *WebhookApiService) PostWebhookExecute(r WebhookApiPostWebhookRequest) (*http.Response, error) { +func (a *WebhookAPIService) PostWebhookExecute(r WebhookAPIPostWebhookRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookApiService.PostWebhook") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookAPIService.PostWebhook") if err != nil { return nil, &GenericOpenAPIError{error: err.Error()} } @@ -1004,7 +1018,10 @@ func (a *WebhookApiService) PostWebhookExecute(r WebhookApiPostWebhookRequest) ( localVarFormParams := url.Values{} if r.embed != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "embed", r.embed, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "embed", r.embed, "form", "") + } else { + var defaultValue int32 = 0 + r.embed = &defaultValue } // to determine the Content-Type header localVarHTTPContentTypes := []string{"text/plain"} @@ -1024,10 +1041,10 @@ func (a *WebhookApiService) PostWebhookExecute(r WebhookApiPostWebhookRequest) ( localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.xTRAQSignature != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "X-TRAQ-Signature", r.xTRAQSignature, "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "X-TRAQ-Signature", r.xTRAQSignature, "simple", "") } if r.xTRAQChannelId != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "X-TRAQ-Channel-Id", r.xTRAQChannelId, "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "X-TRAQ-Channel-Id", r.xTRAQChannelId, "simple", "") } // body params localVarPostBody = r.body diff --git a/api_webrtc.go b/api_webrtc.go index b2cb22e..3b3d088 100644 --- a/api_webrtc.go +++ b/api_webrtc.go @@ -18,15 +18,15 @@ import ( "net/url" ) -// WebrtcApiService WebrtcApi service -type WebrtcApiService service +// WebrtcAPIService WebrtcAPI service +type WebrtcAPIService service -type WebrtcApiGetWebRTCStateRequest struct { +type WebrtcAPIGetWebRTCStateRequest struct { ctx context.Context - ApiService *WebrtcApiService + ApiService *WebrtcAPIService } -func (r WebrtcApiGetWebRTCStateRequest) Execute() ([]WebRTCUserState, *http.Response, error) { +func (r WebrtcAPIGetWebRTCStateRequest) Execute() ([]WebRTCUserState, *http.Response, error) { return r.ApiService.GetWebRTCStateExecute(r) } @@ -36,10 +36,10 @@ GetWebRTCState WebRTC状態を取得 現在のWebRTC状態を取得します。 @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return WebrtcApiGetWebRTCStateRequest + @return WebrtcAPIGetWebRTCStateRequest */ -func (a *WebrtcApiService) GetWebRTCState(ctx context.Context) WebrtcApiGetWebRTCStateRequest { - return WebrtcApiGetWebRTCStateRequest{ +func (a *WebrtcAPIService) GetWebRTCState(ctx context.Context) WebrtcAPIGetWebRTCStateRequest { + return WebrtcAPIGetWebRTCStateRequest{ ApiService: a, ctx: ctx, } @@ -48,7 +48,7 @@ func (a *WebrtcApiService) GetWebRTCState(ctx context.Context) WebrtcApiGetWebRT // Execute executes the request // // @return []WebRTCUserState -func (a *WebrtcApiService) GetWebRTCStateExecute(r WebrtcApiGetWebRTCStateRequest) ([]WebRTCUserState, *http.Response, error) { +func (a *WebrtcAPIService) GetWebRTCStateExecute(r WebrtcAPIGetWebRTCStateRequest) ([]WebRTCUserState, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -56,7 +56,7 @@ func (a *WebrtcApiService) GetWebRTCStateExecute(r WebrtcApiGetWebRTCStateReques localVarReturnValue []WebRTCUserState ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebrtcApiService.GetWebRTCState") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebrtcAPIService.GetWebRTCState") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -121,18 +121,18 @@ func (a *WebrtcApiService) GetWebRTCStateExecute(r WebrtcApiGetWebRTCStateReques return localVarReturnValue, localVarHTTPResponse, nil } -type WebrtcApiPostWebRTCAuthenticateRequest struct { +type WebrtcAPIPostWebRTCAuthenticateRequest struct { ctx context.Context - ApiService *WebrtcApiService + ApiService *WebrtcAPIService postWebRTCAuthenticateRequest *PostWebRTCAuthenticateRequest } -func (r WebrtcApiPostWebRTCAuthenticateRequest) PostWebRTCAuthenticateRequest(postWebRTCAuthenticateRequest PostWebRTCAuthenticateRequest) WebrtcApiPostWebRTCAuthenticateRequest { +func (r WebrtcAPIPostWebRTCAuthenticateRequest) PostWebRTCAuthenticateRequest(postWebRTCAuthenticateRequest PostWebRTCAuthenticateRequest) WebrtcAPIPostWebRTCAuthenticateRequest { r.postWebRTCAuthenticateRequest = &postWebRTCAuthenticateRequest return r } -func (r WebrtcApiPostWebRTCAuthenticateRequest) Execute() (*WebRTCAuthenticateResult, *http.Response, error) { +func (r WebrtcAPIPostWebRTCAuthenticateRequest) Execute() (*WebRTCAuthenticateResult, *http.Response, error) { return r.ApiService.PostWebRTCAuthenticateExecute(r) } @@ -142,10 +142,10 @@ PostWebRTCAuthenticate Skyway用認証API Skyway WebRTC用の認証API @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return WebrtcApiPostWebRTCAuthenticateRequest + @return WebrtcAPIPostWebRTCAuthenticateRequest */ -func (a *WebrtcApiService) PostWebRTCAuthenticate(ctx context.Context) WebrtcApiPostWebRTCAuthenticateRequest { - return WebrtcApiPostWebRTCAuthenticateRequest{ +func (a *WebrtcAPIService) PostWebRTCAuthenticate(ctx context.Context) WebrtcAPIPostWebRTCAuthenticateRequest { + return WebrtcAPIPostWebRTCAuthenticateRequest{ ApiService: a, ctx: ctx, } @@ -154,7 +154,7 @@ func (a *WebrtcApiService) PostWebRTCAuthenticate(ctx context.Context) WebrtcApi // Execute executes the request // // @return WebRTCAuthenticateResult -func (a *WebrtcApiService) PostWebRTCAuthenticateExecute(r WebrtcApiPostWebRTCAuthenticateRequest) (*WebRTCAuthenticateResult, *http.Response, error) { +func (a *WebrtcAPIService) PostWebRTCAuthenticateExecute(r WebrtcAPIPostWebRTCAuthenticateRequest) (*WebRTCAuthenticateResult, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -162,7 +162,7 @@ func (a *WebrtcApiService) PostWebRTCAuthenticateExecute(r WebrtcApiPostWebRTCAu localVarReturnValue *WebRTCAuthenticateResult ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebrtcApiService.PostWebRTCAuthenticate") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebrtcAPIService.PostWebRTCAuthenticate") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/client.go b/client.go index 5815cd9..e4ad7bd 100644 --- a/client.go +++ b/client.go @@ -36,8 +36,8 @@ import ( ) var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) @@ -50,47 +50,47 @@ type APIClient struct { // API Services - ActivityApi *ActivityApiService + ActivityAPI *ActivityAPIService - AuthenticationApi *AuthenticationApiService + AuthenticationAPI *AuthenticationAPIService - BotApi *BotApiService + BotAPI *BotAPIService - ChannelApi *ChannelApiService + ChannelAPI *ChannelAPIService - ClipApi *ClipApiService + ClipAPI *ClipAPIService - FileApi *FileApiService + FileAPI *FileAPIService - GroupApi *GroupApiService + GroupAPI *GroupAPIService - MeApi *MeApiService + MeAPI *MeAPIService - MessageApi *MessageApiService + MessageAPI *MessageAPIService - NotificationApi *NotificationApiService + NotificationAPI *NotificationAPIService - Oauth2Api *Oauth2ApiService + Oauth2API *Oauth2APIService - OgpApi *OgpApiService + OgpAPI *OgpAPIService - PinApi *PinApiService + PinAPI *PinAPIService - PublicApi *PublicApiService + PublicAPI *PublicAPIService - QallApi *QallApiService + QallAPI *QallAPIService - StampApi *StampApiService + StampAPI *StampAPIService - StarApi *StarApiService + StarAPI *StarAPIService - UserApi *UserApiService + UserAPI *UserAPIService - UserTagApi *UserTagApiService + UserTagAPI *UserTagAPIService - WebhookApi *WebhookApiService + WebhookAPI *WebhookAPIService - WebrtcApi *WebrtcApiService + WebrtcAPI *WebrtcAPIService } type service struct { @@ -109,27 +109,27 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services - c.ActivityApi = (*ActivityApiService)(&c.common) - c.AuthenticationApi = (*AuthenticationApiService)(&c.common) - c.BotApi = (*BotApiService)(&c.common) - c.ChannelApi = (*ChannelApiService)(&c.common) - c.ClipApi = (*ClipApiService)(&c.common) - c.FileApi = (*FileApiService)(&c.common) - c.GroupApi = (*GroupApiService)(&c.common) - c.MeApi = (*MeApiService)(&c.common) - c.MessageApi = (*MessageApiService)(&c.common) - c.NotificationApi = (*NotificationApiService)(&c.common) - c.Oauth2Api = (*Oauth2ApiService)(&c.common) - c.OgpApi = (*OgpApiService)(&c.common) - c.PinApi = (*PinApiService)(&c.common) - c.PublicApi = (*PublicApiService)(&c.common) - c.QallApi = (*QallApiService)(&c.common) - c.StampApi = (*StampApiService)(&c.common) - c.StarApi = (*StarApiService)(&c.common) - c.UserApi = (*UserApiService)(&c.common) - c.UserTagApi = (*UserTagApiService)(&c.common) - c.WebhookApi = (*WebhookApiService)(&c.common) - c.WebrtcApi = (*WebrtcApiService)(&c.common) + c.ActivityAPI = (*ActivityAPIService)(&c.common) + c.AuthenticationAPI = (*AuthenticationAPIService)(&c.common) + c.BotAPI = (*BotAPIService)(&c.common) + c.ChannelAPI = (*ChannelAPIService)(&c.common) + c.ClipAPI = (*ClipAPIService)(&c.common) + c.FileAPI = (*FileAPIService)(&c.common) + c.GroupAPI = (*GroupAPIService)(&c.common) + c.MeAPI = (*MeAPIService)(&c.common) + c.MessageAPI = (*MessageAPIService)(&c.common) + c.NotificationAPI = (*NotificationAPIService)(&c.common) + c.Oauth2API = (*Oauth2APIService)(&c.common) + c.OgpAPI = (*OgpAPIService)(&c.common) + c.PinAPI = (*PinAPIService)(&c.common) + c.PublicAPI = (*PublicAPIService)(&c.common) + c.QallAPI = (*QallAPIService)(&c.common) + c.StampAPI = (*StampAPIService)(&c.common) + c.StarAPI = (*StarAPIService)(&c.common) + c.UserAPI = (*UserAPIService)(&c.common) + c.UserTagAPI = (*UserTagAPIService)(&c.common) + c.WebhookAPI = (*WebhookAPIService)(&c.common) + c.WebrtcAPI = (*WebrtcAPIService)(&c.common) return c } @@ -188,6 +188,10 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { func parameterValueToString(obj interface{}, key string) string { if reflect.TypeOf(obj).Kind() != reflect.Ptr { + if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { + return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) + } + return fmt.Sprintf("%v", obj) } var param, ok = obj.(MappedNullable) @@ -203,7 +207,7 @@ func parameterValueToString(obj interface{}, key string) string { // parameterAddToHeaderOrQuery adds the provided object to the request header or url query // supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { var v = reflect.ValueOf(obj) var value = "" if v == reflect.ValueOf(nil) { @@ -219,11 +223,11 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri if err != nil { return } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) return } if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), collectionType) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) return } value = v.Type().String() + " value" @@ -235,7 +239,11 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri var lenIndValue = indValue.Len() for i := 0; i < lenIndValue; i++ { var arrayValue = indValue.Index(i) - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType) + var keyPrefixForCollectionType = keyPrefix + if style == "deepObject" { + keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, collectionType) } return @@ -247,14 +255,14 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri iter := indValue.MapRange() for iter.Next() { k, v := iter.Key(), iter.Value() - parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType) + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), style, collectionType) } return case reflect.Interface: fallthrough case reflect.Ptr: - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, collectionType) return case reflect.Int, reflect.Int8, reflect.Int16, @@ -527,13 +535,13 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err _, err = (*f).Seek(0, io.SeekStart) return } - if xmlCheck.MatchString(contentType) { + if XmlCheck.MatchString(contentType) { if err = xml.Unmarshal(b, v); err != nil { return err } return nil } - if jsonCheck.MatchString(contentType) { + if JsonCheck.MatchString(contentType) { if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined if err = unmarshalObj.UnmarshalJSON(b); err != nil { @@ -570,18 +578,6 @@ func addFile(w *multipart.Writer, fieldName, path string) error { return err } -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - // Set request body from an interface{} func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { if bodyBuf == nil { @@ -598,10 +594,14 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e _, err = bodyBuf.WriteString(s) } else if s, ok := body.(*string); ok { _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { + } else if JsonCheck.MatchString(contentType) { err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) + } else if XmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } } if err != nil { diff --git a/client.md b/client.md index cb9ddf7..672ef12 100644 --- a/client.md +++ b/client.md @@ -7,6 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - 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](https://github.com/traPtitech/traQ) @@ -14,7 +15,7 @@ For more information, please visit [https://github.com/traPtitech/traQ](https:// Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/oauth2 go get golang.org/x/net/context @@ -22,13 +23,13 @@ go get golang.org/x/net/context Put the package under your project folder and add the following in import: -```golang +```go import traq "github.com/traPtitech/go-traq" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -38,17 +39,17 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `traq.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), traq.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `traq.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), traq.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -60,9 +61,9 @@ Note, enum values are always validated and all unused variables are silently ign 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 `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `traq.ContextOperationServerIndices` and `traq.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), traq.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -79,219 +80,219 @@ All URIs are relative to *https://q.trap.jp/api/v3* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*ActivityApi* | [**GetActivityTimeline**](docs/ActivityApi.md#getactivitytimeline) | **Get** /activity/timeline | アクテビティタイムラインを取得 -*ActivityApi* | [**GetOnlineUsers**](docs/ActivityApi.md#getonlineusers) | **Get** /activity/onlines | オンラインユーザーリストを取得 -*AuthenticationApi* | [**GetMyExternalAccounts**](docs/AuthenticationApi.md#getmyexternalaccounts) | **Get** /users/me/ex-accounts | 外部ログインアカウント一覧を取得 -*AuthenticationApi* | [**GetMySessions**](docs/AuthenticationApi.md#getmysessions) | **Get** /users/me/sessions | 自分のログインセッションリストを取得 -*AuthenticationApi* | [**LinkExternalAccount**](docs/AuthenticationApi.md#linkexternalaccount) | **Post** /users/me/ex-accounts/link | 外部ログインアカウントを紐付ける -*AuthenticationApi* | [**Login**](docs/AuthenticationApi.md#login) | **Post** /login | ログイン -*AuthenticationApi* | [**Logout**](docs/AuthenticationApi.md#logout) | **Post** /logout | ログアウト -*AuthenticationApi* | [**RevokeMySession**](docs/AuthenticationApi.md#revokemysession) | **Delete** /users/me/sessions/{sessionId} | セッションを無効化 -*AuthenticationApi* | [**UnlinkExternalAccount**](docs/AuthenticationApi.md#unlinkexternalaccount) | **Post** /users/me/ex-accounts/unlink | 外部ログインアカウントの紐付けを解除 -*BotApi* | [**ActivateBot**](docs/BotApi.md#activatebot) | **Post** /bots/{botId}/actions/activate | BOTをアクティベート -*BotApi* | [**ChangeBotIcon**](docs/BotApi.md#changeboticon) | **Put** /bots/{botId}/icon | BOTのアイコン画像を変更 -*BotApi* | [**ConnectBotWS**](docs/BotApi.md#connectbotws) | **Get** /bots/ws | WebSocket Mode BOT用通知ストリームに接続します -*BotApi* | [**CreateBot**](docs/BotApi.md#createbot) | **Post** /bots | BOTを作成 -*BotApi* | [**DeleteBot**](docs/BotApi.md#deletebot) | **Delete** /bots/{botId} | BOTを削除 -*BotApi* | [**EditBot**](docs/BotApi.md#editbot) | **Patch** /bots/{botId} | BOT情報を変更 -*BotApi* | [**GetBot**](docs/BotApi.md#getbot) | **Get** /bots/{botId} | BOT情報を取得 -*BotApi* | [**GetBotIcon**](docs/BotApi.md#getboticon) | **Get** /bots/{botId}/icon | BOTのアイコン画像を取得 -*BotApi* | [**GetBotLogs**](docs/BotApi.md#getbotlogs) | **Get** /bots/{botId}/logs | BOTのイベントログを取得 -*BotApi* | [**GetBots**](docs/BotApi.md#getbots) | **Get** /bots | BOTリストを取得 -*BotApi* | [**GetChannelBots**](docs/BotApi.md#getchannelbots) | **Get** /channels/{channelId}/bots | チャンネル参加中のBOTのリストを取得 -*BotApi* | [**InactivateBot**](docs/BotApi.md#inactivatebot) | **Post** /bots/{botId}/actions/inactivate | BOTをインアクティベート -*BotApi* | [**LetBotJoinChannel**](docs/BotApi.md#letbotjoinchannel) | **Post** /bots/{botId}/actions/join | BOTをチャンネルに参加させる -*BotApi* | [**LetBotLeaveChannel**](docs/BotApi.md#letbotleavechannel) | **Post** /bots/{botId}/actions/leave | BOTをチャンネルから退出させる -*BotApi* | [**ReissueBot**](docs/BotApi.md#reissuebot) | **Post** /bots/{botId}/actions/reissue | BOTのトークンを再発行 -*ChannelApi* | [**CreateChannel**](docs/ChannelApi.md#createchannel) | **Post** /channels | チャンネルを作成 -*ChannelApi* | [**EditChannel**](docs/ChannelApi.md#editchannel) | **Patch** /channels/{channelId} | チャンネル情報を変更 -*ChannelApi* | [**EditChannelSubscribers**](docs/ChannelApi.md#editchannelsubscribers) | **Patch** /channels/{channelId}/subscribers | チャンネルの通知購読者を編集 -*ChannelApi* | [**EditChannelTopic**](docs/ChannelApi.md#editchanneltopic) | **Put** /channels/{channelId}/topic | チャンネルトピックを編集 -*ChannelApi* | [**GetChannel**](docs/ChannelApi.md#getchannel) | **Get** /channels/{channelId} | チャンネル情報を取得 -*ChannelApi* | [**GetChannelBots**](docs/ChannelApi.md#getchannelbots) | **Get** /channels/{channelId}/bots | チャンネル参加中のBOTのリストを取得 -*ChannelApi* | [**GetChannelEvents**](docs/ChannelApi.md#getchannelevents) | **Get** /channels/{channelId}/events | チャンネルイベントのリストを取得 -*ChannelApi* | [**GetChannelPath**](docs/ChannelApi.md#getchannelpath) | **Get** /channels/{channelId}/path | 指定したチャンネルパスを取得 -*ChannelApi* | [**GetChannelPins**](docs/ChannelApi.md#getchannelpins) | **Get** /channels/{channelId}/pins | チャンネルピンのリストを取得 -*ChannelApi* | [**GetChannelStats**](docs/ChannelApi.md#getchannelstats) | **Get** /channels/{channelId}/stats | チャンネル統計情報を取得 -*ChannelApi* | [**GetChannelSubscribers**](docs/ChannelApi.md#getchannelsubscribers) | **Get** /channels/{channelId}/subscribers | チャンネルの通知購読者のリストを取得 -*ChannelApi* | [**GetChannelTopic**](docs/ChannelApi.md#getchanneltopic) | **Get** /channels/{channelId}/topic | チャンネルトピックを取得 -*ChannelApi* | [**GetChannelViewers**](docs/ChannelApi.md#getchannelviewers) | **Get** /channels/{channelId}/viewers | チャンネル閲覧者リストを取得 -*ChannelApi* | [**GetChannels**](docs/ChannelApi.md#getchannels) | **Get** /channels | チャンネルリストを取得 -*ChannelApi* | [**GetMessages**](docs/ChannelApi.md#getmessages) | **Get** /channels/{channelId}/messages | チャンネルメッセージのリストを取得 -*ChannelApi* | [**GetUserDMChannel**](docs/ChannelApi.md#getuserdmchannel) | **Get** /users/{userId}/dm-channel | DMチャンネル情報を取得 -*ChannelApi* | [**PostMessage**](docs/ChannelApi.md#postmessage) | **Post** /channels/{channelId}/messages | チャンネルにメッセージを投稿 -*ChannelApi* | [**SetChannelSubscribers**](docs/ChannelApi.md#setchannelsubscribers) | **Put** /channels/{channelId}/subscribers | チャンネルの通知購読者を設定 -*ClipApi* | [**ClipMessage**](docs/ClipApi.md#clipmessage) | **Post** /clip-folders/{folderId}/messages | メッセージをクリップフォルダに追加 -*ClipApi* | [**CreateClipFolder**](docs/ClipApi.md#createclipfolder) | **Post** /clip-folders | クリップフォルダを作成 -*ClipApi* | [**DeleteClipFolder**](docs/ClipApi.md#deleteclipfolder) | **Delete** /clip-folders/{folderId} | クリップフォルダを削除 -*ClipApi* | [**EditClipFolder**](docs/ClipApi.md#editclipfolder) | **Patch** /clip-folders/{folderId} | クリップフォルダ情報を編集 -*ClipApi* | [**GetClipFolder**](docs/ClipApi.md#getclipfolder) | **Get** /clip-folders/{folderId} | クリップフォルダ情報を取得 -*ClipApi* | [**GetClipFolders**](docs/ClipApi.md#getclipfolders) | **Get** /clip-folders | クリップフォルダのリストを取得 -*ClipApi* | [**GetClips**](docs/ClipApi.md#getclips) | **Get** /clip-folders/{folderId}/messages | フォルダ内のクリップのリストを取得 -*ClipApi* | [**GetMessageClips**](docs/ClipApi.md#getmessageclips) | **Get** /messages/{messageId}/clips | 自分のクリップを取得 -*ClipApi* | [**UnclipMessage**](docs/ClipApi.md#unclipmessage) | **Delete** /clip-folders/{folderId}/messages/{messageId} | メッセージをクリップフォルダから除外 -*FileApi* | [**DeleteFile**](docs/FileApi.md#deletefile) | **Delete** /files/{fileId} | ファイルを削除 -*FileApi* | [**GetFile**](docs/FileApi.md#getfile) | **Get** /files/{fileId} | ファイルをダウンロード -*FileApi* | [**GetFileMeta**](docs/FileApi.md#getfilemeta) | **Get** /files/{fileId}/meta | ファイルメタを取得 -*FileApi* | [**GetFiles**](docs/FileApi.md#getfiles) | **Get** /files | ファイルメタのリストを取得 -*FileApi* | [**GetThumbnailImage**](docs/FileApi.md#getthumbnailimage) | **Get** /files/{fileId}/thumbnail | サムネイル画像を取得 -*FileApi* | [**PostFile**](docs/FileApi.md#postfile) | **Post** /files | ファイルをアップロード -*GroupApi* | [**AddUserGroupAdmin**](docs/GroupApi.md#addusergroupadmin) | **Post** /groups/{groupId}/admins | グループ管理者を追加 -*GroupApi* | [**AddUserGroupMember**](docs/GroupApi.md#addusergroupmember) | **Post** /groups/{groupId}/members | グループメンバーを追加 -*GroupApi* | [**ChangeUserGroupIcon**](docs/GroupApi.md#changeusergroupicon) | **Put** /groups/{groupId}/icon | ユーザーグループのアイコンを変更 -*GroupApi* | [**CreateUserGroup**](docs/GroupApi.md#createusergroup) | **Post** /groups | ユーザーグループを作成 -*GroupApi* | [**DeleteUserGroup**](docs/GroupApi.md#deleteusergroup) | **Delete** /groups/{groupId} | ユーザーグループを削除 -*GroupApi* | [**EditUserGroup**](docs/GroupApi.md#editusergroup) | **Patch** /groups/{groupId} | ユーザーグループを編集 -*GroupApi* | [**EditUserGroupMember**](docs/GroupApi.md#editusergroupmember) | **Patch** /groups/{groupId}/members/{userId} | グループメンバーを編集 -*GroupApi* | [**GetUserGroup**](docs/GroupApi.md#getusergroup) | **Get** /groups/{groupId} | ユーザーグループを取得 -*GroupApi* | [**GetUserGroupAdmins**](docs/GroupApi.md#getusergroupadmins) | **Get** /groups/{groupId}/admins | グループ管理者を取得 -*GroupApi* | [**GetUserGroupMembers**](docs/GroupApi.md#getusergroupmembers) | **Get** /groups/{groupId}/members | グループメンバーを取得 -*GroupApi* | [**GetUserGroups**](docs/GroupApi.md#getusergroups) | **Get** /groups | ユーザーグループのリストを取得 -*GroupApi* | [**RemoveUserGroupAdmin**](docs/GroupApi.md#removeusergroupadmin) | **Delete** /groups/{groupId}/admins/{userId} | グループ管理者を削除 -*GroupApi* | [**RemoveUserGroupMember**](docs/GroupApi.md#removeusergroupmember) | **Delete** /groups/{groupId}/members/{userId} | グループメンバーを削除 -*GroupApi* | [**RemoveUserGroupMembers**](docs/GroupApi.md#removeusergroupmembers) | **Delete** /groups/{groupId}/members | グループメンバーを一括削除 -*MeApi* | [**AddMyStar**](docs/MeApi.md#addmystar) | **Post** /users/me/stars | チャンネルをスターに追加 -*MeApi* | [**AddMyUserTag**](docs/MeApi.md#addmyusertag) | **Post** /users/me/tags | 自分にタグを追加 -*MeApi* | [**ChangeMyIcon**](docs/MeApi.md#changemyicon) | **Put** /users/me/icon | 自分のアイコン画像を変更 -*MeApi* | [**ChangeMyNotifyCitation**](docs/MeApi.md#changemynotifycitation) | **Put** /users/me/settings/notify-citation | メッセージ引用通知の設定情報を変更 -*MeApi* | [**ChangeMyPassword**](docs/MeApi.md#changemypassword) | **Put** /users/me/password | 自分のパスワードを変更 -*MeApi* | [**EditMe**](docs/MeApi.md#editme) | **Patch** /users/me | 自分のユーザー情報を変更 -*MeApi* | [**EditMyUserTag**](docs/MeApi.md#editmyusertag) | **Patch** /users/me/tags/{tagId} | 自分のタグを編集 -*MeApi* | [**GetMe**](docs/MeApi.md#getme) | **Get** /users/me | 自分のユーザー詳細を取得 -*MeApi* | [**GetMyChannelSubscriptions**](docs/MeApi.md#getmychannelsubscriptions) | **Get** /users/me/subscriptions | 自分のチャンネル購読状態を取得 -*MeApi* | [**GetMyExternalAccounts**](docs/MeApi.md#getmyexternalaccounts) | **Get** /users/me/ex-accounts | 外部ログインアカウント一覧を取得 -*MeApi* | [**GetMyIcon**](docs/MeApi.md#getmyicon) | **Get** /users/me/icon | 自分のアイコン画像を取得 -*MeApi* | [**GetMyNotifyCitation**](docs/MeApi.md#getmynotifycitation) | **Get** /users/me/settings/notify-citation | メッセージ引用通知の設定情報を取得 -*MeApi* | [**GetMyQRCode**](docs/MeApi.md#getmyqrcode) | **Get** /users/me/qr-code | QRコードを取得 -*MeApi* | [**GetMySessions**](docs/MeApi.md#getmysessions) | **Get** /users/me/sessions | 自分のログインセッションリストを取得 -*MeApi* | [**GetMyStampHistory**](docs/MeApi.md#getmystamphistory) | **Get** /users/me/stamp-history | スタンプ履歴を取得 -*MeApi* | [**GetMyStars**](docs/MeApi.md#getmystars) | **Get** /users/me/stars | スターチャンネルリストを取得 -*MeApi* | [**GetMyTokens**](docs/MeApi.md#getmytokens) | **Get** /users/me/tokens | 有効トークンのリストを取得 -*MeApi* | [**GetMyUnreadChannels**](docs/MeApi.md#getmyunreadchannels) | **Get** /users/me/unread | 未読チャンネルを取得 -*MeApi* | [**GetMyUserTags**](docs/MeApi.md#getmyusertags) | **Get** /users/me/tags | 自分のタグリストを取得 -*MeApi* | [**GetMyViewStates**](docs/MeApi.md#getmyviewstates) | **Get** /users/me/view-states | 自身のチャンネル閲覧状態一覧を取得 -*MeApi* | [**GetOIDCUserInfo**](docs/MeApi.md#getoidcuserinfo) | **Get** /users/me/oidc | 自分のユーザー詳細を取得 (OIDC UserInfo) -*MeApi* | [**GetUserSettings**](docs/MeApi.md#getusersettings) | **Get** /users/me/settings | ユーザー設定を取得 -*MeApi* | [**LinkExternalAccount**](docs/MeApi.md#linkexternalaccount) | **Post** /users/me/ex-accounts/link | 外部ログインアカウントを紐付ける -*MeApi* | [**ReadChannel**](docs/MeApi.md#readchannel) | **Delete** /users/me/unread/{channelId} | チャンネルを既読にする -*MeApi* | [**RegisterFCMDevice**](docs/MeApi.md#registerfcmdevice) | **Post** /users/me/fcm-device | FCMデバイスを登録 -*MeApi* | [**RemoveMyStar**](docs/MeApi.md#removemystar) | **Delete** /users/me/stars/{channelId} | チャンネルをスターから削除します -*MeApi* | [**RemoveMyUserTag**](docs/MeApi.md#removemyusertag) | **Delete** /users/me/tags/{tagId} | 自分からタグを削除します -*MeApi* | [**RevokeMySession**](docs/MeApi.md#revokemysession) | **Delete** /users/me/sessions/{sessionId} | セッションを無効化 -*MeApi* | [**RevokeMyToken**](docs/MeApi.md#revokemytoken) | **Delete** /users/me/tokens/{tokenId} | トークンの認可を取り消す -*MeApi* | [**SetChannelSubscribeLevel**](docs/MeApi.md#setchannelsubscribelevel) | **Put** /users/me/subscriptions/{channelId} | チャンネル購読レベルを設定 -*MeApi* | [**UnlinkExternalAccount**](docs/MeApi.md#unlinkexternalaccount) | **Post** /users/me/ex-accounts/unlink | 外部ログインアカウントの紐付けを解除 -*MessageApi* | [**AddMessageStamp**](docs/MessageApi.md#addmessagestamp) | **Post** /messages/{messageId}/stamps/{stampId} | スタンプを押す -*MessageApi* | [**CreatePin**](docs/MessageApi.md#createpin) | **Post** /messages/{messageId}/pin | ピン留めする -*MessageApi* | [**DeleteMessage**](docs/MessageApi.md#deletemessage) | **Delete** /messages/{messageId} | メッセージを削除 -*MessageApi* | [**EditMessage**](docs/MessageApi.md#editmessage) | **Put** /messages/{messageId} | メッセージを編集 -*MessageApi* | [**GetDirectMessages**](docs/MessageApi.md#getdirectmessages) | **Get** /users/{userId}/messages | ダイレクトメッセージのリストを取得 -*MessageApi* | [**GetMessage**](docs/MessageApi.md#getmessage) | **Get** /messages/{messageId} | メッセージを取得 -*MessageApi* | [**GetMessageClips**](docs/MessageApi.md#getmessageclips) | **Get** /messages/{messageId}/clips | 自分のクリップを取得 -*MessageApi* | [**GetMessageStamps**](docs/MessageApi.md#getmessagestamps) | **Get** /messages/{messageId}/stamps | メッセージのスタンプリストを取得 -*MessageApi* | [**GetMessages**](docs/MessageApi.md#getmessages) | **Get** /channels/{channelId}/messages | チャンネルメッセージのリストを取得 -*MessageApi* | [**GetPin**](docs/MessageApi.md#getpin) | **Get** /messages/{messageId}/pin | ピン留めを取得 -*MessageApi* | [**PostDirectMessage**](docs/MessageApi.md#postdirectmessage) | **Post** /users/{userId}/messages | ダイレクトメッセージを送信 -*MessageApi* | [**PostMessage**](docs/MessageApi.md#postmessage) | **Post** /channels/{channelId}/messages | チャンネルにメッセージを投稿 -*MessageApi* | [**RemoveMessageStamp**](docs/MessageApi.md#removemessagestamp) | **Delete** /messages/{messageId}/stamps/{stampId} | スタンプを消す -*MessageApi* | [**RemovePin**](docs/MessageApi.md#removepin) | **Delete** /messages/{messageId}/pin | ピン留めを外す -*MessageApi* | [**SearchMessages**](docs/MessageApi.md#searchmessages) | **Get** /messages | メッセージを検索 -*NotificationApi* | [**EditChannelSubscribers**](docs/NotificationApi.md#editchannelsubscribers) | **Patch** /channels/{channelId}/subscribers | チャンネルの通知購読者を編集 -*NotificationApi* | [**GetChannelSubscribers**](docs/NotificationApi.md#getchannelsubscribers) | **Get** /channels/{channelId}/subscribers | チャンネルの通知購読者のリストを取得 -*NotificationApi* | [**GetMyChannelSubscriptions**](docs/NotificationApi.md#getmychannelsubscriptions) | **Get** /users/me/subscriptions | 自分のチャンネル購読状態を取得 -*NotificationApi* | [**GetMyUnreadChannels**](docs/NotificationApi.md#getmyunreadchannels) | **Get** /users/me/unread | 未読チャンネルを取得 -*NotificationApi* | [**GetMyViewStates**](docs/NotificationApi.md#getmyviewstates) | **Get** /users/me/view-states | 自身のチャンネル閲覧状態一覧を取得 -*NotificationApi* | [**ReadChannel**](docs/NotificationApi.md#readchannel) | **Delete** /users/me/unread/{channelId} | チャンネルを既読にする -*NotificationApi* | [**RegisterFCMDevice**](docs/NotificationApi.md#registerfcmdevice) | **Post** /users/me/fcm-device | FCMデバイスを登録 -*NotificationApi* | [**SetChannelSubscribeLevel**](docs/NotificationApi.md#setchannelsubscribelevel) | **Put** /users/me/subscriptions/{channelId} | チャンネル購読レベルを設定 -*NotificationApi* | [**SetChannelSubscribers**](docs/NotificationApi.md#setchannelsubscribers) | **Put** /channels/{channelId}/subscribers | チャンネルの通知購読者を設定 -*NotificationApi* | [**Ws**](docs/NotificationApi.md#ws) | **Get** /ws | WebSocket通知ストリームに接続します -*Oauth2Api* | [**CreateClient**](docs/Oauth2Api.md#createclient) | **Post** /clients | OAuth2クライアントを作成 -*Oauth2Api* | [**DeleteClient**](docs/Oauth2Api.md#deleteclient) | **Delete** /clients/{clientId} | OAuth2クライアントを削除 -*Oauth2Api* | [**EditClient**](docs/Oauth2Api.md#editclient) | **Patch** /clients/{clientId} | OAuth2クライアント情報を変更 -*Oauth2Api* | [**GetClient**](docs/Oauth2Api.md#getclient) | **Get** /clients/{clientId} | OAuth2クライアント情報を取得 -*Oauth2Api* | [**GetClients**](docs/Oauth2Api.md#getclients) | **Get** /clients | OAuth2クライアントのリストを取得 -*Oauth2Api* | [**GetMyTokens**](docs/Oauth2Api.md#getmytokens) | **Get** /users/me/tokens | 有効トークンのリストを取得 -*Oauth2Api* | [**GetOAuth2Authorize**](docs/Oauth2Api.md#getoauth2authorize) | **Get** /oauth2/authorize | OAuth2 認可エンドポイント -*Oauth2Api* | [**PostOAuth2Authorize**](docs/Oauth2Api.md#postoauth2authorize) | **Post** /oauth2/authorize | OAuth2 認可エンドポイント -*Oauth2Api* | [**PostOAuth2AuthorizeDecide**](docs/Oauth2Api.md#postoauth2authorizedecide) | **Post** /oauth2/authorize/decide | OAuth2 認可承諾API -*Oauth2Api* | [**PostOAuth2Token**](docs/Oauth2Api.md#postoauth2token) | **Post** /oauth2/token | OAuth2 トークンエンドポイント -*Oauth2Api* | [**RevokeClientTokens**](docs/Oauth2Api.md#revokeclienttokens) | **Delete** /clients/{clientId}/tokens | OAuthクライアントのトークンを削除 -*Oauth2Api* | [**RevokeMyToken**](docs/Oauth2Api.md#revokemytoken) | **Delete** /users/me/tokens/{tokenId} | トークンの認可を取り消す -*Oauth2Api* | [**RevokeOAuth2Token**](docs/Oauth2Api.md#revokeoauth2token) | **Post** /oauth2/revoke | OAuth2 トークン無効化エンドポイント -*OgpApi* | [**DeleteOgpCache**](docs/OgpApi.md#deleteogpcache) | **Delete** /ogp/cache | OGP情報のキャッシュを削除 -*OgpApi* | [**GetOgp**](docs/OgpApi.md#getogp) | **Get** /ogp | OGP情報を取得 -*PinApi* | [**CreatePin**](docs/PinApi.md#createpin) | **Post** /messages/{messageId}/pin | ピン留めする -*PinApi* | [**GetChannelPins**](docs/PinApi.md#getchannelpins) | **Get** /channels/{channelId}/pins | チャンネルピンのリストを取得 -*PinApi* | [**GetPin**](docs/PinApi.md#getpin) | **Get** /messages/{messageId}/pin | ピン留めを取得 -*PinApi* | [**RemovePin**](docs/PinApi.md#removepin) | **Delete** /messages/{messageId}/pin | ピン留めを外す -*PublicApi* | [**GetPublicUserIcon**](docs/PublicApi.md#getpublicusericon) | **Get** /public/icon/{username} | ユーザーのアイコン画像を取得 -*PublicApi* | [**GetServerVersion**](docs/PublicApi.md#getserverversion) | **Get** /version | バージョンを取得 -*QallApi* | [**ChangeParticipantRole**](docs/QallApi.md#changeparticipantrole) | **Patch** /qall/rooms/{roomId}/participants | ルームでの発言権限を変更 -*QallApi* | [**GetLiveKitToken**](docs/QallApi.md#getlivekittoken) | **Get** /qall/token | LiveKitトークンを取得 -*QallApi* | [**GetQallEndpoints**](docs/QallApi.md#getqallendpoints) | **Get** /qall/endpoints | LiveKitエンドポイントを取得 -*QallApi* | [**GetRoomMetadata**](docs/QallApi.md#getroommetadata) | **Get** /qall/rooms/{roomId}/metadata | ルームのメタデータを取得 -*QallApi* | [**GetRooms**](docs/QallApi.md#getrooms) | **Get** /qall/rooms | ルームと参加者の一覧を取得 -*QallApi* | [**GetSoundboardList**](docs/QallApi.md#getsoundboardlist) | **Get** /qall/soundboard | サウンドボード用の音声一覧を取得 -*QallApi* | [**LiveKitWebhook**](docs/QallApi.md#livekitwebhook) | **Post** /qall/webhook | LiveKit Webhook受信 -*QallApi* | [**PostSoundboard**](docs/QallApi.md#postsoundboard) | **Post** /qall/soundboard | サウンドボード用の短い音声ファイルをアップロード -*QallApi* | [**PostSoundboardPlay**](docs/QallApi.md#postsoundboardplay) | **Post** /qall/soundboard/play | アップロード済み音声を LiveKit ルームで再生 -*QallApi* | [**UpdateRoomMetadata**](docs/QallApi.md#updateroommetadata) | **Patch** /qall/rooms/{roomId}/metadata | ルームのメタデータを更新 -*StampApi* | [**AddMessageStamp**](docs/StampApi.md#addmessagestamp) | **Post** /messages/{messageId}/stamps/{stampId} | スタンプを押す -*StampApi* | [**ChangeStampImage**](docs/StampApi.md#changestampimage) | **Put** /stamps/{stampId}/image | スタンプ画像を変更 -*StampApi* | [**CreateStamp**](docs/StampApi.md#createstamp) | **Post** /stamps | スタンプを作成 -*StampApi* | [**CreateStampPalette**](docs/StampApi.md#createstamppalette) | **Post** /stamp-palettes | スタンプパレットを作成 -*StampApi* | [**DeleteStamp**](docs/StampApi.md#deletestamp) | **Delete** /stamps/{stampId} | スタンプを削除 -*StampApi* | [**DeleteStampPalette**](docs/StampApi.md#deletestamppalette) | **Delete** /stamp-palettes/{paletteId} | スタンプパレットを削除 -*StampApi* | [**EditStamp**](docs/StampApi.md#editstamp) | **Patch** /stamps/{stampId} | スタンプ情報を変更 -*StampApi* | [**EditStampPalette**](docs/StampApi.md#editstamppalette) | **Patch** /stamp-palettes/{paletteId} | スタンプパレットを編集 -*StampApi* | [**GetMessageStamps**](docs/StampApi.md#getmessagestamps) | **Get** /messages/{messageId}/stamps | メッセージのスタンプリストを取得 -*StampApi* | [**GetMyStampHistory**](docs/StampApi.md#getmystamphistory) | **Get** /users/me/stamp-history | スタンプ履歴を取得 -*StampApi* | [**GetStamp**](docs/StampApi.md#getstamp) | **Get** /stamps/{stampId} | スタンプ情報を取得 -*StampApi* | [**GetStampImage**](docs/StampApi.md#getstampimage) | **Get** /stamps/{stampId}/image | スタンプ画像を取得 -*StampApi* | [**GetStampPalette**](docs/StampApi.md#getstamppalette) | **Get** /stamp-palettes/{paletteId} | スタンプパレットを取得 -*StampApi* | [**GetStampPalettes**](docs/StampApi.md#getstamppalettes) | **Get** /stamp-palettes | スタンプパレットのリストを取得 -*StampApi* | [**GetStampStats**](docs/StampApi.md#getstampstats) | **Get** /stamps/{stampId}/stats | スタンプ統計情報を取得 -*StampApi* | [**GetStamps**](docs/StampApi.md#getstamps) | **Get** /stamps | スタンプリストを取得 -*StampApi* | [**RemoveMessageStamp**](docs/StampApi.md#removemessagestamp) | **Delete** /messages/{messageId}/stamps/{stampId} | スタンプを消す -*StarApi* | [**AddMyStar**](docs/StarApi.md#addmystar) | **Post** /users/me/stars | チャンネルをスターに追加 -*StarApi* | [**GetMyStars**](docs/StarApi.md#getmystars) | **Get** /users/me/stars | スターチャンネルリストを取得 -*StarApi* | [**RemoveMyStar**](docs/StarApi.md#removemystar) | **Delete** /users/me/stars/{channelId} | チャンネルをスターから削除します -*UserApi* | [**AddUserTag**](docs/UserApi.md#addusertag) | **Post** /users/{userId}/tags | ユーザーにタグを追加 -*UserApi* | [**ChangeUserIcon**](docs/UserApi.md#changeusericon) | **Put** /users/{userId}/icon | ユーザーのアイコン画像を変更します -*UserApi* | [**ChangeUserPassword**](docs/UserApi.md#changeuserpassword) | **Put** /users/{userId}/password | ユーザーのパスワードを変更 -*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **Post** /users | ユーザーを登録 -*UserApi* | [**EditUser**](docs/UserApi.md#edituser) | **Patch** /users/{userId} | ユーザー情報を変更 -*UserApi* | [**EditUserTag**](docs/UserApi.md#editusertag) | **Patch** /users/{userId}/tags/{tagId} | ユーザーのタグを編集 -*UserApi* | [**GetDirectMessages**](docs/UserApi.md#getdirectmessages) | **Get** /users/{userId}/messages | ダイレクトメッセージのリストを取得 -*UserApi* | [**GetUser**](docs/UserApi.md#getuser) | **Get** /users/{userId} | ユーザー詳細情報を取得 -*UserApi* | [**GetUserDMChannel**](docs/UserApi.md#getuserdmchannel) | **Get** /users/{userId}/dm-channel | DMチャンネル情報を取得 -*UserApi* | [**GetUserIcon**](docs/UserApi.md#getusericon) | **Get** /users/{userId}/icon | ユーザーのアイコン画像を取得 -*UserApi* | [**GetUserStats**](docs/UserApi.md#getuserstats) | **Get** /users/{userId}/stats | ユーザー統計情報を取得 -*UserApi* | [**GetUserTags**](docs/UserApi.md#getusertags) | **Get** /users/{userId}/tags | ユーザーのタグリストを取得 -*UserApi* | [**GetUsers**](docs/UserApi.md#getusers) | **Get** /users | ユーザーのリストを取得 -*UserApi* | [**PostDirectMessage**](docs/UserApi.md#postdirectmessage) | **Post** /users/{userId}/messages | ダイレクトメッセージを送信 -*UserApi* | [**RemoveUserTag**](docs/UserApi.md#removeusertag) | **Delete** /users/{userId}/tags/{tagId} | ユーザーからタグを削除します -*UserTagApi* | [**AddMyUserTag**](docs/UserTagApi.md#addmyusertag) | **Post** /users/me/tags | 自分にタグを追加 -*UserTagApi* | [**AddUserTag**](docs/UserTagApi.md#addusertag) | **Post** /users/{userId}/tags | ユーザーにタグを追加 -*UserTagApi* | [**EditMyUserTag**](docs/UserTagApi.md#editmyusertag) | **Patch** /users/me/tags/{tagId} | 自分のタグを編集 -*UserTagApi* | [**EditUserTag**](docs/UserTagApi.md#editusertag) | **Patch** /users/{userId}/tags/{tagId} | ユーザーのタグを編集 -*UserTagApi* | [**GetMyUserTags**](docs/UserTagApi.md#getmyusertags) | **Get** /users/me/tags | 自分のタグリストを取得 -*UserTagApi* | [**GetTag**](docs/UserTagApi.md#gettag) | **Get** /tags/{tagId} | タグ情報を取得 -*UserTagApi* | [**GetUserTags**](docs/UserTagApi.md#getusertags) | **Get** /users/{userId}/tags | ユーザーのタグリストを取得 -*UserTagApi* | [**RemoveMyUserTag**](docs/UserTagApi.md#removemyusertag) | **Delete** /users/me/tags/{tagId} | 自分からタグを削除します -*UserTagApi* | [**RemoveUserTag**](docs/UserTagApi.md#removeusertag) | **Delete** /users/{userId}/tags/{tagId} | ユーザーからタグを削除します -*WebhookApi* | [**ChangeWebhookIcon**](docs/WebhookApi.md#changewebhookicon) | **Put** /webhooks/{webhookId}/icon | Webhookのアイコンを変更 -*WebhookApi* | [**CreateWebhook**](docs/WebhookApi.md#createwebhook) | **Post** /webhooks | Webhookを新規作成 -*WebhookApi* | [**DeleteWebhook**](docs/WebhookApi.md#deletewebhook) | **Delete** /webhooks/{webhookId} | Webhookを削除 -*WebhookApi* | [**EditWebhook**](docs/WebhookApi.md#editwebhook) | **Patch** /webhooks/{webhookId} | Webhook情報を変更 -*WebhookApi* | [**GetWebhook**](docs/WebhookApi.md#getwebhook) | **Get** /webhooks/{webhookId} | Webhook情報を取得 -*WebhookApi* | [**GetWebhookIcon**](docs/WebhookApi.md#getwebhookicon) | **Get** /webhooks/{webhookId}/icon | Webhookのアイコンを取得 -*WebhookApi* | [**GetWebhookMessages**](docs/WebhookApi.md#getwebhookmessages) | **Get** /webhooks/{webhookId}/messages | Webhookの投稿メッセージのリストを取得 -*WebhookApi* | [**GetWebhooks**](docs/WebhookApi.md#getwebhooks) | **Get** /webhooks | Webhook情報のリストを取得します -*WebhookApi* | [**PostWebhook**](docs/WebhookApi.md#postwebhook) | **Post** /webhooks/{webhookId} | Webhookを送信 -*WebrtcApi* | [**GetWebRTCState**](docs/WebrtcApi.md#getwebrtcstate) | **Get** /webrtc/state | WebRTC状態を取得 -*WebrtcApi* | [**PostWebRTCAuthenticate**](docs/WebrtcApi.md#postwebrtcauthenticate) | **Post** /webrtc/authenticate | Skyway用認証API +*ActivityAPI* | [**GetActivityTimeline**](docs/ActivityAPI.md#getactivitytimeline) | **Get** /activity/timeline | アクテビティタイムラインを取得 +*ActivityAPI* | [**GetOnlineUsers**](docs/ActivityAPI.md#getonlineusers) | **Get** /activity/onlines | オンラインユーザーリストを取得 +*AuthenticationAPI* | [**GetMyExternalAccounts**](docs/AuthenticationAPI.md#getmyexternalaccounts) | **Get** /users/me/ex-accounts | 外部ログインアカウント一覧を取得 +*AuthenticationAPI* | [**GetMySessions**](docs/AuthenticationAPI.md#getmysessions) | **Get** /users/me/sessions | 自分のログインセッションリストを取得 +*AuthenticationAPI* | [**LinkExternalAccount**](docs/AuthenticationAPI.md#linkexternalaccount) | **Post** /users/me/ex-accounts/link | 外部ログインアカウントを紐付ける +*AuthenticationAPI* | [**Login**](docs/AuthenticationAPI.md#login) | **Post** /login | ログイン +*AuthenticationAPI* | [**Logout**](docs/AuthenticationAPI.md#logout) | **Post** /logout | ログアウト +*AuthenticationAPI* | [**RevokeMySession**](docs/AuthenticationAPI.md#revokemysession) | **Delete** /users/me/sessions/{sessionId} | セッションを無効化 +*AuthenticationAPI* | [**UnlinkExternalAccount**](docs/AuthenticationAPI.md#unlinkexternalaccount) | **Post** /users/me/ex-accounts/unlink | 外部ログインアカウントの紐付けを解除 +*BotAPI* | [**ActivateBot**](docs/BotAPI.md#activatebot) | **Post** /bots/{botId}/actions/activate | BOTをアクティベート +*BotAPI* | [**ChangeBotIcon**](docs/BotAPI.md#changeboticon) | **Put** /bots/{botId}/icon | BOTのアイコン画像を変更 +*BotAPI* | [**ConnectBotWS**](docs/BotAPI.md#connectbotws) | **Get** /bots/ws | WebSocket Mode BOT用通知ストリームに接続します +*BotAPI* | [**CreateBot**](docs/BotAPI.md#createbot) | **Post** /bots | BOTを作成 +*BotAPI* | [**DeleteBot**](docs/BotAPI.md#deletebot) | **Delete** /bots/{botId} | BOTを削除 +*BotAPI* | [**EditBot**](docs/BotAPI.md#editbot) | **Patch** /bots/{botId} | BOT情報を変更 +*BotAPI* | [**GetBot**](docs/BotAPI.md#getbot) | **Get** /bots/{botId} | BOT情報を取得 +*BotAPI* | [**GetBotIcon**](docs/BotAPI.md#getboticon) | **Get** /bots/{botId}/icon | BOTのアイコン画像を取得 +*BotAPI* | [**GetBotLogs**](docs/BotAPI.md#getbotlogs) | **Get** /bots/{botId}/logs | BOTのイベントログを取得 +*BotAPI* | [**GetBots**](docs/BotAPI.md#getbots) | **Get** /bots | BOTリストを取得 +*BotAPI* | [**GetChannelBots**](docs/BotAPI.md#getchannelbots) | **Get** /channels/{channelId}/bots | チャンネル参加中のBOTのリストを取得 +*BotAPI* | [**InactivateBot**](docs/BotAPI.md#inactivatebot) | **Post** /bots/{botId}/actions/inactivate | BOTをインアクティベート +*BotAPI* | [**LetBotJoinChannel**](docs/BotAPI.md#letbotjoinchannel) | **Post** /bots/{botId}/actions/join | BOTをチャンネルに参加させる +*BotAPI* | [**LetBotLeaveChannel**](docs/BotAPI.md#letbotleavechannel) | **Post** /bots/{botId}/actions/leave | BOTをチャンネルから退出させる +*BotAPI* | [**ReissueBot**](docs/BotAPI.md#reissuebot) | **Post** /bots/{botId}/actions/reissue | BOTのトークンを再発行 +*ChannelAPI* | [**CreateChannel**](docs/ChannelAPI.md#createchannel) | **Post** /channels | チャンネルを作成 +*ChannelAPI* | [**EditChannel**](docs/ChannelAPI.md#editchannel) | **Patch** /channels/{channelId} | チャンネル情報を変更 +*ChannelAPI* | [**EditChannelSubscribers**](docs/ChannelAPI.md#editchannelsubscribers) | **Patch** /channels/{channelId}/subscribers | チャンネルの通知購読者を編集 +*ChannelAPI* | [**EditChannelTopic**](docs/ChannelAPI.md#editchanneltopic) | **Put** /channels/{channelId}/topic | チャンネルトピックを編集 +*ChannelAPI* | [**GetChannel**](docs/ChannelAPI.md#getchannel) | **Get** /channels/{channelId} | チャンネル情報を取得 +*ChannelAPI* | [**GetChannelBots**](docs/ChannelAPI.md#getchannelbots) | **Get** /channels/{channelId}/bots | チャンネル参加中のBOTのリストを取得 +*ChannelAPI* | [**GetChannelEvents**](docs/ChannelAPI.md#getchannelevents) | **Get** /channels/{channelId}/events | チャンネルイベントのリストを取得 +*ChannelAPI* | [**GetChannelPath**](docs/ChannelAPI.md#getchannelpath) | **Get** /channels/{channelId}/path | 指定したチャンネルパスを取得 +*ChannelAPI* | [**GetChannelPins**](docs/ChannelAPI.md#getchannelpins) | **Get** /channels/{channelId}/pins | チャンネルピンのリストを取得 +*ChannelAPI* | [**GetChannelStats**](docs/ChannelAPI.md#getchannelstats) | **Get** /channels/{channelId}/stats | チャンネル統計情報を取得 +*ChannelAPI* | [**GetChannelSubscribers**](docs/ChannelAPI.md#getchannelsubscribers) | **Get** /channels/{channelId}/subscribers | チャンネルの通知購読者のリストを取得 +*ChannelAPI* | [**GetChannelTopic**](docs/ChannelAPI.md#getchanneltopic) | **Get** /channels/{channelId}/topic | チャンネルトピックを取得 +*ChannelAPI* | [**GetChannelViewers**](docs/ChannelAPI.md#getchannelviewers) | **Get** /channels/{channelId}/viewers | チャンネル閲覧者リストを取得 +*ChannelAPI* | [**GetChannels**](docs/ChannelAPI.md#getchannels) | **Get** /channels | チャンネルリストを取得 +*ChannelAPI* | [**GetMessages**](docs/ChannelAPI.md#getmessages) | **Get** /channels/{channelId}/messages | チャンネルメッセージのリストを取得 +*ChannelAPI* | [**GetUserDMChannel**](docs/ChannelAPI.md#getuserdmchannel) | **Get** /users/{userId}/dm-channel | DMチャンネル情報を取得 +*ChannelAPI* | [**PostMessage**](docs/ChannelAPI.md#postmessage) | **Post** /channels/{channelId}/messages | チャンネルにメッセージを投稿 +*ChannelAPI* | [**SetChannelSubscribers**](docs/ChannelAPI.md#setchannelsubscribers) | **Put** /channels/{channelId}/subscribers | チャンネルの通知購読者を設定 +*ClipAPI* | [**ClipMessage**](docs/ClipAPI.md#clipmessage) | **Post** /clip-folders/{folderId}/messages | メッセージをクリップフォルダに追加 +*ClipAPI* | [**CreateClipFolder**](docs/ClipAPI.md#createclipfolder) | **Post** /clip-folders | クリップフォルダを作成 +*ClipAPI* | [**DeleteClipFolder**](docs/ClipAPI.md#deleteclipfolder) | **Delete** /clip-folders/{folderId} | クリップフォルダを削除 +*ClipAPI* | [**EditClipFolder**](docs/ClipAPI.md#editclipfolder) | **Patch** /clip-folders/{folderId} | クリップフォルダ情報を編集 +*ClipAPI* | [**GetClipFolder**](docs/ClipAPI.md#getclipfolder) | **Get** /clip-folders/{folderId} | クリップフォルダ情報を取得 +*ClipAPI* | [**GetClipFolders**](docs/ClipAPI.md#getclipfolders) | **Get** /clip-folders | クリップフォルダのリストを取得 +*ClipAPI* | [**GetClips**](docs/ClipAPI.md#getclips) | **Get** /clip-folders/{folderId}/messages | フォルダ内のクリップのリストを取得 +*ClipAPI* | [**GetMessageClips**](docs/ClipAPI.md#getmessageclips) | **Get** /messages/{messageId}/clips | 自分のクリップを取得 +*ClipAPI* | [**UnclipMessage**](docs/ClipAPI.md#unclipmessage) | **Delete** /clip-folders/{folderId}/messages/{messageId} | メッセージをクリップフォルダから除外 +*FileAPI* | [**DeleteFile**](docs/FileAPI.md#deletefile) | **Delete** /files/{fileId} | ファイルを削除 +*FileAPI* | [**GetFile**](docs/FileAPI.md#getfile) | **Get** /files/{fileId} | ファイルをダウンロード +*FileAPI* | [**GetFileMeta**](docs/FileAPI.md#getfilemeta) | **Get** /files/{fileId}/meta | ファイルメタを取得 +*FileAPI* | [**GetFiles**](docs/FileAPI.md#getfiles) | **Get** /files | ファイルメタのリストを取得 +*FileAPI* | [**GetThumbnailImage**](docs/FileAPI.md#getthumbnailimage) | **Get** /files/{fileId}/thumbnail | サムネイル画像を取得 +*FileAPI* | [**PostFile**](docs/FileAPI.md#postfile) | **Post** /files | ファイルをアップロード +*GroupAPI* | [**AddUserGroupAdmin**](docs/GroupAPI.md#addusergroupadmin) | **Post** /groups/{groupId}/admins | グループ管理者を追加 +*GroupAPI* | [**AddUserGroupMember**](docs/GroupAPI.md#addusergroupmember) | **Post** /groups/{groupId}/members | グループメンバーを追加 +*GroupAPI* | [**ChangeUserGroupIcon**](docs/GroupAPI.md#changeusergroupicon) | **Put** /groups/{groupId}/icon | ユーザーグループのアイコンを変更 +*GroupAPI* | [**CreateUserGroup**](docs/GroupAPI.md#createusergroup) | **Post** /groups | ユーザーグループを作成 +*GroupAPI* | [**DeleteUserGroup**](docs/GroupAPI.md#deleteusergroup) | **Delete** /groups/{groupId} | ユーザーグループを削除 +*GroupAPI* | [**EditUserGroup**](docs/GroupAPI.md#editusergroup) | **Patch** /groups/{groupId} | ユーザーグループを編集 +*GroupAPI* | [**EditUserGroupMember**](docs/GroupAPI.md#editusergroupmember) | **Patch** /groups/{groupId}/members/{userId} | グループメンバーを編集 +*GroupAPI* | [**GetUserGroup**](docs/GroupAPI.md#getusergroup) | **Get** /groups/{groupId} | ユーザーグループを取得 +*GroupAPI* | [**GetUserGroupAdmins**](docs/GroupAPI.md#getusergroupadmins) | **Get** /groups/{groupId}/admins | グループ管理者を取得 +*GroupAPI* | [**GetUserGroupMembers**](docs/GroupAPI.md#getusergroupmembers) | **Get** /groups/{groupId}/members | グループメンバーを取得 +*GroupAPI* | [**GetUserGroups**](docs/GroupAPI.md#getusergroups) | **Get** /groups | ユーザーグループのリストを取得 +*GroupAPI* | [**RemoveUserGroupAdmin**](docs/GroupAPI.md#removeusergroupadmin) | **Delete** /groups/{groupId}/admins/{userId} | グループ管理者を削除 +*GroupAPI* | [**RemoveUserGroupMember**](docs/GroupAPI.md#removeusergroupmember) | **Delete** /groups/{groupId}/members/{userId} | グループメンバーを削除 +*GroupAPI* | [**RemoveUserGroupMembers**](docs/GroupAPI.md#removeusergroupmembers) | **Delete** /groups/{groupId}/members | グループメンバーを一括削除 +*MeAPI* | [**AddMyStar**](docs/MeAPI.md#addmystar) | **Post** /users/me/stars | チャンネルをスターに追加 +*MeAPI* | [**AddMyUserTag**](docs/MeAPI.md#addmyusertag) | **Post** /users/me/tags | 自分にタグを追加 +*MeAPI* | [**ChangeMyIcon**](docs/MeAPI.md#changemyicon) | **Put** /users/me/icon | 自分のアイコン画像を変更 +*MeAPI* | [**ChangeMyNotifyCitation**](docs/MeAPI.md#changemynotifycitation) | **Put** /users/me/settings/notify-citation | メッセージ引用通知の設定情報を変更 +*MeAPI* | [**ChangeMyPassword**](docs/MeAPI.md#changemypassword) | **Put** /users/me/password | 自分のパスワードを変更 +*MeAPI* | [**EditMe**](docs/MeAPI.md#editme) | **Patch** /users/me | 自分のユーザー情報を変更 +*MeAPI* | [**EditMyUserTag**](docs/MeAPI.md#editmyusertag) | **Patch** /users/me/tags/{tagId} | 自分のタグを編集 +*MeAPI* | [**GetMe**](docs/MeAPI.md#getme) | **Get** /users/me | 自分のユーザー詳細を取得 +*MeAPI* | [**GetMyChannelSubscriptions**](docs/MeAPI.md#getmychannelsubscriptions) | **Get** /users/me/subscriptions | 自分のチャンネル購読状態を取得 +*MeAPI* | [**GetMyExternalAccounts**](docs/MeAPI.md#getmyexternalaccounts) | **Get** /users/me/ex-accounts | 外部ログインアカウント一覧を取得 +*MeAPI* | [**GetMyIcon**](docs/MeAPI.md#getmyicon) | **Get** /users/me/icon | 自分のアイコン画像を取得 +*MeAPI* | [**GetMyNotifyCitation**](docs/MeAPI.md#getmynotifycitation) | **Get** /users/me/settings/notify-citation | メッセージ引用通知の設定情報を取得 +*MeAPI* | [**GetMyQRCode**](docs/MeAPI.md#getmyqrcode) | **Get** /users/me/qr-code | QRコードを取得 +*MeAPI* | [**GetMySessions**](docs/MeAPI.md#getmysessions) | **Get** /users/me/sessions | 自分のログインセッションリストを取得 +*MeAPI* | [**GetMyStampHistory**](docs/MeAPI.md#getmystamphistory) | **Get** /users/me/stamp-history | スタンプ履歴を取得 +*MeAPI* | [**GetMyStars**](docs/MeAPI.md#getmystars) | **Get** /users/me/stars | スターチャンネルリストを取得 +*MeAPI* | [**GetMyTokens**](docs/MeAPI.md#getmytokens) | **Get** /users/me/tokens | 有効トークンのリストを取得 +*MeAPI* | [**GetMyUnreadChannels**](docs/MeAPI.md#getmyunreadchannels) | **Get** /users/me/unread | 未読チャンネルを取得 +*MeAPI* | [**GetMyUserTags**](docs/MeAPI.md#getmyusertags) | **Get** /users/me/tags | 自分のタグリストを取得 +*MeAPI* | [**GetMyViewStates**](docs/MeAPI.md#getmyviewstates) | **Get** /users/me/view-states | 自身のチャンネル閲覧状態一覧を取得 +*MeAPI* | [**GetOIDCUserInfo**](docs/MeAPI.md#getoidcuserinfo) | **Get** /users/me/oidc | 自分のユーザー詳細を取得 (OIDC UserInfo) +*MeAPI* | [**GetUserSettings**](docs/MeAPI.md#getusersettings) | **Get** /users/me/settings | ユーザー設定を取得 +*MeAPI* | [**LinkExternalAccount**](docs/MeAPI.md#linkexternalaccount) | **Post** /users/me/ex-accounts/link | 外部ログインアカウントを紐付ける +*MeAPI* | [**ReadChannel**](docs/MeAPI.md#readchannel) | **Delete** /users/me/unread/{channelId} | チャンネルを既読にする +*MeAPI* | [**RegisterFCMDevice**](docs/MeAPI.md#registerfcmdevice) | **Post** /users/me/fcm-device | FCMデバイスを登録 +*MeAPI* | [**RemoveMyStar**](docs/MeAPI.md#removemystar) | **Delete** /users/me/stars/{channelId} | チャンネルをスターから削除します +*MeAPI* | [**RemoveMyUserTag**](docs/MeAPI.md#removemyusertag) | **Delete** /users/me/tags/{tagId} | 自分からタグを削除します +*MeAPI* | [**RevokeMySession**](docs/MeAPI.md#revokemysession) | **Delete** /users/me/sessions/{sessionId} | セッションを無効化 +*MeAPI* | [**RevokeMyToken**](docs/MeAPI.md#revokemytoken) | **Delete** /users/me/tokens/{tokenId} | トークンの認可を取り消す +*MeAPI* | [**SetChannelSubscribeLevel**](docs/MeAPI.md#setchannelsubscribelevel) | **Put** /users/me/subscriptions/{channelId} | チャンネル購読レベルを設定 +*MeAPI* | [**UnlinkExternalAccount**](docs/MeAPI.md#unlinkexternalaccount) | **Post** /users/me/ex-accounts/unlink | 外部ログインアカウントの紐付けを解除 +*MessageAPI* | [**AddMessageStamp**](docs/MessageAPI.md#addmessagestamp) | **Post** /messages/{messageId}/stamps/{stampId} | スタンプを押す +*MessageAPI* | [**CreatePin**](docs/MessageAPI.md#createpin) | **Post** /messages/{messageId}/pin | ピン留めする +*MessageAPI* | [**DeleteMessage**](docs/MessageAPI.md#deletemessage) | **Delete** /messages/{messageId} | メッセージを削除 +*MessageAPI* | [**EditMessage**](docs/MessageAPI.md#editmessage) | **Put** /messages/{messageId} | メッセージを編集 +*MessageAPI* | [**GetDirectMessages**](docs/MessageAPI.md#getdirectmessages) | **Get** /users/{userId}/messages | ダイレクトメッセージのリストを取得 +*MessageAPI* | [**GetMessage**](docs/MessageAPI.md#getmessage) | **Get** /messages/{messageId} | メッセージを取得 +*MessageAPI* | [**GetMessageClips**](docs/MessageAPI.md#getmessageclips) | **Get** /messages/{messageId}/clips | 自分のクリップを取得 +*MessageAPI* | [**GetMessageStamps**](docs/MessageAPI.md#getmessagestamps) | **Get** /messages/{messageId}/stamps | メッセージのスタンプリストを取得 +*MessageAPI* | [**GetMessages**](docs/MessageAPI.md#getmessages) | **Get** /channels/{channelId}/messages | チャンネルメッセージのリストを取得 +*MessageAPI* | [**GetPin**](docs/MessageAPI.md#getpin) | **Get** /messages/{messageId}/pin | ピン留めを取得 +*MessageAPI* | [**PostDirectMessage**](docs/MessageAPI.md#postdirectmessage) | **Post** /users/{userId}/messages | ダイレクトメッセージを送信 +*MessageAPI* | [**PostMessage**](docs/MessageAPI.md#postmessage) | **Post** /channels/{channelId}/messages | チャンネルにメッセージを投稿 +*MessageAPI* | [**RemoveMessageStamp**](docs/MessageAPI.md#removemessagestamp) | **Delete** /messages/{messageId}/stamps/{stampId} | スタンプを消す +*MessageAPI* | [**RemovePin**](docs/MessageAPI.md#removepin) | **Delete** /messages/{messageId}/pin | ピン留めを外す +*MessageAPI* | [**SearchMessages**](docs/MessageAPI.md#searchmessages) | **Get** /messages | メッセージを検索 +*NotificationAPI* | [**EditChannelSubscribers**](docs/NotificationAPI.md#editchannelsubscribers) | **Patch** /channels/{channelId}/subscribers | チャンネルの通知購読者を編集 +*NotificationAPI* | [**GetChannelSubscribers**](docs/NotificationAPI.md#getchannelsubscribers) | **Get** /channels/{channelId}/subscribers | チャンネルの通知購読者のリストを取得 +*NotificationAPI* | [**GetMyChannelSubscriptions**](docs/NotificationAPI.md#getmychannelsubscriptions) | **Get** /users/me/subscriptions | 自分のチャンネル購読状態を取得 +*NotificationAPI* | [**GetMyUnreadChannels**](docs/NotificationAPI.md#getmyunreadchannels) | **Get** /users/me/unread | 未読チャンネルを取得 +*NotificationAPI* | [**GetMyViewStates**](docs/NotificationAPI.md#getmyviewstates) | **Get** /users/me/view-states | 自身のチャンネル閲覧状態一覧を取得 +*NotificationAPI* | [**ReadChannel**](docs/NotificationAPI.md#readchannel) | **Delete** /users/me/unread/{channelId} | チャンネルを既読にする +*NotificationAPI* | [**RegisterFCMDevice**](docs/NotificationAPI.md#registerfcmdevice) | **Post** /users/me/fcm-device | FCMデバイスを登録 +*NotificationAPI* | [**SetChannelSubscribeLevel**](docs/NotificationAPI.md#setchannelsubscribelevel) | **Put** /users/me/subscriptions/{channelId} | チャンネル購読レベルを設定 +*NotificationAPI* | [**SetChannelSubscribers**](docs/NotificationAPI.md#setchannelsubscribers) | **Put** /channels/{channelId}/subscribers | チャンネルの通知購読者を設定 +*NotificationAPI* | [**Ws**](docs/NotificationAPI.md#ws) | **Get** /ws | WebSocket通知ストリームに接続します +*Oauth2API* | [**CreateClient**](docs/Oauth2API.md#createclient) | **Post** /clients | OAuth2クライアントを作成 +*Oauth2API* | [**DeleteClient**](docs/Oauth2API.md#deleteclient) | **Delete** /clients/{clientId} | OAuth2クライアントを削除 +*Oauth2API* | [**EditClient**](docs/Oauth2API.md#editclient) | **Patch** /clients/{clientId} | OAuth2クライアント情報を変更 +*Oauth2API* | [**GetClient**](docs/Oauth2API.md#getclient) | **Get** /clients/{clientId} | OAuth2クライアント情報を取得 +*Oauth2API* | [**GetClients**](docs/Oauth2API.md#getclients) | **Get** /clients | OAuth2クライアントのリストを取得 +*Oauth2API* | [**GetMyTokens**](docs/Oauth2API.md#getmytokens) | **Get** /users/me/tokens | 有効トークンのリストを取得 +*Oauth2API* | [**GetOAuth2Authorize**](docs/Oauth2API.md#getoauth2authorize) | **Get** /oauth2/authorize | OAuth2 認可エンドポイント +*Oauth2API* | [**PostOAuth2Authorize**](docs/Oauth2API.md#postoauth2authorize) | **Post** /oauth2/authorize | OAuth2 認可エンドポイント +*Oauth2API* | [**PostOAuth2AuthorizeDecide**](docs/Oauth2API.md#postoauth2authorizedecide) | **Post** /oauth2/authorize/decide | OAuth2 認可承諾API +*Oauth2API* | [**PostOAuth2Token**](docs/Oauth2API.md#postoauth2token) | **Post** /oauth2/token | OAuth2 トークンエンドポイント +*Oauth2API* | [**RevokeClientTokens**](docs/Oauth2API.md#revokeclienttokens) | **Delete** /clients/{clientId}/tokens | OAuthクライアントのトークンを削除 +*Oauth2API* | [**RevokeMyToken**](docs/Oauth2API.md#revokemytoken) | **Delete** /users/me/tokens/{tokenId} | トークンの認可を取り消す +*Oauth2API* | [**RevokeOAuth2Token**](docs/Oauth2API.md#revokeoauth2token) | **Post** /oauth2/revoke | OAuth2 トークン無効化エンドポイント +*OgpAPI* | [**DeleteOgpCache**](docs/OgpAPI.md#deleteogpcache) | **Delete** /ogp/cache | OGP情報のキャッシュを削除 +*OgpAPI* | [**GetOgp**](docs/OgpAPI.md#getogp) | **Get** /ogp | OGP情報を取得 +*PinAPI* | [**CreatePin**](docs/PinAPI.md#createpin) | **Post** /messages/{messageId}/pin | ピン留めする +*PinAPI* | [**GetChannelPins**](docs/PinAPI.md#getchannelpins) | **Get** /channels/{channelId}/pins | チャンネルピンのリストを取得 +*PinAPI* | [**GetPin**](docs/PinAPI.md#getpin) | **Get** /messages/{messageId}/pin | ピン留めを取得 +*PinAPI* | [**RemovePin**](docs/PinAPI.md#removepin) | **Delete** /messages/{messageId}/pin | ピン留めを外す +*PublicAPI* | [**GetPublicUserIcon**](docs/PublicAPI.md#getpublicusericon) | **Get** /public/icon/{username} | ユーザーのアイコン画像を取得 +*PublicAPI* | [**GetServerVersion**](docs/PublicAPI.md#getserverversion) | **Get** /version | バージョンを取得 +*QallAPI* | [**ChangeParticipantRole**](docs/QallAPI.md#changeparticipantrole) | **Patch** /qall/rooms/{roomId}/participants | ルームでの発言権限を変更 +*QallAPI* | [**GetLiveKitToken**](docs/QallAPI.md#getlivekittoken) | **Get** /qall/token | LiveKitトークンを取得 +*QallAPI* | [**GetQallEndpoints**](docs/QallAPI.md#getqallendpoints) | **Get** /qall/endpoints | LiveKitエンドポイントを取得 +*QallAPI* | [**GetRoomMetadata**](docs/QallAPI.md#getroommetadata) | **Get** /qall/rooms/{roomId}/metadata | ルームのメタデータを取得 +*QallAPI* | [**GetRooms**](docs/QallAPI.md#getrooms) | **Get** /qall/rooms | ルームと参加者の一覧を取得 +*QallAPI* | [**GetSoundboardList**](docs/QallAPI.md#getsoundboardlist) | **Get** /qall/soundboard | サウンドボード用の音声一覧を取得 +*QallAPI* | [**LiveKitWebhook**](docs/QallAPI.md#livekitwebhook) | **Post** /qall/webhook | LiveKit Webhook受信 +*QallAPI* | [**PostSoundboard**](docs/QallAPI.md#postsoundboard) | **Post** /qall/soundboard | サウンドボード用の短い音声ファイルをアップロード +*QallAPI* | [**PostSoundboardPlay**](docs/QallAPI.md#postsoundboardplay) | **Post** /qall/soundboard/play | アップロード済み音声を LiveKit ルームで再生 +*QallAPI* | [**UpdateRoomMetadata**](docs/QallAPI.md#updateroommetadata) | **Patch** /qall/rooms/{roomId}/metadata | ルームのメタデータを更新 +*StampAPI* | [**AddMessageStamp**](docs/StampAPI.md#addmessagestamp) | **Post** /messages/{messageId}/stamps/{stampId} | スタンプを押す +*StampAPI* | [**ChangeStampImage**](docs/StampAPI.md#changestampimage) | **Put** /stamps/{stampId}/image | スタンプ画像を変更 +*StampAPI* | [**CreateStamp**](docs/StampAPI.md#createstamp) | **Post** /stamps | スタンプを作成 +*StampAPI* | [**CreateStampPalette**](docs/StampAPI.md#createstamppalette) | **Post** /stamp-palettes | スタンプパレットを作成 +*StampAPI* | [**DeleteStamp**](docs/StampAPI.md#deletestamp) | **Delete** /stamps/{stampId} | スタンプを削除 +*StampAPI* | [**DeleteStampPalette**](docs/StampAPI.md#deletestamppalette) | **Delete** /stamp-palettes/{paletteId} | スタンプパレットを削除 +*StampAPI* | [**EditStamp**](docs/StampAPI.md#editstamp) | **Patch** /stamps/{stampId} | スタンプ情報を変更 +*StampAPI* | [**EditStampPalette**](docs/StampAPI.md#editstamppalette) | **Patch** /stamp-palettes/{paletteId} | スタンプパレットを編集 +*StampAPI* | [**GetMessageStamps**](docs/StampAPI.md#getmessagestamps) | **Get** /messages/{messageId}/stamps | メッセージのスタンプリストを取得 +*StampAPI* | [**GetMyStampHistory**](docs/StampAPI.md#getmystamphistory) | **Get** /users/me/stamp-history | スタンプ履歴を取得 +*StampAPI* | [**GetStamp**](docs/StampAPI.md#getstamp) | **Get** /stamps/{stampId} | スタンプ情報を取得 +*StampAPI* | [**GetStampImage**](docs/StampAPI.md#getstampimage) | **Get** /stamps/{stampId}/image | スタンプ画像を取得 +*StampAPI* | [**GetStampPalette**](docs/StampAPI.md#getstamppalette) | **Get** /stamp-palettes/{paletteId} | スタンプパレットを取得 +*StampAPI* | [**GetStampPalettes**](docs/StampAPI.md#getstamppalettes) | **Get** /stamp-palettes | スタンプパレットのリストを取得 +*StampAPI* | [**GetStampStats**](docs/StampAPI.md#getstampstats) | **Get** /stamps/{stampId}/stats | スタンプ統計情報を取得 +*StampAPI* | [**GetStamps**](docs/StampAPI.md#getstamps) | **Get** /stamps | スタンプリストを取得 +*StampAPI* | [**RemoveMessageStamp**](docs/StampAPI.md#removemessagestamp) | **Delete** /messages/{messageId}/stamps/{stampId} | スタンプを消す +*StarAPI* | [**AddMyStar**](docs/StarAPI.md#addmystar) | **Post** /users/me/stars | チャンネルをスターに追加 +*StarAPI* | [**GetMyStars**](docs/StarAPI.md#getmystars) | **Get** /users/me/stars | スターチャンネルリストを取得 +*StarAPI* | [**RemoveMyStar**](docs/StarAPI.md#removemystar) | **Delete** /users/me/stars/{channelId} | チャンネルをスターから削除します +*UserAPI* | [**AddUserTag**](docs/UserAPI.md#addusertag) | **Post** /users/{userId}/tags | ユーザーにタグを追加 +*UserAPI* | [**ChangeUserIcon**](docs/UserAPI.md#changeusericon) | **Put** /users/{userId}/icon | ユーザーのアイコン画像を変更します +*UserAPI* | [**ChangeUserPassword**](docs/UserAPI.md#changeuserpassword) | **Put** /users/{userId}/password | ユーザーのパスワードを変更 +*UserAPI* | [**CreateUser**](docs/UserAPI.md#createuser) | **Post** /users | ユーザーを登録 +*UserAPI* | [**EditUser**](docs/UserAPI.md#edituser) | **Patch** /users/{userId} | ユーザー情報を変更 +*UserAPI* | [**EditUserTag**](docs/UserAPI.md#editusertag) | **Patch** /users/{userId}/tags/{tagId} | ユーザーのタグを編集 +*UserAPI* | [**GetDirectMessages**](docs/UserAPI.md#getdirectmessages) | **Get** /users/{userId}/messages | ダイレクトメッセージのリストを取得 +*UserAPI* | [**GetUser**](docs/UserAPI.md#getuser) | **Get** /users/{userId} | ユーザー詳細情報を取得 +*UserAPI* | [**GetUserDMChannel**](docs/UserAPI.md#getuserdmchannel) | **Get** /users/{userId}/dm-channel | DMチャンネル情報を取得 +*UserAPI* | [**GetUserIcon**](docs/UserAPI.md#getusericon) | **Get** /users/{userId}/icon | ユーザーのアイコン画像を取得 +*UserAPI* | [**GetUserStats**](docs/UserAPI.md#getuserstats) | **Get** /users/{userId}/stats | ユーザー統計情報を取得 +*UserAPI* | [**GetUserTags**](docs/UserAPI.md#getusertags) | **Get** /users/{userId}/tags | ユーザーのタグリストを取得 +*UserAPI* | [**GetUsers**](docs/UserAPI.md#getusers) | **Get** /users | ユーザーのリストを取得 +*UserAPI* | [**PostDirectMessage**](docs/UserAPI.md#postdirectmessage) | **Post** /users/{userId}/messages | ダイレクトメッセージを送信 +*UserAPI* | [**RemoveUserTag**](docs/UserAPI.md#removeusertag) | **Delete** /users/{userId}/tags/{tagId} | ユーザーからタグを削除します +*UserTagAPI* | [**AddMyUserTag**](docs/UserTagAPI.md#addmyusertag) | **Post** /users/me/tags | 自分にタグを追加 +*UserTagAPI* | [**AddUserTag**](docs/UserTagAPI.md#addusertag) | **Post** /users/{userId}/tags | ユーザーにタグを追加 +*UserTagAPI* | [**EditMyUserTag**](docs/UserTagAPI.md#editmyusertag) | **Patch** /users/me/tags/{tagId} | 自分のタグを編集 +*UserTagAPI* | [**EditUserTag**](docs/UserTagAPI.md#editusertag) | **Patch** /users/{userId}/tags/{tagId} | ユーザーのタグを編集 +*UserTagAPI* | [**GetMyUserTags**](docs/UserTagAPI.md#getmyusertags) | **Get** /users/me/tags | 自分のタグリストを取得 +*UserTagAPI* | [**GetTag**](docs/UserTagAPI.md#gettag) | **Get** /tags/{tagId} | タグ情報を取得 +*UserTagAPI* | [**GetUserTags**](docs/UserTagAPI.md#getusertags) | **Get** /users/{userId}/tags | ユーザーのタグリストを取得 +*UserTagAPI* | [**RemoveMyUserTag**](docs/UserTagAPI.md#removemyusertag) | **Delete** /users/me/tags/{tagId} | 自分からタグを削除します +*UserTagAPI* | [**RemoveUserTag**](docs/UserTagAPI.md#removeusertag) | **Delete** /users/{userId}/tags/{tagId} | ユーザーからタグを削除します +*WebhookAPI* | [**ChangeWebhookIcon**](docs/WebhookAPI.md#changewebhookicon) | **Put** /webhooks/{webhookId}/icon | Webhookのアイコンを変更 +*WebhookAPI* | [**CreateWebhook**](docs/WebhookAPI.md#createwebhook) | **Post** /webhooks | Webhookを新規作成 +*WebhookAPI* | [**DeleteWebhook**](docs/WebhookAPI.md#deletewebhook) | **Delete** /webhooks/{webhookId} | Webhookを削除 +*WebhookAPI* | [**EditWebhook**](docs/WebhookAPI.md#editwebhook) | **Patch** /webhooks/{webhookId} | Webhook情報を変更 +*WebhookAPI* | [**GetWebhook**](docs/WebhookAPI.md#getwebhook) | **Get** /webhooks/{webhookId} | Webhook情報を取得 +*WebhookAPI* | [**GetWebhookIcon**](docs/WebhookAPI.md#getwebhookicon) | **Get** /webhooks/{webhookId}/icon | Webhookのアイコンを取得 +*WebhookAPI* | [**GetWebhookMessages**](docs/WebhookAPI.md#getwebhookmessages) | **Get** /webhooks/{webhookId}/messages | Webhookの投稿メッセージのリストを取得 +*WebhookAPI* | [**GetWebhooks**](docs/WebhookAPI.md#getwebhooks) | **Get** /webhooks | Webhook情報のリストを取得します +*WebhookAPI* | [**PostWebhook**](docs/WebhookAPI.md#postwebhook) | **Post** /webhooks/{webhookId} | Webhookを送信 +*WebrtcAPI* | [**GetWebRTCState**](docs/WebrtcAPI.md#getwebrtcstate) | **Get** /webrtc/state | WebRTC状態を取得 +*WebrtcAPI* | [**PostWebRTCAuthenticate**](docs/WebrtcAPI.md#postwebrtcauthenticate) | **Post** /webrtc/authenticate | Skyway用認証API ## Documentation For Models @@ -453,7 +454,20 @@ Authentication schemes defined for the API: - **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: r_session and passed in as the auth context for each request. +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 + +```go +auth := context.WithValue( + context.Background(), + traq.ContextAPIKeys, + map[string]traq.APIKey{ + "cookieAuth": {Key: "API_KEY_STRING"}, + }, + ) +r, err := client.Service.Operation(auth, args) +``` ### OAuth2 @@ -468,20 +482,20 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example -```golang -auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING") +```go +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. -```golang +```go 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, sw.ContextOAuth2, tokenSource) +auth := context.WithValue(oauth2.NoContext, traq.ContextOAuth2, tokenSource) r, err := client.Service.Operation(auth, args) ``` @@ -491,8 +505,8 @@ r, err := client.Service.Operation(auth, args) Example -```golang -auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING") +```go +auth := context.WithValue(context.Background(), traq.ContextAccessToken, "BEARER_TOKEN_STRING") r, err := client.Service.Operation(auth, args) ``` diff --git a/docs/ActivityApi.md b/docs/ActivityAPI.md similarity index 57% rename from docs/ActivityApi.md rename to docs/ActivityAPI.md index edd4b3c..6d998c1 100644 --- a/docs/ActivityApi.md +++ b/docs/ActivityAPI.md @@ -1,11 +1,11 @@ -# \ActivityApi +# \ActivityAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetActivityTimeline**](ActivityApi.md#GetActivityTimeline) | **Get** /activity/timeline | アクテビティタイムラインを取得 -[**GetOnlineUsers**](ActivityApi.md#GetOnlineUsers) | **Get** /activity/onlines | オンラインユーザーリストを取得 +[**GetActivityTimeline**](ActivityAPI.md#GetActivityTimeline) | **Get** /activity/timeline | アクテビティタイムラインを取得 +[**GetOnlineUsers**](ActivityAPI.md#GetOnlineUsers) | **Get** /activity/onlines | オンラインユーザーリストを取得 @@ -23,26 +23,26 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - limit := int32(56) // int32 | 取得する件数 (optional) (default to 50) - all := true // bool | 全てのチャンネルのタイムラインを取得する (optional) (default to false) - perChannel := true // bool | 同じチャンネルのメッセージは最新のもののみ取得するか (optional) (default to false) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ActivityApi.GetActivityTimeline(context.Background()).Limit(limit).All(all).PerChannel(perChannel).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ActivityApi.GetActivityTimeline``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetActivityTimeline`: []ActivityTimelineMessage - fmt.Fprintf(os.Stdout, "Response from `ActivityApi.GetActivityTimeline`: %v\n", resp) + limit := int32(56) // int32 | 取得する件数 (optional) (default to 50) + all := true // bool | 全てのチャンネルのタイムラインを取得する (optional) (default to false) + perChannel := true // bool | 同じチャンネルのメッセージは最新のもののみ取得するか (optional) (default to false) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ActivityAPI.GetActivityTimeline(context.Background()).Limit(limit).All(all).PerChannel(perChannel).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ActivityAPI.GetActivityTimeline``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetActivityTimeline`: []ActivityTimelineMessage + fmt.Fprintf(os.Stdout, "Response from `ActivityAPI.GetActivityTimeline`: %v\n", resp) } ``` @@ -93,23 +93,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ActivityApi.GetOnlineUsers(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ActivityApi.GetOnlineUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOnlineUsers`: []string - fmt.Fprintf(os.Stdout, "Response from `ActivityApi.GetOnlineUsers`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ActivityAPI.GetOnlineUsers(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ActivityAPI.GetOnlineUsers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOnlineUsers`: []string + fmt.Fprintf(os.Stdout, "Response from `ActivityAPI.GetOnlineUsers`: %v\n", resp) } ``` diff --git a/docs/AuthenticationApi.md b/docs/AuthenticationAPI.md similarity index 59% rename from docs/AuthenticationApi.md rename to docs/AuthenticationAPI.md index 49f85fc..cdb10d8 100644 --- a/docs/AuthenticationApi.md +++ b/docs/AuthenticationAPI.md @@ -1,16 +1,16 @@ -# \AuthenticationApi +# \AuthenticationAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetMyExternalAccounts**](AuthenticationApi.md#GetMyExternalAccounts) | **Get** /users/me/ex-accounts | 外部ログインアカウント一覧を取得 -[**GetMySessions**](AuthenticationApi.md#GetMySessions) | **Get** /users/me/sessions | 自分のログインセッションリストを取得 -[**LinkExternalAccount**](AuthenticationApi.md#LinkExternalAccount) | **Post** /users/me/ex-accounts/link | 外部ログインアカウントを紐付ける -[**Login**](AuthenticationApi.md#Login) | **Post** /login | ログイン -[**Logout**](AuthenticationApi.md#Logout) | **Post** /logout | ログアウト -[**RevokeMySession**](AuthenticationApi.md#RevokeMySession) | **Delete** /users/me/sessions/{sessionId} | セッションを無効化 -[**UnlinkExternalAccount**](AuthenticationApi.md#UnlinkExternalAccount) | **Post** /users/me/ex-accounts/unlink | 外部ログインアカウントの紐付けを解除 +[**GetMyExternalAccounts**](AuthenticationAPI.md#GetMyExternalAccounts) | **Get** /users/me/ex-accounts | 外部ログインアカウント一覧を取得 +[**GetMySessions**](AuthenticationAPI.md#GetMySessions) | **Get** /users/me/sessions | 自分のログインセッションリストを取得 +[**LinkExternalAccount**](AuthenticationAPI.md#LinkExternalAccount) | **Post** /users/me/ex-accounts/link | 外部ログインアカウントを紐付ける +[**Login**](AuthenticationAPI.md#Login) | **Post** /login | ログイン +[**Logout**](AuthenticationAPI.md#Logout) | **Post** /logout | ログアウト +[**RevokeMySession**](AuthenticationAPI.md#RevokeMySession) | **Delete** /users/me/sessions/{sessionId} | セッションを無効化 +[**UnlinkExternalAccount**](AuthenticationAPI.md#UnlinkExternalAccount) | **Post** /users/me/ex-accounts/unlink | 外部ログインアカウントの紐付けを解除 @@ -28,23 +28,23 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.AuthenticationApi.GetMyExternalAccounts(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationApi.GetMyExternalAccounts``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyExternalAccounts`: []ExternalProviderUser - fmt.Fprintf(os.Stdout, "Response from `AuthenticationApi.GetMyExternalAccounts`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.AuthenticationAPI.GetMyExternalAccounts(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationAPI.GetMyExternalAccounts``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyExternalAccounts`: []ExternalProviderUser + fmt.Fprintf(os.Stdout, "Response from `AuthenticationAPI.GetMyExternalAccounts`: %v\n", resp) } ``` @@ -89,23 +89,23 @@ Other parameters are passed through a pointer to a apiGetMyExternalAccountsReque package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.AuthenticationApi.GetMySessions(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationApi.GetMySessions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMySessions`: []LoginSession - fmt.Fprintf(os.Stdout, "Response from `AuthenticationApi.GetMySessions`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.AuthenticationAPI.GetMySessions(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationAPI.GetMySessions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMySessions`: []LoginSession + fmt.Fprintf(os.Stdout, "Response from `AuthenticationAPI.GetMySessions`: %v\n", resp) } ``` @@ -150,22 +150,22 @@ Other parameters are passed through a pointer to a apiGetMySessionsRequest struc package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postLinkExternalAccount := *traq.NewPostLinkExternalAccount("ProviderName_example") // PostLinkExternalAccount | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.AuthenticationApi.LinkExternalAccount(context.Background()).PostLinkExternalAccount(postLinkExternalAccount).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationApi.LinkExternalAccount``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + postLinkExternalAccount := *traq.NewPostLinkExternalAccount("ProviderName_example") // PostLinkExternalAccount | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.AuthenticationAPI.LinkExternalAccount(context.Background()).PostLinkExternalAccount(postLinkExternalAccount).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationAPI.LinkExternalAccount``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -214,23 +214,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - redirect := "redirect_example" // string | リダイレクト先 (optional) - postLoginRequest := *traq.NewPostLoginRequest("Name_example", "Password_example") // PostLoginRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.AuthenticationApi.Login(context.Background()).Redirect(redirect).PostLoginRequest(postLoginRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationApi.Login``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + redirect := "redirect_example" // string | リダイレクト先 (optional) + postLoginRequest := *traq.NewPostLoginRequest("Name_example", "Password_example") // PostLoginRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.AuthenticationAPI.Login(context.Background()).Redirect(redirect).PostLoginRequest(postLoginRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationAPI.Login``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -280,23 +280,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - redirect := "redirect_example" // string | リダイレクト先 (optional) - all := true // bool | 全てのセッションでログアウトするかどうか (optional) (default to false) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.AuthenticationApi.Logout(context.Background()).Redirect(redirect).All(all).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationApi.Logout``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + redirect := "redirect_example" // string | リダイレクト先 (optional) + all := true // bool | 全てのセッションでログアウトするかどうか (optional) (default to false) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.AuthenticationAPI.Logout(context.Background()).Redirect(redirect).All(all).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationAPI.Logout``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -346,22 +346,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - sessionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | セッションUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.AuthenticationApi.RevokeMySession(context.Background(), sessionId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationApi.RevokeMySession``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + sessionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | セッションUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.AuthenticationAPI.RevokeMySession(context.Background(), sessionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationAPI.RevokeMySession``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -414,22 +414,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postUnlinkExternalAccount := *traq.NewPostUnlinkExternalAccount("ProviderName_example") // PostUnlinkExternalAccount | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.AuthenticationApi.UnlinkExternalAccount(context.Background()).PostUnlinkExternalAccount(postUnlinkExternalAccount).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationApi.UnlinkExternalAccount``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + postUnlinkExternalAccount := *traq.NewPostUnlinkExternalAccount("ProviderName_example") // PostUnlinkExternalAccount | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.AuthenticationAPI.UnlinkExternalAccount(context.Background()).PostUnlinkExternalAccount(postUnlinkExternalAccount).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationAPI.UnlinkExternalAccount``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` diff --git a/docs/BotApi.md b/docs/BotAPI.md similarity index 62% rename from docs/BotApi.md rename to docs/BotAPI.md index ccb271a..57752e0 100644 --- a/docs/BotApi.md +++ b/docs/BotAPI.md @@ -1,24 +1,24 @@ -# \BotApi +# \BotAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ActivateBot**](BotApi.md#ActivateBot) | **Post** /bots/{botId}/actions/activate | BOTをアクティベート -[**ChangeBotIcon**](BotApi.md#ChangeBotIcon) | **Put** /bots/{botId}/icon | BOTのアイコン画像を変更 -[**ConnectBotWS**](BotApi.md#ConnectBotWS) | **Get** /bots/ws | WebSocket Mode BOT用通知ストリームに接続します -[**CreateBot**](BotApi.md#CreateBot) | **Post** /bots | BOTを作成 -[**DeleteBot**](BotApi.md#DeleteBot) | **Delete** /bots/{botId} | BOTを削除 -[**EditBot**](BotApi.md#EditBot) | **Patch** /bots/{botId} | BOT情報を変更 -[**GetBot**](BotApi.md#GetBot) | **Get** /bots/{botId} | BOT情報を取得 -[**GetBotIcon**](BotApi.md#GetBotIcon) | **Get** /bots/{botId}/icon | BOTのアイコン画像を取得 -[**GetBotLogs**](BotApi.md#GetBotLogs) | **Get** /bots/{botId}/logs | BOTのイベントログを取得 -[**GetBots**](BotApi.md#GetBots) | **Get** /bots | BOTリストを取得 -[**GetChannelBots**](BotApi.md#GetChannelBots) | **Get** /channels/{channelId}/bots | チャンネル参加中のBOTのリストを取得 -[**InactivateBot**](BotApi.md#InactivateBot) | **Post** /bots/{botId}/actions/inactivate | BOTをインアクティベート -[**LetBotJoinChannel**](BotApi.md#LetBotJoinChannel) | **Post** /bots/{botId}/actions/join | BOTをチャンネルに参加させる -[**LetBotLeaveChannel**](BotApi.md#LetBotLeaveChannel) | **Post** /bots/{botId}/actions/leave | BOTをチャンネルから退出させる -[**ReissueBot**](BotApi.md#ReissueBot) | **Post** /bots/{botId}/actions/reissue | BOTのトークンを再発行 +[**ActivateBot**](BotAPI.md#ActivateBot) | **Post** /bots/{botId}/actions/activate | BOTをアクティベート +[**ChangeBotIcon**](BotAPI.md#ChangeBotIcon) | **Put** /bots/{botId}/icon | BOTのアイコン画像を変更 +[**ConnectBotWS**](BotAPI.md#ConnectBotWS) | **Get** /bots/ws | WebSocket Mode BOT用通知ストリームに接続します +[**CreateBot**](BotAPI.md#CreateBot) | **Post** /bots | BOTを作成 +[**DeleteBot**](BotAPI.md#DeleteBot) | **Delete** /bots/{botId} | BOTを削除 +[**EditBot**](BotAPI.md#EditBot) | **Patch** /bots/{botId} | BOT情報を変更 +[**GetBot**](BotAPI.md#GetBot) | **Get** /bots/{botId} | BOT情報を取得 +[**GetBotIcon**](BotAPI.md#GetBotIcon) | **Get** /bots/{botId}/icon | BOTのアイコン画像を取得 +[**GetBotLogs**](BotAPI.md#GetBotLogs) | **Get** /bots/{botId}/logs | BOTのイベントログを取得 +[**GetBots**](BotAPI.md#GetBots) | **Get** /bots | BOTリストを取得 +[**GetChannelBots**](BotAPI.md#GetChannelBots) | **Get** /channels/{channelId}/bots | チャンネル参加中のBOTのリストを取得 +[**InactivateBot**](BotAPI.md#InactivateBot) | **Post** /bots/{botId}/actions/inactivate | BOTをインアクティベート +[**LetBotJoinChannel**](BotAPI.md#LetBotJoinChannel) | **Post** /bots/{botId}/actions/join | BOTをチャンネルに参加させる +[**LetBotLeaveChannel**](BotAPI.md#LetBotLeaveChannel) | **Post** /bots/{botId}/actions/leave | BOTをチャンネルから退出させる +[**ReissueBot**](BotAPI.md#ReissueBot) | **Post** /bots/{botId}/actions/reissue | BOTのトークンを再発行 @@ -36,22 +36,22 @@ BOTをアクティベート package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.BotApi.ActivateBot(context.Background(), botId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BotApi.ActivateBot``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.BotAPI.ActivateBot(context.Background(), botId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BotAPI.ActivateBot``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -104,23 +104,23 @@ BOTのアイコン画像を変更 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID - file := os.NewFile(1234, "some_file") // *os.File | アイコン画像(2MBまでのpng, jpeg, gif) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.BotApi.ChangeBotIcon(context.Background(), botId).File(file).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BotApi.ChangeBotIcon``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID + file := os.NewFile(1234, "some_file") // *os.File | アイコン画像(2MBまでのpng, jpeg, gif) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.BotAPI.ChangeBotIcon(context.Background(), botId).File(file).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BotAPI.ChangeBotIcon``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -174,21 +174,21 @@ WebSocket Mode BOT用通知ストリームに接続します package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.BotApi.ConnectBotWS(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BotApi.ConnectBotWS``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.BotAPI.ConnectBotWS(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BotAPI.ConnectBotWS``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -233,24 +233,24 @@ BOTを作成 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postBotRequest := *traq.NewPostBotRequest("Name_example", "DisplayName_example", "Description_example", traq.BotMode("HTTP")) // PostBotRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.BotApi.CreateBot(context.Background()).PostBotRequest(postBotRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BotApi.CreateBot``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateBot`: BotDetail - fmt.Fprintf(os.Stdout, "Response from `BotApi.CreateBot`: %v\n", resp) + postBotRequest := *traq.NewPostBotRequest("Name_example", "DisplayName_example", "Description_example", traq.BotMode("HTTP")) // PostBotRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.BotAPI.CreateBot(context.Background()).PostBotRequest(postBotRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BotAPI.CreateBot``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateBot`: BotDetail + fmt.Fprintf(os.Stdout, "Response from `BotAPI.CreateBot`: %v\n", resp) } ``` @@ -299,22 +299,22 @@ BOTを削除 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.BotApi.DeleteBot(context.Background(), botId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BotApi.DeleteBot``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.BotAPI.DeleteBot(context.Background(), botId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BotAPI.DeleteBot``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -367,23 +367,23 @@ BOT情報を変更 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID - patchBotRequest := *traq.NewPatchBotRequest() // PatchBotRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.BotApi.EditBot(context.Background(), botId).PatchBotRequest(patchBotRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BotApi.EditBot``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID + patchBotRequest := *traq.NewPatchBotRequest() // PatchBotRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.BotAPI.EditBot(context.Background(), botId).PatchBotRequest(patchBotRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BotAPI.EditBot``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -437,25 +437,25 @@ BOT情報を取得 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID - detail := true // bool | 詳細情報を含めるかどうか (optional) (default to false) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.BotApi.GetBot(context.Background(), botId).Detail(detail).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BotApi.GetBot``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetBot`: GetBot200Response - fmt.Fprintf(os.Stdout, "Response from `BotApi.GetBot`: %v\n", resp) + botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID + detail := true // bool | 詳細情報を含めるかどうか (optional) (default to false) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.BotAPI.GetBot(context.Background(), botId).Detail(detail).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BotAPI.GetBot``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetBot`: GetBot200Response + fmt.Fprintf(os.Stdout, "Response from `BotAPI.GetBot`: %v\n", resp) } ``` @@ -509,24 +509,24 @@ BOTのアイコン画像を取得 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.BotApi.GetBotIcon(context.Background(), botId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BotApi.GetBotIcon``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetBotIcon`: *os.File - fmt.Fprintf(os.Stdout, "Response from `BotApi.GetBotIcon`: %v\n", resp) + botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.BotAPI.GetBotIcon(context.Background(), botId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BotAPI.GetBotIcon``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetBotIcon`: *os.File + fmt.Fprintf(os.Stdout, "Response from `BotAPI.GetBotIcon`: %v\n", resp) } ``` @@ -579,26 +579,26 @@ BOTのイベントログを取得 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID - limit := int32(50) // int32 | 取得する件数 (optional) - offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.BotApi.GetBotLogs(context.Background(), botId).Limit(limit).Offset(offset).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BotApi.GetBotLogs``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetBotLogs`: []BotEventLog - fmt.Fprintf(os.Stdout, "Response from `BotApi.GetBotLogs`: %v\n", resp) + botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID + limit := int32(50) // int32 | 取得する件数 (optional) + offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.BotAPI.GetBotLogs(context.Background(), botId).Limit(limit).Offset(offset).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BotAPI.GetBotLogs``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetBotLogs`: []BotEventLog + fmt.Fprintf(os.Stdout, "Response from `BotAPI.GetBotLogs`: %v\n", resp) } ``` @@ -653,24 +653,24 @@ BOTリストを取得 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - all := true // bool | 全てのBOTを取得するかどうか (optional) (default to false) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.BotApi.GetBots(context.Background()).All(all).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BotApi.GetBots``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetBots`: []Bot - fmt.Fprintf(os.Stdout, "Response from `BotApi.GetBots`: %v\n", resp) + all := true // bool | 全てのBOTを取得するかどうか (optional) (default to false) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.BotAPI.GetBots(context.Background()).All(all).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BotAPI.GetBots``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetBots`: []Bot + fmt.Fprintf(os.Stdout, "Response from `BotAPI.GetBots`: %v\n", resp) } ``` @@ -719,24 +719,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.BotApi.GetChannelBots(context.Background(), channelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BotApi.GetChannelBots``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetChannelBots`: []BotUser - fmt.Fprintf(os.Stdout, "Response from `BotApi.GetChannelBots`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.BotAPI.GetChannelBots(context.Background(), channelId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BotAPI.GetChannelBots``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetChannelBots`: []BotUser + fmt.Fprintf(os.Stdout, "Response from `BotAPI.GetChannelBots`: %v\n", resp) } ``` @@ -789,22 +789,22 @@ BOTをインアクティベート package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.BotApi.InactivateBot(context.Background(), botId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BotApi.InactivateBot``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.BotAPI.InactivateBot(context.Background(), botId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BotAPI.InactivateBot``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -857,23 +857,23 @@ BOTをチャンネルに参加させる package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID - postBotActionJoinRequest := *traq.NewPostBotActionJoinRequest("ChannelId_example") // PostBotActionJoinRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.BotApi.LetBotJoinChannel(context.Background(), botId).PostBotActionJoinRequest(postBotActionJoinRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BotApi.LetBotJoinChannel``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID + postBotActionJoinRequest := *traq.NewPostBotActionJoinRequest("ChannelId_example") // PostBotActionJoinRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.BotAPI.LetBotJoinChannel(context.Background(), botId).PostBotActionJoinRequest(postBotActionJoinRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BotAPI.LetBotJoinChannel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -927,23 +927,23 @@ BOTをチャンネルから退出させる package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID - postBotActionLeaveRequest := *traq.NewPostBotActionLeaveRequest("ChannelId_example") // PostBotActionLeaveRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.BotApi.LetBotLeaveChannel(context.Background(), botId).PostBotActionLeaveRequest(postBotActionLeaveRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BotApi.LetBotLeaveChannel``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID + postBotActionLeaveRequest := *traq.NewPostBotActionLeaveRequest("ChannelId_example") // PostBotActionLeaveRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.BotAPI.LetBotLeaveChannel(context.Background(), botId).PostBotActionLeaveRequest(postBotActionLeaveRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BotAPI.LetBotLeaveChannel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -997,24 +997,24 @@ BOTのトークンを再発行 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.BotApi.ReissueBot(context.Background(), botId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BotApi.ReissueBot``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ReissueBot`: BotTokens - fmt.Fprintf(os.Stdout, "Response from `BotApi.ReissueBot`: %v\n", resp) + botId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BOTUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.BotAPI.ReissueBot(context.Background(), botId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BotAPI.ReissueBot``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReissueBot`: BotTokens + fmt.Fprintf(os.Stdout, "Response from `BotAPI.ReissueBot`: %v\n", resp) } ``` diff --git a/docs/ChannelApi.md b/docs/ChannelAPI.md similarity index 60% rename from docs/ChannelApi.md rename to docs/ChannelAPI.md index ffa56f4..4b161d0 100644 --- a/docs/ChannelApi.md +++ b/docs/ChannelAPI.md @@ -1,27 +1,27 @@ -# \ChannelApi +# \ChannelAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateChannel**](ChannelApi.md#CreateChannel) | **Post** /channels | チャンネルを作成 -[**EditChannel**](ChannelApi.md#EditChannel) | **Patch** /channels/{channelId} | チャンネル情報を変更 -[**EditChannelSubscribers**](ChannelApi.md#EditChannelSubscribers) | **Patch** /channels/{channelId}/subscribers | チャンネルの通知購読者を編集 -[**EditChannelTopic**](ChannelApi.md#EditChannelTopic) | **Put** /channels/{channelId}/topic | チャンネルトピックを編集 -[**GetChannel**](ChannelApi.md#GetChannel) | **Get** /channels/{channelId} | チャンネル情報を取得 -[**GetChannelBots**](ChannelApi.md#GetChannelBots) | **Get** /channels/{channelId}/bots | チャンネル参加中のBOTのリストを取得 -[**GetChannelEvents**](ChannelApi.md#GetChannelEvents) | **Get** /channels/{channelId}/events | チャンネルイベントのリストを取得 -[**GetChannelPath**](ChannelApi.md#GetChannelPath) | **Get** /channels/{channelId}/path | 指定したチャンネルパスを取得 -[**GetChannelPins**](ChannelApi.md#GetChannelPins) | **Get** /channels/{channelId}/pins | チャンネルピンのリストを取得 -[**GetChannelStats**](ChannelApi.md#GetChannelStats) | **Get** /channels/{channelId}/stats | チャンネル統計情報を取得 -[**GetChannelSubscribers**](ChannelApi.md#GetChannelSubscribers) | **Get** /channels/{channelId}/subscribers | チャンネルの通知購読者のリストを取得 -[**GetChannelTopic**](ChannelApi.md#GetChannelTopic) | **Get** /channels/{channelId}/topic | チャンネルトピックを取得 -[**GetChannelViewers**](ChannelApi.md#GetChannelViewers) | **Get** /channels/{channelId}/viewers | チャンネル閲覧者リストを取得 -[**GetChannels**](ChannelApi.md#GetChannels) | **Get** /channels | チャンネルリストを取得 -[**GetMessages**](ChannelApi.md#GetMessages) | **Get** /channels/{channelId}/messages | チャンネルメッセージのリストを取得 -[**GetUserDMChannel**](ChannelApi.md#GetUserDMChannel) | **Get** /users/{userId}/dm-channel | DMチャンネル情報を取得 -[**PostMessage**](ChannelApi.md#PostMessage) | **Post** /channels/{channelId}/messages | チャンネルにメッセージを投稿 -[**SetChannelSubscribers**](ChannelApi.md#SetChannelSubscribers) | **Put** /channels/{channelId}/subscribers | チャンネルの通知購読者を設定 +[**CreateChannel**](ChannelAPI.md#CreateChannel) | **Post** /channels | チャンネルを作成 +[**EditChannel**](ChannelAPI.md#EditChannel) | **Patch** /channels/{channelId} | チャンネル情報を変更 +[**EditChannelSubscribers**](ChannelAPI.md#EditChannelSubscribers) | **Patch** /channels/{channelId}/subscribers | チャンネルの通知購読者を編集 +[**EditChannelTopic**](ChannelAPI.md#EditChannelTopic) | **Put** /channels/{channelId}/topic | チャンネルトピックを編集 +[**GetChannel**](ChannelAPI.md#GetChannel) | **Get** /channels/{channelId} | チャンネル情報を取得 +[**GetChannelBots**](ChannelAPI.md#GetChannelBots) | **Get** /channels/{channelId}/bots | チャンネル参加中のBOTのリストを取得 +[**GetChannelEvents**](ChannelAPI.md#GetChannelEvents) | **Get** /channels/{channelId}/events | チャンネルイベントのリストを取得 +[**GetChannelPath**](ChannelAPI.md#GetChannelPath) | **Get** /channels/{channelId}/path | 指定したチャンネルパスを取得 +[**GetChannelPins**](ChannelAPI.md#GetChannelPins) | **Get** /channels/{channelId}/pins | チャンネルピンのリストを取得 +[**GetChannelStats**](ChannelAPI.md#GetChannelStats) | **Get** /channels/{channelId}/stats | チャンネル統計情報を取得 +[**GetChannelSubscribers**](ChannelAPI.md#GetChannelSubscribers) | **Get** /channels/{channelId}/subscribers | チャンネルの通知購読者のリストを取得 +[**GetChannelTopic**](ChannelAPI.md#GetChannelTopic) | **Get** /channels/{channelId}/topic | チャンネルトピックを取得 +[**GetChannelViewers**](ChannelAPI.md#GetChannelViewers) | **Get** /channels/{channelId}/viewers | チャンネル閲覧者リストを取得 +[**GetChannels**](ChannelAPI.md#GetChannels) | **Get** /channels | チャンネルリストを取得 +[**GetMessages**](ChannelAPI.md#GetMessages) | **Get** /channels/{channelId}/messages | チャンネルメッセージのリストを取得 +[**GetUserDMChannel**](ChannelAPI.md#GetUserDMChannel) | **Get** /users/{userId}/dm-channel | DMチャンネル情報を取得 +[**PostMessage**](ChannelAPI.md#PostMessage) | **Post** /channels/{channelId}/messages | チャンネルにメッセージを投稿 +[**SetChannelSubscribers**](ChannelAPI.md#SetChannelSubscribers) | **Put** /channels/{channelId}/subscribers | チャンネルの通知購読者を設定 @@ -39,24 +39,24 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postChannelRequest := *traq.NewPostChannelRequest("Name_example", "Parent_example") // PostChannelRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ChannelApi.CreateChannel(context.Background()).PostChannelRequest(postChannelRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.CreateChannel``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateChannel`: Channel - fmt.Fprintf(os.Stdout, "Response from `ChannelApi.CreateChannel`: %v\n", resp) + postChannelRequest := *traq.NewPostChannelRequest("Name_example", "Parent_example") // PostChannelRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ChannelAPI.CreateChannel(context.Background()).PostChannelRequest(postChannelRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.CreateChannel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateChannel`: Channel + fmt.Fprintf(os.Stdout, "Response from `ChannelAPI.CreateChannel`: %v\n", resp) } ``` @@ -105,23 +105,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - patchChannelRequest := *traq.NewPatchChannelRequest() // PatchChannelRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.ChannelApi.EditChannel(context.Background(), channelId).PatchChannelRequest(patchChannelRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.EditChannel``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + patchChannelRequest := *traq.NewPatchChannelRequest() // PatchChannelRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.ChannelAPI.EditChannel(context.Background(), channelId).PatchChannelRequest(patchChannelRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.EditChannel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -175,23 +175,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - patchChannelSubscribersRequest := *traq.NewPatchChannelSubscribersRequest() // PatchChannelSubscribersRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.ChannelApi.EditChannelSubscribers(context.Background(), channelId).PatchChannelSubscribersRequest(patchChannelSubscribersRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.EditChannelSubscribers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + patchChannelSubscribersRequest := *traq.NewPatchChannelSubscribersRequest() // PatchChannelSubscribersRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.ChannelAPI.EditChannelSubscribers(context.Background(), channelId).PatchChannelSubscribersRequest(patchChannelSubscribersRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.EditChannelSubscribers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -245,23 +245,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - putChannelTopicRequest := *traq.NewPutChannelTopicRequest("Topic_example") // PutChannelTopicRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.ChannelApi.EditChannelTopic(context.Background(), channelId).PutChannelTopicRequest(putChannelTopicRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.EditChannelTopic``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + putChannelTopicRequest := *traq.NewPutChannelTopicRequest("Topic_example") // PutChannelTopicRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.ChannelAPI.EditChannelTopic(context.Background(), channelId).PutChannelTopicRequest(putChannelTopicRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.EditChannelTopic``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -315,24 +315,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ChannelApi.GetChannel(context.Background(), channelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.GetChannel``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetChannel`: Channel - fmt.Fprintf(os.Stdout, "Response from `ChannelApi.GetChannel`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ChannelAPI.GetChannel(context.Background(), channelId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.GetChannel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetChannel`: Channel + fmt.Fprintf(os.Stdout, "Response from `ChannelAPI.GetChannel`: %v\n", resp) } ``` @@ -385,24 +385,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ChannelApi.GetChannelBots(context.Background(), channelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.GetChannelBots``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetChannelBots`: []BotUser - fmt.Fprintf(os.Stdout, "Response from `ChannelApi.GetChannelBots`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ChannelAPI.GetChannelBots(context.Background(), channelId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.GetChannelBots``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetChannelBots`: []BotUser + fmt.Fprintf(os.Stdout, "Response from `ChannelAPI.GetChannelBots`: %v\n", resp) } ``` @@ -455,31 +455,31 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" + "context" + "fmt" + "os" "time" - traq "github.com/traPtitech/go-traq" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - limit := int32(50) // int32 | 取得する件数 (optional) - offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) - since := time.Now() // time.Time | 取得する時間範囲の開始日時 (optional) (default to "0000-01-01T00:00Z") - until := time.Now() // time.Time | 取得する時間範囲の終了日時 (optional) - inclusive := true // bool | 範囲の端を含めるかどうか (optional) (default to false) - order := "order_example" // string | 昇順か降順か (optional) (default to "desc") - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ChannelApi.GetChannelEvents(context.Background(), channelId).Limit(limit).Offset(offset).Since(since).Until(until).Inclusive(inclusive).Order(order).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.GetChannelEvents``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetChannelEvents`: []ChannelEvent - fmt.Fprintf(os.Stdout, "Response from `ChannelApi.GetChannelEvents`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + limit := int32(50) // int32 | 取得する件数 (optional) + offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) + since := time.Now() // time.Time | 取得する時間範囲の開始日時 (optional) (default to "0000-01-01T00:00Z") + until := time.Now() // time.Time | 取得する時間範囲の終了日時 (optional) + inclusive := true // bool | 範囲の端を含めるかどうか (optional) (default to false) + order := "order_example" // string | 昇順か降順か (optional) (default to "desc") + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ChannelAPI.GetChannelEvents(context.Background(), channelId).Limit(limit).Offset(offset).Since(since).Until(until).Inclusive(inclusive).Order(order).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.GetChannelEvents``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetChannelEvents`: []ChannelEvent + fmt.Fprintf(os.Stdout, "Response from `ChannelAPI.GetChannelEvents`: %v\n", resp) } ``` @@ -536,24 +536,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ChannelApi.GetChannelPath(context.Background(), channelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.GetChannelPath``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetChannelPath`: ChannelPath - fmt.Fprintf(os.Stdout, "Response from `ChannelApi.GetChannelPath`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ChannelAPI.GetChannelPath(context.Background(), channelId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.GetChannelPath``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetChannelPath`: ChannelPath + fmt.Fprintf(os.Stdout, "Response from `ChannelAPI.GetChannelPath`: %v\n", resp) } ``` @@ -606,24 +606,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ChannelApi.GetChannelPins(context.Background(), channelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.GetChannelPins``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetChannelPins`: []Pin - fmt.Fprintf(os.Stdout, "Response from `ChannelApi.GetChannelPins`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ChannelAPI.GetChannelPins(context.Background(), channelId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.GetChannelPins``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetChannelPins`: []Pin + fmt.Fprintf(os.Stdout, "Response from `ChannelAPI.GetChannelPins`: %v\n", resp) } ``` @@ -676,25 +676,25 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - excludeDeletedMessages := true // bool | 削除されたメッセージを除外するかどうか(デフォルト false) (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ChannelApi.GetChannelStats(context.Background(), channelId).ExcludeDeletedMessages(excludeDeletedMessages).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.GetChannelStats``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetChannelStats`: ChannelStats - fmt.Fprintf(os.Stdout, "Response from `ChannelApi.GetChannelStats`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + excludeDeletedMessages := true // bool | 削除されたメッセージを除外するかどうか(デフォルト false) (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ChannelAPI.GetChannelStats(context.Background(), channelId).ExcludeDeletedMessages(excludeDeletedMessages).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.GetChannelStats``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetChannelStats`: ChannelStats + fmt.Fprintf(os.Stdout, "Response from `ChannelAPI.GetChannelStats`: %v\n", resp) } ``` @@ -748,24 +748,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ChannelApi.GetChannelSubscribers(context.Background(), channelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.GetChannelSubscribers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetChannelSubscribers`: []string - fmt.Fprintf(os.Stdout, "Response from `ChannelApi.GetChannelSubscribers`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ChannelAPI.GetChannelSubscribers(context.Background(), channelId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.GetChannelSubscribers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetChannelSubscribers`: []string + fmt.Fprintf(os.Stdout, "Response from `ChannelAPI.GetChannelSubscribers`: %v\n", resp) } ``` @@ -818,24 +818,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ChannelApi.GetChannelTopic(context.Background(), channelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.GetChannelTopic``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetChannelTopic`: ChannelTopic - fmt.Fprintf(os.Stdout, "Response from `ChannelApi.GetChannelTopic`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ChannelAPI.GetChannelTopic(context.Background(), channelId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.GetChannelTopic``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetChannelTopic`: ChannelTopic + fmt.Fprintf(os.Stdout, "Response from `ChannelAPI.GetChannelTopic`: %v\n", resp) } ``` @@ -888,24 +888,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ChannelApi.GetChannelViewers(context.Background(), channelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.GetChannelViewers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetChannelViewers`: []ChannelViewer - fmt.Fprintf(os.Stdout, "Response from `ChannelApi.GetChannelViewers`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ChannelAPI.GetChannelViewers(context.Background(), channelId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.GetChannelViewers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetChannelViewers`: []ChannelViewer + fmt.Fprintf(os.Stdout, "Response from `ChannelAPI.GetChannelViewers`: %v\n", resp) } ``` @@ -958,25 +958,25 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - includeDm := true // bool | ダイレクトメッセージチャンネルをレスポンスに含めるかどうか (optional) (default to false) - path := "path_example" // string | パスが一致するチャンネルのみを取得する (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ChannelApi.GetChannels(context.Background()).IncludeDm(includeDm).Path(path).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.GetChannels``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetChannels`: ChannelList - fmt.Fprintf(os.Stdout, "Response from `ChannelApi.GetChannels`: %v\n", resp) + includeDm := true // bool | ダイレクトメッセージチャンネルをレスポンスに含めるかどうか (optional) (default to false) + path := "path_example" // string | パスが一致するチャンネルのみを取得する (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ChannelAPI.GetChannels(context.Background()).IncludeDm(includeDm).Path(path).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.GetChannels``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetChannels`: ChannelList + fmt.Fprintf(os.Stdout, "Response from `ChannelAPI.GetChannels`: %v\n", resp) } ``` @@ -1026,31 +1026,31 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" + "context" + "fmt" + "os" "time" - traq "github.com/traPtitech/go-traq" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - limit := int32(50) // int32 | 取得する件数 (optional) - offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) - since := time.Now() // time.Time | 取得する時間範囲の開始日時 (optional) (default to "0000-01-01T00:00Z") - until := time.Now() // time.Time | 取得する時間範囲の終了日時 (optional) - inclusive := true // bool | 範囲の端を含めるかどうか (optional) (default to false) - order := "order_example" // string | 昇順か降順か (optional) (default to "desc") - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ChannelApi.GetMessages(context.Background(), channelId).Limit(limit).Offset(offset).Since(since).Until(until).Inclusive(inclusive).Order(order).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.GetMessages``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMessages`: []Message - fmt.Fprintf(os.Stdout, "Response from `ChannelApi.GetMessages`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + limit := int32(50) // int32 | 取得する件数 (optional) + offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) + since := time.Now() // time.Time | 取得する時間範囲の開始日時 (optional) (default to "0000-01-01T00:00Z") + until := time.Now() // time.Time | 取得する時間範囲の終了日時 (optional) + inclusive := true // bool | 範囲の端を含めるかどうか (optional) (default to false) + order := "order_example" // string | 昇順か降順か (optional) (default to "desc") + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ChannelAPI.GetMessages(context.Background(), channelId).Limit(limit).Offset(offset).Since(since).Until(until).Inclusive(inclusive).Order(order).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.GetMessages``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMessages`: []Message + fmt.Fprintf(os.Stdout, "Response from `ChannelAPI.GetMessages`: %v\n", resp) } ``` @@ -1109,24 +1109,24 @@ DMチャンネル情報を取得 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ChannelApi.GetUserDMChannel(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.GetUserDMChannel``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserDMChannel`: DMChannel - fmt.Fprintf(os.Stdout, "Response from `ChannelApi.GetUserDMChannel`: %v\n", resp) + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ChannelAPI.GetUserDMChannel(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.GetUserDMChannel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserDMChannel`: DMChannel + fmt.Fprintf(os.Stdout, "Response from `ChannelAPI.GetUserDMChannel`: %v\n", resp) } ``` @@ -1179,25 +1179,25 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - postMessageRequest := *traq.NewPostMessageRequest("Content_example") // PostMessageRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ChannelApi.PostMessage(context.Background(), channelId).PostMessageRequest(postMessageRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.PostMessage``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PostMessage`: Message - fmt.Fprintf(os.Stdout, "Response from `ChannelApi.PostMessage`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + postMessageRequest := *traq.NewPostMessageRequest("Content_example") // PostMessageRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ChannelAPI.PostMessage(context.Background(), channelId).PostMessageRequest(postMessageRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.PostMessage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PostMessage`: Message + fmt.Fprintf(os.Stdout, "Response from `ChannelAPI.PostMessage`: %v\n", resp) } ``` @@ -1251,23 +1251,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - putChannelSubscribersRequest := *traq.NewPutChannelSubscribersRequest([]string{"On_example"}) // PutChannelSubscribersRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.ChannelApi.SetChannelSubscribers(context.Background(), channelId).PutChannelSubscribersRequest(putChannelSubscribersRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChannelApi.SetChannelSubscribers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + putChannelSubscribersRequest := *traq.NewPutChannelSubscribersRequest([]string{"On_example"}) // PutChannelSubscribersRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.ChannelAPI.SetChannelSubscribers(context.Background(), channelId).PutChannelSubscribersRequest(putChannelSubscribersRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChannelAPI.SetChannelSubscribers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` diff --git a/docs/ClipApi.md b/docs/ClipAPI.md similarity index 61% rename from docs/ClipApi.md rename to docs/ClipAPI.md index 653ef0b..3223061 100644 --- a/docs/ClipApi.md +++ b/docs/ClipAPI.md @@ -1,18 +1,18 @@ -# \ClipApi +# \ClipAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ClipMessage**](ClipApi.md#ClipMessage) | **Post** /clip-folders/{folderId}/messages | メッセージをクリップフォルダに追加 -[**CreateClipFolder**](ClipApi.md#CreateClipFolder) | **Post** /clip-folders | クリップフォルダを作成 -[**DeleteClipFolder**](ClipApi.md#DeleteClipFolder) | **Delete** /clip-folders/{folderId} | クリップフォルダを削除 -[**EditClipFolder**](ClipApi.md#EditClipFolder) | **Patch** /clip-folders/{folderId} | クリップフォルダ情報を編集 -[**GetClipFolder**](ClipApi.md#GetClipFolder) | **Get** /clip-folders/{folderId} | クリップフォルダ情報を取得 -[**GetClipFolders**](ClipApi.md#GetClipFolders) | **Get** /clip-folders | クリップフォルダのリストを取得 -[**GetClips**](ClipApi.md#GetClips) | **Get** /clip-folders/{folderId}/messages | フォルダ内のクリップのリストを取得 -[**GetMessageClips**](ClipApi.md#GetMessageClips) | **Get** /messages/{messageId}/clips | 自分のクリップを取得 -[**UnclipMessage**](ClipApi.md#UnclipMessage) | **Delete** /clip-folders/{folderId}/messages/{messageId} | メッセージをクリップフォルダから除外 +[**ClipMessage**](ClipAPI.md#ClipMessage) | **Post** /clip-folders/{folderId}/messages | メッセージをクリップフォルダに追加 +[**CreateClipFolder**](ClipAPI.md#CreateClipFolder) | **Post** /clip-folders | クリップフォルダを作成 +[**DeleteClipFolder**](ClipAPI.md#DeleteClipFolder) | **Delete** /clip-folders/{folderId} | クリップフォルダを削除 +[**EditClipFolder**](ClipAPI.md#EditClipFolder) | **Patch** /clip-folders/{folderId} | クリップフォルダ情報を編集 +[**GetClipFolder**](ClipAPI.md#GetClipFolder) | **Get** /clip-folders/{folderId} | クリップフォルダ情報を取得 +[**GetClipFolders**](ClipAPI.md#GetClipFolders) | **Get** /clip-folders | クリップフォルダのリストを取得 +[**GetClips**](ClipAPI.md#GetClips) | **Get** /clip-folders/{folderId}/messages | フォルダ内のクリップのリストを取得 +[**GetMessageClips**](ClipAPI.md#GetMessageClips) | **Get** /messages/{messageId}/clips | 自分のクリップを取得 +[**UnclipMessage**](ClipAPI.md#UnclipMessage) | **Delete** /clip-folders/{folderId}/messages/{messageId} | メッセージをクリップフォルダから除外 @@ -30,25 +30,25 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - folderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | クリップフォルダUUID - postClipFolderMessageRequest := *traq.NewPostClipFolderMessageRequest("MessageId_example") // PostClipFolderMessageRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ClipApi.ClipMessage(context.Background(), folderId).PostClipFolderMessageRequest(postClipFolderMessageRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ClipApi.ClipMessage``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ClipMessage`: ClippedMessage - fmt.Fprintf(os.Stdout, "Response from `ClipApi.ClipMessage`: %v\n", resp) + folderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | クリップフォルダUUID + postClipFolderMessageRequest := *traq.NewPostClipFolderMessageRequest("MessageId_example") // PostClipFolderMessageRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ClipAPI.ClipMessage(context.Background(), folderId).PostClipFolderMessageRequest(postClipFolderMessageRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ClipAPI.ClipMessage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ClipMessage`: ClippedMessage + fmt.Fprintf(os.Stdout, "Response from `ClipAPI.ClipMessage`: %v\n", resp) } ``` @@ -102,24 +102,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postClipFolderRequest := *traq.NewPostClipFolderRequest("Name_example", "Description_example") // PostClipFolderRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ClipApi.CreateClipFolder(context.Background()).PostClipFolderRequest(postClipFolderRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ClipApi.CreateClipFolder``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateClipFolder`: ClipFolder - fmt.Fprintf(os.Stdout, "Response from `ClipApi.CreateClipFolder`: %v\n", resp) + postClipFolderRequest := *traq.NewPostClipFolderRequest("Name_example", "Description_example") // PostClipFolderRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ClipAPI.CreateClipFolder(context.Background()).PostClipFolderRequest(postClipFolderRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ClipAPI.CreateClipFolder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateClipFolder`: ClipFolder + fmt.Fprintf(os.Stdout, "Response from `ClipAPI.CreateClipFolder`: %v\n", resp) } ``` @@ -168,22 +168,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - folderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | クリップフォルダUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.ClipApi.DeleteClipFolder(context.Background(), folderId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ClipApi.DeleteClipFolder``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + folderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | クリップフォルダUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.ClipAPI.DeleteClipFolder(context.Background(), folderId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ClipAPI.DeleteClipFolder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -236,23 +236,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - folderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | クリップフォルダUUID - patchClipFolderRequest := *traq.NewPatchClipFolderRequest() // PatchClipFolderRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.ClipApi.EditClipFolder(context.Background(), folderId).PatchClipFolderRequest(patchClipFolderRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ClipApi.EditClipFolder``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + folderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | クリップフォルダUUID + patchClipFolderRequest := *traq.NewPatchClipFolderRequest() // PatchClipFolderRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.ClipAPI.EditClipFolder(context.Background(), folderId).PatchClipFolderRequest(patchClipFolderRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ClipAPI.EditClipFolder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -306,24 +306,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - folderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | クリップフォルダUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ClipApi.GetClipFolder(context.Background(), folderId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ClipApi.GetClipFolder``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetClipFolder`: ClipFolder - fmt.Fprintf(os.Stdout, "Response from `ClipApi.GetClipFolder`: %v\n", resp) + folderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | クリップフォルダUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ClipAPI.GetClipFolder(context.Background(), folderId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ClipAPI.GetClipFolder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetClipFolder`: ClipFolder + fmt.Fprintf(os.Stdout, "Response from `ClipAPI.GetClipFolder`: %v\n", resp) } ``` @@ -376,23 +376,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ClipApi.GetClipFolders(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ClipApi.GetClipFolders``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetClipFolders`: []ClipFolder - fmt.Fprintf(os.Stdout, "Response from `ClipApi.GetClipFolders`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ClipAPI.GetClipFolders(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ClipAPI.GetClipFolders``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetClipFolders`: []ClipFolder + fmt.Fprintf(os.Stdout, "Response from `ClipAPI.GetClipFolders`: %v\n", resp) } ``` @@ -437,27 +437,27 @@ Other parameters are passed through a pointer to a apiGetClipFoldersRequest stru package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - folderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | クリップフォルダUUID - limit := int32(50) // int32 | 取得する件数 (optional) - offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) - order := "order_example" // string | 昇順か降順か (optional) (default to "desc") - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ClipApi.GetClips(context.Background(), folderId).Limit(limit).Offset(offset).Order(order).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ClipApi.GetClips``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetClips`: []ClippedMessage - fmt.Fprintf(os.Stdout, "Response from `ClipApi.GetClips`: %v\n", resp) + folderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | クリップフォルダUUID + limit := int32(50) // int32 | 取得する件数 (optional) + offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) + order := "order_example" // string | 昇順か降順か (optional) (default to "desc") + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ClipAPI.GetClips(context.Background(), folderId).Limit(limit).Offset(offset).Order(order).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ClipAPI.GetClips``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetClips`: []ClippedMessage + fmt.Fprintf(os.Stdout, "Response from `ClipAPI.GetClips`: %v\n", resp) } ``` @@ -513,24 +513,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.ClipApi.GetMessageClips(context.Background(), messageId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ClipApi.GetMessageClips``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMessageClips`: []MessageClip - fmt.Fprintf(os.Stdout, "Response from `ClipApi.GetMessageClips`: %v\n", resp) + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.ClipAPI.GetMessageClips(context.Background(), messageId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ClipAPI.GetMessageClips``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMessageClips`: []MessageClip + fmt.Fprintf(os.Stdout, "Response from `ClipAPI.GetMessageClips`: %v\n", resp) } ``` @@ -583,23 +583,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - folderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | クリップフォルダUUID - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.ClipApi.UnclipMessage(context.Background(), folderId, messageId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ClipApi.UnclipMessage``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + folderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | クリップフォルダUUID + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.ClipAPI.UnclipMessage(context.Background(), folderId, messageId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ClipAPI.UnclipMessage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` diff --git a/docs/FileApi.md b/docs/FileAPI.md similarity index 58% rename from docs/FileApi.md rename to docs/FileAPI.md index 4c66890..4ae49d4 100644 --- a/docs/FileApi.md +++ b/docs/FileAPI.md @@ -1,15 +1,15 @@ -# \FileApi +# \FileAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DeleteFile**](FileApi.md#DeleteFile) | **Delete** /files/{fileId} | ファイルを削除 -[**GetFile**](FileApi.md#GetFile) | **Get** /files/{fileId} | ファイルをダウンロード -[**GetFileMeta**](FileApi.md#GetFileMeta) | **Get** /files/{fileId}/meta | ファイルメタを取得 -[**GetFiles**](FileApi.md#GetFiles) | **Get** /files | ファイルメタのリストを取得 -[**GetThumbnailImage**](FileApi.md#GetThumbnailImage) | **Get** /files/{fileId}/thumbnail | サムネイル画像を取得 -[**PostFile**](FileApi.md#PostFile) | **Post** /files | ファイルをアップロード +[**DeleteFile**](FileAPI.md#DeleteFile) | **Delete** /files/{fileId} | ファイルを削除 +[**GetFile**](FileAPI.md#GetFile) | **Get** /files/{fileId} | ファイルをダウンロード +[**GetFileMeta**](FileAPI.md#GetFileMeta) | **Get** /files/{fileId}/meta | ファイルメタを取得 +[**GetFiles**](FileAPI.md#GetFiles) | **Get** /files | ファイルメタのリストを取得 +[**GetThumbnailImage**](FileAPI.md#GetThumbnailImage) | **Get** /files/{fileId}/thumbnail | サムネイル画像を取得 +[**PostFile**](FileAPI.md#PostFile) | **Post** /files | ファイルをアップロード @@ -27,22 +27,22 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - fileId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ファイルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.FileApi.DeleteFile(context.Background(), fileId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FileApi.DeleteFile``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + fileId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ファイルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.FileAPI.DeleteFile(context.Background(), fileId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FileAPI.DeleteFile``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -95,25 +95,25 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - fileId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ファイルUUID - dl := int32(56) // int32 | 1を指定するとレスポンスにContent-Dispositionヘッダーが付与されます (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.FileApi.GetFile(context.Background(), fileId).Dl(dl).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FileApi.GetFile``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetFile`: *os.File - fmt.Fprintf(os.Stdout, "Response from `FileApi.GetFile`: %v\n", resp) + fileId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ファイルUUID + dl := int32(56) // int32 | 1を指定するとレスポンスにContent-Dispositionヘッダーが付与されます (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.FileAPI.GetFile(context.Background(), fileId).Dl(dl).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FileAPI.GetFile``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetFile`: *os.File + fmt.Fprintf(os.Stdout, "Response from `FileAPI.GetFile`: %v\n", resp) } ``` @@ -167,24 +167,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - fileId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ファイルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.FileApi.GetFileMeta(context.Background(), fileId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FileApi.GetFileMeta``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetFileMeta`: FileInfo - fmt.Fprintf(os.Stdout, "Response from `FileApi.GetFileMeta`: %v\n", resp) + fileId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ファイルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.FileAPI.GetFileMeta(context.Background(), fileId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FileAPI.GetFileMeta``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetFileMeta`: FileInfo + fmt.Fprintf(os.Stdout, "Response from `FileAPI.GetFileMeta`: %v\n", resp) } ``` @@ -237,32 +237,32 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" + "context" + "fmt" + "os" "time" - traq "github.com/traPtitech/go-traq" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | アップロード先チャンネルUUID (optional) - limit := int32(50) // int32 | 取得する件数 (optional) - offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) - since := time.Now() // time.Time | 取得する時間範囲の開始日時 (optional) (default to "0000-01-01T00:00Z") - until := time.Now() // time.Time | 取得する時間範囲の終了日時 (optional) - inclusive := true // bool | 範囲の端を含めるかどうか (optional) (default to false) - order := "order_example" // string | 昇順か降順か (optional) (default to "desc") - mine := true // bool | アップロード者が自分のファイルのみを取得するか (optional) (default to false) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.FileApi.GetFiles(context.Background()).ChannelId(channelId).Limit(limit).Offset(offset).Since(since).Until(until).Inclusive(inclusive).Order(order).Mine(mine).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FileApi.GetFiles``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetFiles`: []FileInfo - fmt.Fprintf(os.Stdout, "Response from `FileApi.GetFiles`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | アップロード先チャンネルUUID (optional) + limit := int32(50) // int32 | 取得する件数 (optional) + offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) + since := time.Now() // time.Time | 取得する時間範囲の開始日時 (optional) (default to "0000-01-01T00:00Z") + until := time.Now() // time.Time | 取得する時間範囲の終了日時 (optional) + inclusive := true // bool | 範囲の端を含めるかどうか (optional) (default to false) + order := "order_example" // string | 昇順か降順か (optional) (default to "desc") + mine := true // bool | アップロード者が自分のファイルのみを取得するか (optional) (default to false) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.FileAPI.GetFiles(context.Background()).ChannelId(channelId).Limit(limit).Offset(offset).Since(since).Until(until).Inclusive(inclusive).Order(order).Mine(mine).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FileAPI.GetFiles``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetFiles`: []FileInfo + fmt.Fprintf(os.Stdout, "Response from `FileAPI.GetFiles`: %v\n", resp) } ``` @@ -318,25 +318,25 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - fileId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ファイルUUID - type_ := traq.ThumbnailType("image") // ThumbnailType | 取得するサムネイルのタイプ (optional) (default to "image") - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.FileApi.GetThumbnailImage(context.Background(), fileId).Type_(type_).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FileApi.GetThumbnailImage``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetThumbnailImage`: *os.File - fmt.Fprintf(os.Stdout, "Response from `FileApi.GetThumbnailImage`: %v\n", resp) + fileId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ファイルUUID + type_ := traq.ThumbnailType("image") // ThumbnailType | 取得するサムネイルのタイプ (optional) (default to "image") + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.FileAPI.GetThumbnailImage(context.Background(), fileId).Type_(type_).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FileAPI.GetThumbnailImage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetThumbnailImage`: *os.File + fmt.Fprintf(os.Stdout, "Response from `FileAPI.GetThumbnailImage`: %v\n", resp) } ``` @@ -390,25 +390,25 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - file := os.NewFile(1234, "some_file") // *os.File | ファイル本体 - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | アップロード先チャンネルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.FileApi.PostFile(context.Background()).File(file).ChannelId(channelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FileApi.PostFile``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PostFile`: FileInfo - fmt.Fprintf(os.Stdout, "Response from `FileApi.PostFile`: %v\n", resp) + file := os.NewFile(1234, "some_file") // *os.File | ファイル本体 + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | アップロード先チャンネルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.FileAPI.PostFile(context.Background()).File(file).ChannelId(channelId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FileAPI.PostFile``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PostFile`: FileInfo + fmt.Fprintf(os.Stdout, "Response from `FileAPI.PostFile`: %v\n", resp) } ``` diff --git a/docs/GroupApi.md b/docs/GroupAPI.md similarity index 62% rename from docs/GroupApi.md rename to docs/GroupAPI.md index 27d4a41..2f6edf7 100644 --- a/docs/GroupApi.md +++ b/docs/GroupAPI.md @@ -1,23 +1,23 @@ -# \GroupApi +# \GroupAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AddUserGroupAdmin**](GroupApi.md#AddUserGroupAdmin) | **Post** /groups/{groupId}/admins | グループ管理者を追加 -[**AddUserGroupMember**](GroupApi.md#AddUserGroupMember) | **Post** /groups/{groupId}/members | グループメンバーを追加 -[**ChangeUserGroupIcon**](GroupApi.md#ChangeUserGroupIcon) | **Put** /groups/{groupId}/icon | ユーザーグループのアイコンを変更 -[**CreateUserGroup**](GroupApi.md#CreateUserGroup) | **Post** /groups | ユーザーグループを作成 -[**DeleteUserGroup**](GroupApi.md#DeleteUserGroup) | **Delete** /groups/{groupId} | ユーザーグループを削除 -[**EditUserGroup**](GroupApi.md#EditUserGroup) | **Patch** /groups/{groupId} | ユーザーグループを編集 -[**EditUserGroupMember**](GroupApi.md#EditUserGroupMember) | **Patch** /groups/{groupId}/members/{userId} | グループメンバーを編集 -[**GetUserGroup**](GroupApi.md#GetUserGroup) | **Get** /groups/{groupId} | ユーザーグループを取得 -[**GetUserGroupAdmins**](GroupApi.md#GetUserGroupAdmins) | **Get** /groups/{groupId}/admins | グループ管理者を取得 -[**GetUserGroupMembers**](GroupApi.md#GetUserGroupMembers) | **Get** /groups/{groupId}/members | グループメンバーを取得 -[**GetUserGroups**](GroupApi.md#GetUserGroups) | **Get** /groups | ユーザーグループのリストを取得 -[**RemoveUserGroupAdmin**](GroupApi.md#RemoveUserGroupAdmin) | **Delete** /groups/{groupId}/admins/{userId} | グループ管理者を削除 -[**RemoveUserGroupMember**](GroupApi.md#RemoveUserGroupMember) | **Delete** /groups/{groupId}/members/{userId} | グループメンバーを削除 -[**RemoveUserGroupMembers**](GroupApi.md#RemoveUserGroupMembers) | **Delete** /groups/{groupId}/members | グループメンバーを一括削除 +[**AddUserGroupAdmin**](GroupAPI.md#AddUserGroupAdmin) | **Post** /groups/{groupId}/admins | グループ管理者を追加 +[**AddUserGroupMember**](GroupAPI.md#AddUserGroupMember) | **Post** /groups/{groupId}/members | グループメンバーを追加 +[**ChangeUserGroupIcon**](GroupAPI.md#ChangeUserGroupIcon) | **Put** /groups/{groupId}/icon | ユーザーグループのアイコンを変更 +[**CreateUserGroup**](GroupAPI.md#CreateUserGroup) | **Post** /groups | ユーザーグループを作成 +[**DeleteUserGroup**](GroupAPI.md#DeleteUserGroup) | **Delete** /groups/{groupId} | ユーザーグループを削除 +[**EditUserGroup**](GroupAPI.md#EditUserGroup) | **Patch** /groups/{groupId} | ユーザーグループを編集 +[**EditUserGroupMember**](GroupAPI.md#EditUserGroupMember) | **Patch** /groups/{groupId}/members/{userId} | グループメンバーを編集 +[**GetUserGroup**](GroupAPI.md#GetUserGroup) | **Get** /groups/{groupId} | ユーザーグループを取得 +[**GetUserGroupAdmins**](GroupAPI.md#GetUserGroupAdmins) | **Get** /groups/{groupId}/admins | グループ管理者を取得 +[**GetUserGroupMembers**](GroupAPI.md#GetUserGroupMembers) | **Get** /groups/{groupId}/members | グループメンバーを取得 +[**GetUserGroups**](GroupAPI.md#GetUserGroups) | **Get** /groups | ユーザーグループのリストを取得 +[**RemoveUserGroupAdmin**](GroupAPI.md#RemoveUserGroupAdmin) | **Delete** /groups/{groupId}/admins/{userId} | グループ管理者を削除 +[**RemoveUserGroupMember**](GroupAPI.md#RemoveUserGroupMember) | **Delete** /groups/{groupId}/members/{userId} | グループメンバーを削除 +[**RemoveUserGroupMembers**](GroupAPI.md#RemoveUserGroupMembers) | **Delete** /groups/{groupId}/members | グループメンバーを一括削除 @@ -35,23 +35,23 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID - postUserGroupAdminRequest := *traq.NewPostUserGroupAdminRequest("Id_example") // PostUserGroupAdminRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.GroupApi.AddUserGroupAdmin(context.Background(), groupId).PostUserGroupAdminRequest(postUserGroupAdminRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.AddUserGroupAdmin``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID + postUserGroupAdminRequest := *traq.NewPostUserGroupAdminRequest("Id_example") // PostUserGroupAdminRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.GroupAPI.AddUserGroupAdmin(context.Background(), groupId).PostUserGroupAdminRequest(postUserGroupAdminRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupAPI.AddUserGroupAdmin``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -105,23 +105,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID - addUserGroupMemberRequest := traq.addUserGroupMember_request{UserGroupMember: traq.NewUserGroupMember("Id_example", "Role_example")} // AddUserGroupMemberRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.GroupApi.AddUserGroupMember(context.Background(), groupId).AddUserGroupMemberRequest(addUserGroupMemberRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.AddUserGroupMember``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID + addUserGroupMemberRequest := traq.addUserGroupMember_request{UserGroupMember: traq.NewUserGroupMember("Id_example", "Role_example")} // AddUserGroupMemberRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.GroupAPI.AddUserGroupMember(context.Background(), groupId).AddUserGroupMemberRequest(addUserGroupMemberRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupAPI.AddUserGroupMember``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -175,23 +175,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID - file := os.NewFile(1234, "some_file") // *os.File | アイコン画像(2MBまでのpng, jpeg, gif) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.GroupApi.ChangeUserGroupIcon(context.Background(), groupId).File(file).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.ChangeUserGroupIcon``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID + file := os.NewFile(1234, "some_file") // *os.File | アイコン画像(2MBまでのpng, jpeg, gif) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.GroupAPI.ChangeUserGroupIcon(context.Background(), groupId).File(file).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupAPI.ChangeUserGroupIcon``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -245,24 +245,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postUserGroupRequest := *traq.NewPostUserGroupRequest("Name_example", "Description_example", "Type_example") // PostUserGroupRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.GroupApi.CreateUserGroup(context.Background()).PostUserGroupRequest(postUserGroupRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.CreateUserGroup``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateUserGroup`: UserGroup - fmt.Fprintf(os.Stdout, "Response from `GroupApi.CreateUserGroup`: %v\n", resp) + postUserGroupRequest := *traq.NewPostUserGroupRequest("Name_example", "Description_example", "Type_example") // PostUserGroupRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.GroupAPI.CreateUserGroup(context.Background()).PostUserGroupRequest(postUserGroupRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupAPI.CreateUserGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateUserGroup`: UserGroup + fmt.Fprintf(os.Stdout, "Response from `GroupAPI.CreateUserGroup`: %v\n", resp) } ``` @@ -311,22 +311,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.GroupApi.DeleteUserGroup(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.DeleteUserGroup``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.GroupAPI.DeleteUserGroup(context.Background(), groupId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupAPI.DeleteUserGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -379,23 +379,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID - patchUserGroupRequest := *traq.NewPatchUserGroupRequest() // PatchUserGroupRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.GroupApi.EditUserGroup(context.Background(), groupId).PatchUserGroupRequest(patchUserGroupRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.EditUserGroup``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID + patchUserGroupRequest := *traq.NewPatchUserGroupRequest() // PatchUserGroupRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.GroupAPI.EditUserGroup(context.Background(), groupId).PatchUserGroupRequest(patchUserGroupRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupAPI.EditUserGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -449,24 +449,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - patchGroupMemberRequest := *traq.NewPatchGroupMemberRequest("Role_example") // PatchGroupMemberRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.GroupApi.EditUserGroupMember(context.Background(), groupId, userId).PatchGroupMemberRequest(patchGroupMemberRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.EditUserGroupMember``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + patchGroupMemberRequest := *traq.NewPatchGroupMemberRequest("Role_example") // PatchGroupMemberRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.GroupAPI.EditUserGroupMember(context.Background(), groupId, userId).PatchGroupMemberRequest(patchGroupMemberRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupAPI.EditUserGroupMember``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -522,24 +522,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.GroupApi.GetUserGroup(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.GetUserGroup``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserGroup`: UserGroup - fmt.Fprintf(os.Stdout, "Response from `GroupApi.GetUserGroup`: %v\n", resp) + groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.GroupAPI.GetUserGroup(context.Background(), groupId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupAPI.GetUserGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserGroup`: UserGroup + fmt.Fprintf(os.Stdout, "Response from `GroupAPI.GetUserGroup`: %v\n", resp) } ``` @@ -592,24 +592,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.GroupApi.GetUserGroupAdmins(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.GetUserGroupAdmins``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserGroupAdmins`: []string - fmt.Fprintf(os.Stdout, "Response from `GroupApi.GetUserGroupAdmins`: %v\n", resp) + groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.GroupAPI.GetUserGroupAdmins(context.Background(), groupId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupAPI.GetUserGroupAdmins``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserGroupAdmins`: []string + fmt.Fprintf(os.Stdout, "Response from `GroupAPI.GetUserGroupAdmins`: %v\n", resp) } ``` @@ -662,24 +662,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.GroupApi.GetUserGroupMembers(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.GetUserGroupMembers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserGroupMembers`: []UserGroupMember - fmt.Fprintf(os.Stdout, "Response from `GroupApi.GetUserGroupMembers`: %v\n", resp) + groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.GroupAPI.GetUserGroupMembers(context.Background(), groupId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupAPI.GetUserGroupMembers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserGroupMembers`: []UserGroupMember + fmt.Fprintf(os.Stdout, "Response from `GroupAPI.GetUserGroupMembers`: %v\n", resp) } ``` @@ -732,23 +732,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.GroupApi.GetUserGroups(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.GetUserGroups``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserGroups`: []UserGroup - fmt.Fprintf(os.Stdout, "Response from `GroupApi.GetUserGroups`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.GroupAPI.GetUserGroups(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupAPI.GetUserGroups``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserGroups`: []UserGroup + fmt.Fprintf(os.Stdout, "Response from `GroupAPI.GetUserGroups`: %v\n", resp) } ``` @@ -793,23 +793,23 @@ Other parameters are passed through a pointer to a apiGetUserGroupsRequest struc package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.GroupApi.RemoveUserGroupAdmin(context.Background(), groupId, userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.RemoveUserGroupAdmin``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.GroupAPI.RemoveUserGroupAdmin(context.Background(), groupId, userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupAPI.RemoveUserGroupAdmin``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -864,23 +864,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.GroupApi.RemoveUserGroupMember(context.Background(), groupId, userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.RemoveUserGroupMember``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.GroupAPI.RemoveUserGroupMember(context.Background(), groupId, userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupAPI.RemoveUserGroupMember``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -935,22 +935,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.GroupApi.RemoveUserGroupMembers(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupApi.RemoveUserGroupMembers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーグループUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.GroupAPI.RemoveUserGroupMembers(context.Background(), groupId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupAPI.RemoveUserGroupMembers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` diff --git a/docs/MeApi.md b/docs/MeAPI.md similarity index 60% rename from docs/MeApi.md rename to docs/MeAPI.md index 03bb04e..9b916bb 100644 --- a/docs/MeApi.md +++ b/docs/MeAPI.md @@ -1,40 +1,40 @@ -# \MeApi +# \MeAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AddMyStar**](MeApi.md#AddMyStar) | **Post** /users/me/stars | チャンネルをスターに追加 -[**AddMyUserTag**](MeApi.md#AddMyUserTag) | **Post** /users/me/tags | 自分にタグを追加 -[**ChangeMyIcon**](MeApi.md#ChangeMyIcon) | **Put** /users/me/icon | 自分のアイコン画像を変更 -[**ChangeMyNotifyCitation**](MeApi.md#ChangeMyNotifyCitation) | **Put** /users/me/settings/notify-citation | メッセージ引用通知の設定情報を変更 -[**ChangeMyPassword**](MeApi.md#ChangeMyPassword) | **Put** /users/me/password | 自分のパスワードを変更 -[**EditMe**](MeApi.md#EditMe) | **Patch** /users/me | 自分のユーザー情報を変更 -[**EditMyUserTag**](MeApi.md#EditMyUserTag) | **Patch** /users/me/tags/{tagId} | 自分のタグを編集 -[**GetMe**](MeApi.md#GetMe) | **Get** /users/me | 自分のユーザー詳細を取得 -[**GetMyChannelSubscriptions**](MeApi.md#GetMyChannelSubscriptions) | **Get** /users/me/subscriptions | 自分のチャンネル購読状態を取得 -[**GetMyExternalAccounts**](MeApi.md#GetMyExternalAccounts) | **Get** /users/me/ex-accounts | 外部ログインアカウント一覧を取得 -[**GetMyIcon**](MeApi.md#GetMyIcon) | **Get** /users/me/icon | 自分のアイコン画像を取得 -[**GetMyNotifyCitation**](MeApi.md#GetMyNotifyCitation) | **Get** /users/me/settings/notify-citation | メッセージ引用通知の設定情報を取得 -[**GetMyQRCode**](MeApi.md#GetMyQRCode) | **Get** /users/me/qr-code | QRコードを取得 -[**GetMySessions**](MeApi.md#GetMySessions) | **Get** /users/me/sessions | 自分のログインセッションリストを取得 -[**GetMyStampHistory**](MeApi.md#GetMyStampHistory) | **Get** /users/me/stamp-history | スタンプ履歴を取得 -[**GetMyStars**](MeApi.md#GetMyStars) | **Get** /users/me/stars | スターチャンネルリストを取得 -[**GetMyTokens**](MeApi.md#GetMyTokens) | **Get** /users/me/tokens | 有効トークンのリストを取得 -[**GetMyUnreadChannels**](MeApi.md#GetMyUnreadChannels) | **Get** /users/me/unread | 未読チャンネルを取得 -[**GetMyUserTags**](MeApi.md#GetMyUserTags) | **Get** /users/me/tags | 自分のタグリストを取得 -[**GetMyViewStates**](MeApi.md#GetMyViewStates) | **Get** /users/me/view-states | 自身のチャンネル閲覧状態一覧を取得 -[**GetOIDCUserInfo**](MeApi.md#GetOIDCUserInfo) | **Get** /users/me/oidc | 自分のユーザー詳細を取得 (OIDC UserInfo) -[**GetUserSettings**](MeApi.md#GetUserSettings) | **Get** /users/me/settings | ユーザー設定を取得 -[**LinkExternalAccount**](MeApi.md#LinkExternalAccount) | **Post** /users/me/ex-accounts/link | 外部ログインアカウントを紐付ける -[**ReadChannel**](MeApi.md#ReadChannel) | **Delete** /users/me/unread/{channelId} | チャンネルを既読にする -[**RegisterFCMDevice**](MeApi.md#RegisterFCMDevice) | **Post** /users/me/fcm-device | FCMデバイスを登録 -[**RemoveMyStar**](MeApi.md#RemoveMyStar) | **Delete** /users/me/stars/{channelId} | チャンネルをスターから削除します -[**RemoveMyUserTag**](MeApi.md#RemoveMyUserTag) | **Delete** /users/me/tags/{tagId} | 自分からタグを削除します -[**RevokeMySession**](MeApi.md#RevokeMySession) | **Delete** /users/me/sessions/{sessionId} | セッションを無効化 -[**RevokeMyToken**](MeApi.md#RevokeMyToken) | **Delete** /users/me/tokens/{tokenId} | トークンの認可を取り消す -[**SetChannelSubscribeLevel**](MeApi.md#SetChannelSubscribeLevel) | **Put** /users/me/subscriptions/{channelId} | チャンネル購読レベルを設定 -[**UnlinkExternalAccount**](MeApi.md#UnlinkExternalAccount) | **Post** /users/me/ex-accounts/unlink | 外部ログインアカウントの紐付けを解除 +[**AddMyStar**](MeAPI.md#AddMyStar) | **Post** /users/me/stars | チャンネルをスターに追加 +[**AddMyUserTag**](MeAPI.md#AddMyUserTag) | **Post** /users/me/tags | 自分にタグを追加 +[**ChangeMyIcon**](MeAPI.md#ChangeMyIcon) | **Put** /users/me/icon | 自分のアイコン画像を変更 +[**ChangeMyNotifyCitation**](MeAPI.md#ChangeMyNotifyCitation) | **Put** /users/me/settings/notify-citation | メッセージ引用通知の設定情報を変更 +[**ChangeMyPassword**](MeAPI.md#ChangeMyPassword) | **Put** /users/me/password | 自分のパスワードを変更 +[**EditMe**](MeAPI.md#EditMe) | **Patch** /users/me | 自分のユーザー情報を変更 +[**EditMyUserTag**](MeAPI.md#EditMyUserTag) | **Patch** /users/me/tags/{tagId} | 自分のタグを編集 +[**GetMe**](MeAPI.md#GetMe) | **Get** /users/me | 自分のユーザー詳細を取得 +[**GetMyChannelSubscriptions**](MeAPI.md#GetMyChannelSubscriptions) | **Get** /users/me/subscriptions | 自分のチャンネル購読状態を取得 +[**GetMyExternalAccounts**](MeAPI.md#GetMyExternalAccounts) | **Get** /users/me/ex-accounts | 外部ログインアカウント一覧を取得 +[**GetMyIcon**](MeAPI.md#GetMyIcon) | **Get** /users/me/icon | 自分のアイコン画像を取得 +[**GetMyNotifyCitation**](MeAPI.md#GetMyNotifyCitation) | **Get** /users/me/settings/notify-citation | メッセージ引用通知の設定情報を取得 +[**GetMyQRCode**](MeAPI.md#GetMyQRCode) | **Get** /users/me/qr-code | QRコードを取得 +[**GetMySessions**](MeAPI.md#GetMySessions) | **Get** /users/me/sessions | 自分のログインセッションリストを取得 +[**GetMyStampHistory**](MeAPI.md#GetMyStampHistory) | **Get** /users/me/stamp-history | スタンプ履歴を取得 +[**GetMyStars**](MeAPI.md#GetMyStars) | **Get** /users/me/stars | スターチャンネルリストを取得 +[**GetMyTokens**](MeAPI.md#GetMyTokens) | **Get** /users/me/tokens | 有効トークンのリストを取得 +[**GetMyUnreadChannels**](MeAPI.md#GetMyUnreadChannels) | **Get** /users/me/unread | 未読チャンネルを取得 +[**GetMyUserTags**](MeAPI.md#GetMyUserTags) | **Get** /users/me/tags | 自分のタグリストを取得 +[**GetMyViewStates**](MeAPI.md#GetMyViewStates) | **Get** /users/me/view-states | 自身のチャンネル閲覧状態一覧を取得 +[**GetOIDCUserInfo**](MeAPI.md#GetOIDCUserInfo) | **Get** /users/me/oidc | 自分のユーザー詳細を取得 (OIDC UserInfo) +[**GetUserSettings**](MeAPI.md#GetUserSettings) | **Get** /users/me/settings | ユーザー設定を取得 +[**LinkExternalAccount**](MeAPI.md#LinkExternalAccount) | **Post** /users/me/ex-accounts/link | 外部ログインアカウントを紐付ける +[**ReadChannel**](MeAPI.md#ReadChannel) | **Delete** /users/me/unread/{channelId} | チャンネルを既読にする +[**RegisterFCMDevice**](MeAPI.md#RegisterFCMDevice) | **Post** /users/me/fcm-device | FCMデバイスを登録 +[**RemoveMyStar**](MeAPI.md#RemoveMyStar) | **Delete** /users/me/stars/{channelId} | チャンネルをスターから削除します +[**RemoveMyUserTag**](MeAPI.md#RemoveMyUserTag) | **Delete** /users/me/tags/{tagId} | 自分からタグを削除します +[**RevokeMySession**](MeAPI.md#RevokeMySession) | **Delete** /users/me/sessions/{sessionId} | セッションを無効化 +[**RevokeMyToken**](MeAPI.md#RevokeMyToken) | **Delete** /users/me/tokens/{tokenId} | トークンの認可を取り消す +[**SetChannelSubscribeLevel**](MeAPI.md#SetChannelSubscribeLevel) | **Put** /users/me/subscriptions/{channelId} | チャンネル購読レベルを設定 +[**UnlinkExternalAccount**](MeAPI.md#UnlinkExternalAccount) | **Post** /users/me/ex-accounts/unlink | 外部ログインアカウントの紐付けを解除 @@ -52,22 +52,22 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postStarRequest := *traq.NewPostStarRequest("ChannelId_example") // PostStarRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MeApi.AddMyStar(context.Background()).PostStarRequest(postStarRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.AddMyStar``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + postStarRequest := *traq.NewPostStarRequest("ChannelId_example") // PostStarRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MeAPI.AddMyStar(context.Background()).PostStarRequest(postStarRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.AddMyStar``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -116,24 +116,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postUserTagRequest := *traq.NewPostUserTagRequest("Tag_example") // PostUserTagRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.AddMyUserTag(context.Background()).PostUserTagRequest(postUserTagRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.AddMyUserTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddMyUserTag`: UserTag - fmt.Fprintf(os.Stdout, "Response from `MeApi.AddMyUserTag`: %v\n", resp) + postUserTagRequest := *traq.NewPostUserTagRequest("Tag_example") // PostUserTagRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.AddMyUserTag(context.Background()).PostUserTagRequest(postUserTagRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.AddMyUserTag``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddMyUserTag`: UserTag + fmt.Fprintf(os.Stdout, "Response from `MeAPI.AddMyUserTag`: %v\n", resp) } ``` @@ -182,22 +182,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - file := os.NewFile(1234, "some_file") // *os.File | アイコン画像(2MBまでのpng, jpeg, gif) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MeApi.ChangeMyIcon(context.Background()).File(file).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.ChangeMyIcon``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + file := os.NewFile(1234, "some_file") // *os.File | アイコン画像(2MBまでのpng, jpeg, gif) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MeAPI.ChangeMyIcon(context.Background()).File(file).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.ChangeMyIcon``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -246,22 +246,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - putNotifyCitationRequest := *traq.NewPutNotifyCitationRequest(false) // PutNotifyCitationRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MeApi.ChangeMyNotifyCitation(context.Background()).PutNotifyCitationRequest(putNotifyCitationRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.ChangeMyNotifyCitation``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + putNotifyCitationRequest := *traq.NewPutNotifyCitationRequest(false) // PutNotifyCitationRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MeAPI.ChangeMyNotifyCitation(context.Background()).PutNotifyCitationRequest(putNotifyCitationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.ChangeMyNotifyCitation``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -310,22 +310,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - putMyPasswordRequest := *traq.NewPutMyPasswordRequest("Password_example", "NewPassword_example") // PutMyPasswordRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MeApi.ChangeMyPassword(context.Background()).PutMyPasswordRequest(putMyPasswordRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.ChangeMyPassword``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + putMyPasswordRequest := *traq.NewPutMyPasswordRequest("Password_example", "NewPassword_example") // PutMyPasswordRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MeAPI.ChangeMyPassword(context.Background()).PutMyPasswordRequest(putMyPasswordRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.ChangeMyPassword``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -374,22 +374,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - patchMeRequest := *traq.NewPatchMeRequest() // PatchMeRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MeApi.EditMe(context.Background()).PatchMeRequest(patchMeRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.EditMe``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + patchMeRequest := *traq.NewPatchMeRequest() // PatchMeRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MeAPI.EditMe(context.Background()).PatchMeRequest(patchMeRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.EditMe``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -438,23 +438,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID - patchUserTagRequest := *traq.NewPatchUserTagRequest(false) // PatchUserTagRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MeApi.EditMyUserTag(context.Background(), tagId).PatchUserTagRequest(patchUserTagRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.EditMyUserTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID + patchUserTagRequest := *traq.NewPatchUserTagRequest(false) // PatchUserTagRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MeAPI.EditMyUserTag(context.Background(), tagId).PatchUserTagRequest(patchUserTagRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.EditMyUserTag``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -508,23 +508,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.GetMe(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.GetMe``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMe`: MyUserDetail - fmt.Fprintf(os.Stdout, "Response from `MeApi.GetMe`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.GetMe(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetMe``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMe`: MyUserDetail + fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetMe`: %v\n", resp) } ``` @@ -569,23 +569,23 @@ Other parameters are passed through a pointer to a apiGetMeRequest struct via th package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.GetMyChannelSubscriptions(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.GetMyChannelSubscriptions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyChannelSubscriptions`: []UserSubscribeState - fmt.Fprintf(os.Stdout, "Response from `MeApi.GetMyChannelSubscriptions`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.GetMyChannelSubscriptions(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetMyChannelSubscriptions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyChannelSubscriptions`: []UserSubscribeState + fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetMyChannelSubscriptions`: %v\n", resp) } ``` @@ -630,23 +630,23 @@ Other parameters are passed through a pointer to a apiGetMyChannelSubscriptionsR package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.GetMyExternalAccounts(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.GetMyExternalAccounts``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyExternalAccounts`: []ExternalProviderUser - fmt.Fprintf(os.Stdout, "Response from `MeApi.GetMyExternalAccounts`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.GetMyExternalAccounts(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetMyExternalAccounts``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyExternalAccounts`: []ExternalProviderUser + fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetMyExternalAccounts`: %v\n", resp) } ``` @@ -691,23 +691,23 @@ Other parameters are passed through a pointer to a apiGetMyExternalAccountsReque package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.GetMyIcon(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.GetMyIcon``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyIcon`: *os.File - fmt.Fprintf(os.Stdout, "Response from `MeApi.GetMyIcon`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.GetMyIcon(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetMyIcon``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyIcon`: *os.File + fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetMyIcon`: %v\n", resp) } ``` @@ -752,23 +752,23 @@ Other parameters are passed through a pointer to a apiGetMyIconRequest struct vi package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.GetMyNotifyCitation(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.GetMyNotifyCitation``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyNotifyCitation`: GetNotifyCitation - fmt.Fprintf(os.Stdout, "Response from `MeApi.GetMyNotifyCitation`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.GetMyNotifyCitation(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetMyNotifyCitation``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyNotifyCitation`: GetNotifyCitation + fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetMyNotifyCitation`: %v\n", resp) } ``` @@ -813,24 +813,24 @@ QRコードを取得 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - token := true // bool | 画像でなくトークン文字列で返すかどうか (optional) (default to false) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.GetMyQRCode(context.Background()).Token(token).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.GetMyQRCode``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyQRCode`: *os.File - fmt.Fprintf(os.Stdout, "Response from `MeApi.GetMyQRCode`: %v\n", resp) + token := true // bool | 画像でなくトークン文字列で返すかどうか (optional) (default to false) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.GetMyQRCode(context.Background()).Token(token).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetMyQRCode``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyQRCode`: *os.File + fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetMyQRCode`: %v\n", resp) } ``` @@ -879,23 +879,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.GetMySessions(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.GetMySessions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMySessions`: []LoginSession - fmt.Fprintf(os.Stdout, "Response from `MeApi.GetMySessions`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.GetMySessions(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetMySessions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMySessions`: []LoginSession + fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetMySessions`: %v\n", resp) } ``` @@ -940,24 +940,24 @@ Other parameters are passed through a pointer to a apiGetMySessionsRequest struc package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - limit := int32(56) // int32 | 件数 (optional) (default to 100) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.GetMyStampHistory(context.Background()).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.GetMyStampHistory``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyStampHistory`: []StampHistoryEntry - fmt.Fprintf(os.Stdout, "Response from `MeApi.GetMyStampHistory`: %v\n", resp) + limit := int32(56) // int32 | 件数 (optional) (default to 100) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.GetMyStampHistory(context.Background()).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetMyStampHistory``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyStampHistory`: []StampHistoryEntry + fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetMyStampHistory`: %v\n", resp) } ``` @@ -1006,23 +1006,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.GetMyStars(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.GetMyStars``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyStars`: []string - fmt.Fprintf(os.Stdout, "Response from `MeApi.GetMyStars`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.GetMyStars(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetMyStars``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyStars`: []string + fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetMyStars`: %v\n", resp) } ``` @@ -1067,23 +1067,23 @@ Other parameters are passed through a pointer to a apiGetMyStarsRequest struct v package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.GetMyTokens(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.GetMyTokens``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyTokens`: []ActiveOAuth2Token - fmt.Fprintf(os.Stdout, "Response from `MeApi.GetMyTokens`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.GetMyTokens(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetMyTokens``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyTokens`: []ActiveOAuth2Token + fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetMyTokens`: %v\n", resp) } ``` @@ -1128,23 +1128,23 @@ Other parameters are passed through a pointer to a apiGetMyTokensRequest struct package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.GetMyUnreadChannels(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.GetMyUnreadChannels``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyUnreadChannels`: []UnreadChannel - fmt.Fprintf(os.Stdout, "Response from `MeApi.GetMyUnreadChannels`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.GetMyUnreadChannels(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetMyUnreadChannels``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyUnreadChannels`: []UnreadChannel + fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetMyUnreadChannels`: %v\n", resp) } ``` @@ -1189,23 +1189,23 @@ Other parameters are passed through a pointer to a apiGetMyUnreadChannelsRequest package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.GetMyUserTags(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.GetMyUserTags``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyUserTags`: []UserTag - fmt.Fprintf(os.Stdout, "Response from `MeApi.GetMyUserTags`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.GetMyUserTags(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetMyUserTags``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyUserTags`: []UserTag + fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetMyUserTags`: %v\n", resp) } ``` @@ -1250,23 +1250,23 @@ Other parameters are passed through a pointer to a apiGetMyUserTagsRequest struc package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.GetMyViewStates(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.GetMyViewStates``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyViewStates`: []MyChannelViewState - fmt.Fprintf(os.Stdout, "Response from `MeApi.GetMyViewStates`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.GetMyViewStates(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetMyViewStates``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyViewStates`: []MyChannelViewState + fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetMyViewStates`: %v\n", resp) } ``` @@ -1311,23 +1311,23 @@ Other parameters are passed through a pointer to a apiGetMyViewStatesRequest str package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.GetOIDCUserInfo(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.GetOIDCUserInfo``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOIDCUserInfo`: OIDCUserInfo - fmt.Fprintf(os.Stdout, "Response from `MeApi.GetOIDCUserInfo`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.GetOIDCUserInfo(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetOIDCUserInfo``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOIDCUserInfo`: OIDCUserInfo + fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetOIDCUserInfo`: %v\n", resp) } ``` @@ -1372,23 +1372,23 @@ Other parameters are passed through a pointer to a apiGetOIDCUserInfoRequest str package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MeApi.GetUserSettings(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.GetUserSettings``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserSettings`: UserSettings - fmt.Fprintf(os.Stdout, "Response from `MeApi.GetUserSettings`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MeAPI.GetUserSettings(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.GetUserSettings``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserSettings`: UserSettings + fmt.Fprintf(os.Stdout, "Response from `MeAPI.GetUserSettings`: %v\n", resp) } ``` @@ -1433,22 +1433,22 @@ Other parameters are passed through a pointer to a apiGetUserSettingsRequest str package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postLinkExternalAccount := *traq.NewPostLinkExternalAccount("ProviderName_example") // PostLinkExternalAccount | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MeApi.LinkExternalAccount(context.Background()).PostLinkExternalAccount(postLinkExternalAccount).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.LinkExternalAccount``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + postLinkExternalAccount := *traq.NewPostLinkExternalAccount("ProviderName_example") // PostLinkExternalAccount | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MeAPI.LinkExternalAccount(context.Background()).PostLinkExternalAccount(postLinkExternalAccount).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.LinkExternalAccount``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -1497,22 +1497,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MeApi.ReadChannel(context.Background(), channelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.ReadChannel``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MeAPI.ReadChannel(context.Background(), channelId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.ReadChannel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -1565,22 +1565,22 @@ FCMデバイスを登録 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postMyFCMDeviceRequest := *traq.NewPostMyFCMDeviceRequest("bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1") // PostMyFCMDeviceRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MeApi.RegisterFCMDevice(context.Background()).PostMyFCMDeviceRequest(postMyFCMDeviceRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.RegisterFCMDevice``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + postMyFCMDeviceRequest := *traq.NewPostMyFCMDeviceRequest("bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1") // PostMyFCMDeviceRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MeAPI.RegisterFCMDevice(context.Background()).PostMyFCMDeviceRequest(postMyFCMDeviceRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.RegisterFCMDevice``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -1629,22 +1629,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MeApi.RemoveMyStar(context.Background(), channelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.RemoveMyStar``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MeAPI.RemoveMyStar(context.Background(), channelId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.RemoveMyStar``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -1697,22 +1697,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MeApi.RemoveMyUserTag(context.Background(), tagId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.RemoveMyUserTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MeAPI.RemoveMyUserTag(context.Background(), tagId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.RemoveMyUserTag``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -1765,22 +1765,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - sessionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | セッションUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MeApi.RevokeMySession(context.Background(), sessionId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.RevokeMySession``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + sessionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | セッションUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MeAPI.RevokeMySession(context.Background(), sessionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.RevokeMySession``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -1833,22 +1833,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - tokenId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | OAuth2トークンUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MeApi.RevokeMyToken(context.Background(), tokenId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.RevokeMyToken``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + tokenId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | OAuth2トークンUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MeAPI.RevokeMyToken(context.Background(), tokenId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.RevokeMyToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -1901,23 +1901,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - putChannelSubscribeLevelRequest := *traq.NewPutChannelSubscribeLevelRequest(traq.ChannelSubscribeLevel(0)) // PutChannelSubscribeLevelRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MeApi.SetChannelSubscribeLevel(context.Background(), channelId).PutChannelSubscribeLevelRequest(putChannelSubscribeLevelRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.SetChannelSubscribeLevel``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + putChannelSubscribeLevelRequest := *traq.NewPutChannelSubscribeLevelRequest(traq.ChannelSubscribeLevel(0)) // PutChannelSubscribeLevelRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MeAPI.SetChannelSubscribeLevel(context.Background(), channelId).PutChannelSubscribeLevelRequest(putChannelSubscribeLevelRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.SetChannelSubscribeLevel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -1971,22 +1971,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postUnlinkExternalAccount := *traq.NewPostUnlinkExternalAccount("ProviderName_example") // PostUnlinkExternalAccount | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MeApi.UnlinkExternalAccount(context.Background()).PostUnlinkExternalAccount(postUnlinkExternalAccount).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MeApi.UnlinkExternalAccount``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + postUnlinkExternalAccount := *traq.NewPostUnlinkExternalAccount("ProviderName_example") // PostUnlinkExternalAccount | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MeAPI.UnlinkExternalAccount(context.Background()).PostUnlinkExternalAccount(postUnlinkExternalAccount).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MeAPI.UnlinkExternalAccount``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` diff --git a/docs/MessageApi.md b/docs/MessageAPI.md similarity index 59% rename from docs/MessageApi.md rename to docs/MessageAPI.md index 4e5d2c2..97fef19 100644 --- a/docs/MessageApi.md +++ b/docs/MessageAPI.md @@ -1,24 +1,24 @@ -# \MessageApi +# \MessageAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AddMessageStamp**](MessageApi.md#AddMessageStamp) | **Post** /messages/{messageId}/stamps/{stampId} | スタンプを押す -[**CreatePin**](MessageApi.md#CreatePin) | **Post** /messages/{messageId}/pin | ピン留めする -[**DeleteMessage**](MessageApi.md#DeleteMessage) | **Delete** /messages/{messageId} | メッセージを削除 -[**EditMessage**](MessageApi.md#EditMessage) | **Put** /messages/{messageId} | メッセージを編集 -[**GetDirectMessages**](MessageApi.md#GetDirectMessages) | **Get** /users/{userId}/messages | ダイレクトメッセージのリストを取得 -[**GetMessage**](MessageApi.md#GetMessage) | **Get** /messages/{messageId} | メッセージを取得 -[**GetMessageClips**](MessageApi.md#GetMessageClips) | **Get** /messages/{messageId}/clips | 自分のクリップを取得 -[**GetMessageStamps**](MessageApi.md#GetMessageStamps) | **Get** /messages/{messageId}/stamps | メッセージのスタンプリストを取得 -[**GetMessages**](MessageApi.md#GetMessages) | **Get** /channels/{channelId}/messages | チャンネルメッセージのリストを取得 -[**GetPin**](MessageApi.md#GetPin) | **Get** /messages/{messageId}/pin | ピン留めを取得 -[**PostDirectMessage**](MessageApi.md#PostDirectMessage) | **Post** /users/{userId}/messages | ダイレクトメッセージを送信 -[**PostMessage**](MessageApi.md#PostMessage) | **Post** /channels/{channelId}/messages | チャンネルにメッセージを投稿 -[**RemoveMessageStamp**](MessageApi.md#RemoveMessageStamp) | **Delete** /messages/{messageId}/stamps/{stampId} | スタンプを消す -[**RemovePin**](MessageApi.md#RemovePin) | **Delete** /messages/{messageId}/pin | ピン留めを外す -[**SearchMessages**](MessageApi.md#SearchMessages) | **Get** /messages | メッセージを検索 +[**AddMessageStamp**](MessageAPI.md#AddMessageStamp) | **Post** /messages/{messageId}/stamps/{stampId} | スタンプを押す +[**CreatePin**](MessageAPI.md#CreatePin) | **Post** /messages/{messageId}/pin | ピン留めする +[**DeleteMessage**](MessageAPI.md#DeleteMessage) | **Delete** /messages/{messageId} | メッセージを削除 +[**EditMessage**](MessageAPI.md#EditMessage) | **Put** /messages/{messageId} | メッセージを編集 +[**GetDirectMessages**](MessageAPI.md#GetDirectMessages) | **Get** /users/{userId}/messages | ダイレクトメッセージのリストを取得 +[**GetMessage**](MessageAPI.md#GetMessage) | **Get** /messages/{messageId} | メッセージを取得 +[**GetMessageClips**](MessageAPI.md#GetMessageClips) | **Get** /messages/{messageId}/clips | 自分のクリップを取得 +[**GetMessageStamps**](MessageAPI.md#GetMessageStamps) | **Get** /messages/{messageId}/stamps | メッセージのスタンプリストを取得 +[**GetMessages**](MessageAPI.md#GetMessages) | **Get** /channels/{channelId}/messages | チャンネルメッセージのリストを取得 +[**GetPin**](MessageAPI.md#GetPin) | **Get** /messages/{messageId}/pin | ピン留めを取得 +[**PostDirectMessage**](MessageAPI.md#PostDirectMessage) | **Post** /users/{userId}/messages | ダイレクトメッセージを送信 +[**PostMessage**](MessageAPI.md#PostMessage) | **Post** /channels/{channelId}/messages | チャンネルにメッセージを投稿 +[**RemoveMessageStamp**](MessageAPI.md#RemoveMessageStamp) | **Delete** /messages/{messageId}/stamps/{stampId} | スタンプを消す +[**RemovePin**](MessageAPI.md#RemovePin) | **Delete** /messages/{messageId}/pin | ピン留めを外す +[**SearchMessages**](MessageAPI.md#SearchMessages) | **Get** /messages | メッセージを検索 @@ -36,24 +36,24 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID - postMessageStampRequest := *traq.NewPostMessageStampRequest(int32(123)) // PostMessageStampRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MessageApi.AddMessageStamp(context.Background(), messageId, stampId).PostMessageStampRequest(postMessageStampRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageApi.AddMessageStamp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID + postMessageStampRequest := *traq.NewPostMessageStampRequest(int32(123)) // PostMessageStampRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MessageAPI.AddMessageStamp(context.Background(), messageId, stampId).PostMessageStampRequest(postMessageStampRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MessageAPI.AddMessageStamp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -109,24 +109,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MessageApi.CreatePin(context.Background(), messageId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageApi.CreatePin``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreatePin`: MessagePin - fmt.Fprintf(os.Stdout, "Response from `MessageApi.CreatePin`: %v\n", resp) + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MessageAPI.CreatePin(context.Background(), messageId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MessageAPI.CreatePin``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreatePin`: MessagePin + fmt.Fprintf(os.Stdout, "Response from `MessageAPI.CreatePin`: %v\n", resp) } ``` @@ -179,22 +179,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MessageApi.DeleteMessage(context.Background(), messageId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageApi.DeleteMessage``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MessageAPI.DeleteMessage(context.Background(), messageId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MessageAPI.DeleteMessage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -247,23 +247,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - postMessageRequest := *traq.NewPostMessageRequest("Content_example") // PostMessageRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MessageApi.EditMessage(context.Background(), messageId).PostMessageRequest(postMessageRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageApi.EditMessage``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + postMessageRequest := *traq.NewPostMessageRequest("Content_example") // PostMessageRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MessageAPI.EditMessage(context.Background(), messageId).PostMessageRequest(postMessageRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MessageAPI.EditMessage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -317,31 +317,31 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" + "context" + "fmt" + "os" "time" - traq "github.com/traPtitech/go-traq" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - limit := int32(50) // int32 | 取得する件数 (optional) - offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) - since := time.Now() // time.Time | 取得する時間範囲の開始日時 (optional) (default to "0000-01-01T00:00Z") - until := time.Now() // time.Time | 取得する時間範囲の終了日時 (optional) - inclusive := true // bool | 範囲の端を含めるかどうか (optional) (default to false) - order := "order_example" // string | 昇順か降順か (optional) (default to "desc") - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MessageApi.GetDirectMessages(context.Background(), userId).Limit(limit).Offset(offset).Since(since).Until(until).Inclusive(inclusive).Order(order).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageApi.GetDirectMessages``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetDirectMessages`: []Message - fmt.Fprintf(os.Stdout, "Response from `MessageApi.GetDirectMessages`: %v\n", resp) + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + limit := int32(50) // int32 | 取得する件数 (optional) + offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) + since := time.Now() // time.Time | 取得する時間範囲の開始日時 (optional) (default to "0000-01-01T00:00Z") + until := time.Now() // time.Time | 取得する時間範囲の終了日時 (optional) + inclusive := true // bool | 範囲の端を含めるかどうか (optional) (default to false) + order := "order_example" // string | 昇順か降順か (optional) (default to "desc") + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MessageAPI.GetDirectMessages(context.Background(), userId).Limit(limit).Offset(offset).Since(since).Until(until).Inclusive(inclusive).Order(order).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MessageAPI.GetDirectMessages``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetDirectMessages`: []Message + fmt.Fprintf(os.Stdout, "Response from `MessageAPI.GetDirectMessages`: %v\n", resp) } ``` @@ -400,24 +400,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MessageApi.GetMessage(context.Background(), messageId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageApi.GetMessage``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMessage`: Message - fmt.Fprintf(os.Stdout, "Response from `MessageApi.GetMessage`: %v\n", resp) + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MessageAPI.GetMessage(context.Background(), messageId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MessageAPI.GetMessage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMessage`: Message + fmt.Fprintf(os.Stdout, "Response from `MessageAPI.GetMessage`: %v\n", resp) } ``` @@ -470,24 +470,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MessageApi.GetMessageClips(context.Background(), messageId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageApi.GetMessageClips``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMessageClips`: []MessageClip - fmt.Fprintf(os.Stdout, "Response from `MessageApi.GetMessageClips`: %v\n", resp) + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MessageAPI.GetMessageClips(context.Background(), messageId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MessageAPI.GetMessageClips``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMessageClips`: []MessageClip + fmt.Fprintf(os.Stdout, "Response from `MessageAPI.GetMessageClips`: %v\n", resp) } ``` @@ -540,24 +540,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MessageApi.GetMessageStamps(context.Background(), messageId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageApi.GetMessageStamps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMessageStamps`: []MessageStamp - fmt.Fprintf(os.Stdout, "Response from `MessageApi.GetMessageStamps`: %v\n", resp) + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MessageAPI.GetMessageStamps(context.Background(), messageId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MessageAPI.GetMessageStamps``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMessageStamps`: []MessageStamp + fmt.Fprintf(os.Stdout, "Response from `MessageAPI.GetMessageStamps`: %v\n", resp) } ``` @@ -610,31 +610,31 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" + "context" + "fmt" + "os" "time" - traq "github.com/traPtitech/go-traq" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - limit := int32(50) // int32 | 取得する件数 (optional) - offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) - since := time.Now() // time.Time | 取得する時間範囲の開始日時 (optional) (default to "0000-01-01T00:00Z") - until := time.Now() // time.Time | 取得する時間範囲の終了日時 (optional) - inclusive := true // bool | 範囲の端を含めるかどうか (optional) (default to false) - order := "order_example" // string | 昇順か降順か (optional) (default to "desc") - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MessageApi.GetMessages(context.Background(), channelId).Limit(limit).Offset(offset).Since(since).Until(until).Inclusive(inclusive).Order(order).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageApi.GetMessages``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMessages`: []Message - fmt.Fprintf(os.Stdout, "Response from `MessageApi.GetMessages`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + limit := int32(50) // int32 | 取得する件数 (optional) + offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) + since := time.Now() // time.Time | 取得する時間範囲の開始日時 (optional) (default to "0000-01-01T00:00Z") + until := time.Now() // time.Time | 取得する時間範囲の終了日時 (optional) + inclusive := true // bool | 範囲の端を含めるかどうか (optional) (default to false) + order := "order_example" // string | 昇順か降順か (optional) (default to "desc") + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MessageAPI.GetMessages(context.Background(), channelId).Limit(limit).Offset(offset).Since(since).Until(until).Inclusive(inclusive).Order(order).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MessageAPI.GetMessages``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMessages`: []Message + fmt.Fprintf(os.Stdout, "Response from `MessageAPI.GetMessages`: %v\n", resp) } ``` @@ -693,24 +693,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MessageApi.GetPin(context.Background(), messageId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageApi.GetPin``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetPin`: MessagePin - fmt.Fprintf(os.Stdout, "Response from `MessageApi.GetPin`: %v\n", resp) + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MessageAPI.GetPin(context.Background(), messageId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MessageAPI.GetPin``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetPin`: MessagePin + fmt.Fprintf(os.Stdout, "Response from `MessageAPI.GetPin`: %v\n", resp) } ``` @@ -763,25 +763,25 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - postMessageRequest := *traq.NewPostMessageRequest("Content_example") // PostMessageRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MessageApi.PostDirectMessage(context.Background(), userId).PostMessageRequest(postMessageRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageApi.PostDirectMessage``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PostDirectMessage`: Message - fmt.Fprintf(os.Stdout, "Response from `MessageApi.PostDirectMessage`: %v\n", resp) + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + postMessageRequest := *traq.NewPostMessageRequest("Content_example") // PostMessageRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MessageAPI.PostDirectMessage(context.Background(), userId).PostMessageRequest(postMessageRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MessageAPI.PostDirectMessage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PostDirectMessage`: Message + fmt.Fprintf(os.Stdout, "Response from `MessageAPI.PostDirectMessage`: %v\n", resp) } ``` @@ -835,25 +835,25 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - postMessageRequest := *traq.NewPostMessageRequest("Content_example") // PostMessageRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MessageApi.PostMessage(context.Background(), channelId).PostMessageRequest(postMessageRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageApi.PostMessage``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PostMessage`: Message - fmt.Fprintf(os.Stdout, "Response from `MessageApi.PostMessage`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + postMessageRequest := *traq.NewPostMessageRequest("Content_example") // PostMessageRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MessageAPI.PostMessage(context.Background(), channelId).PostMessageRequest(postMessageRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MessageAPI.PostMessage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PostMessage`: Message + fmt.Fprintf(os.Stdout, "Response from `MessageAPI.PostMessage`: %v\n", resp) } ``` @@ -907,23 +907,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MessageApi.RemoveMessageStamp(context.Background(), messageId, stampId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageApi.RemoveMessageStamp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MessageAPI.RemoveMessageStamp(context.Background(), messageId, stampId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MessageAPI.RemoveMessageStamp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -978,22 +978,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.MessageApi.RemovePin(context.Background(), messageId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageApi.RemovePin``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.MessageAPI.RemovePin(context.Background(), messageId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MessageAPI.RemovePin``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -1046,40 +1046,40 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" + "context" + "fmt" + "os" "time" - traq "github.com/traPtitech/go-traq" + traq "github.com/traPtitech/go-traq" ) func main() { - word := ""phrase match" +(foo | bar) -baz" // string | 検索ワード Simple-Query-String-Syntaxをパースして検索します (optional) - after := time.Now() // time.Time | 投稿日時が指定日時より後 (optional) - before := time.Now() // time.Time | 投稿日時が指定日時より前 (optional) - in := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージが投稿されたチャンネル (optional) - to := []string{"Inner_example"} // []string | メンションされたユーザー (optional) - from := []string{"Inner_example"} // []string | メッセージを投稿したユーザー (optional) - citation := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 引用しているメッセージ (optional) - bot := true // bool | メッセージを投稿したユーザーがBotかどうか (optional) - hasURL := true // bool | メッセージがURLを含むか (optional) - hasAttachments := true // bool | メッセージが添付ファイルを含むか (optional) - hasImage := true // bool | メッセージが画像を含むか (optional) - hasVideo := true // bool | メッセージが動画を含むか (optional) - hasAudio := true // bool | メッセージが音声ファイルを含むか (optional) - limit := int32(56) // int32 | 検索結果から取得するメッセージの最大件数 (optional) - offset := int32(56) // int32 | 検索結果から取得するメッセージのオフセット (optional) - sort := "sort_example" // string | ソート順 (作成日時が新しい `createdAt`, 作成日時が古い `-createdAt`, 更新日時が新しい `updatedAt`, 更新日時が古い `-updatedAt`) (optional) (default to "-createdAt") - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.MessageApi.SearchMessages(context.Background()).Word(word).After(after).Before(before).In(in).To(to).From(from).Citation(citation).Bot(bot).HasURL(hasURL).HasAttachments(hasAttachments).HasImage(hasImage).HasVideo(hasVideo).HasAudio(hasAudio).Limit(limit).Offset(offset).Sort(sort).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageApi.SearchMessages``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SearchMessages`: MessageSearchResult - fmt.Fprintf(os.Stdout, "Response from `MessageApi.SearchMessages`: %v\n", resp) + word := ""phrase match" +(foo | bar) -baz" // string | 検索ワード Simple-Query-String-Syntaxをパースして検索します (optional) + after := time.Now() // time.Time | 投稿日時が指定日時より後 (optional) + before := time.Now() // time.Time | 投稿日時が指定日時より前 (optional) + in := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージが投稿されたチャンネル (optional) + to := []string{"Inner_example"} // []string | メンションされたユーザー (optional) + from := []string{"Inner_example"} // []string | メッセージを投稿したユーザー (optional) + citation := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 引用しているメッセージ (optional) + bot := true // bool | メッセージを投稿したユーザーがBotかどうか (optional) + hasURL := true // bool | メッセージがURLを含むか (optional) + hasAttachments := true // bool | メッセージが添付ファイルを含むか (optional) + hasImage := true // bool | メッセージが画像を含むか (optional) + hasVideo := true // bool | メッセージが動画を含むか (optional) + hasAudio := true // bool | メッセージが音声ファイルを含むか (optional) + limit := int32(56) // int32 | 検索結果から取得するメッセージの最大件数 (optional) + offset := int32(56) // int32 | 検索結果から取得するメッセージのオフセット (optional) + sort := "sort_example" // string | ソート順 (作成日時が新しい `createdAt`, 作成日時が古い `-createdAt`, 更新日時が新しい `updatedAt`, 更新日時が古い `-updatedAt`) (optional) (default to "-createdAt") + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.MessageAPI.SearchMessages(context.Background()).Word(word).After(after).Before(before).In(in).To(to).From(from).Citation(citation).Bot(bot).HasURL(hasURL).HasAttachments(hasAttachments).HasImage(hasImage).HasVideo(hasVideo).HasAudio(hasAudio).Limit(limit).Offset(offset).Sort(sort).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MessageAPI.SearchMessages``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SearchMessages`: MessageSearchResult + fmt.Fprintf(os.Stdout, "Response from `MessageAPI.SearchMessages`: %v\n", resp) } ``` diff --git a/docs/NotificationApi.md b/docs/NotificationAPI.md similarity index 61% rename from docs/NotificationApi.md rename to docs/NotificationAPI.md index 65fbfd6..5ccbc67 100644 --- a/docs/NotificationApi.md +++ b/docs/NotificationAPI.md @@ -1,19 +1,19 @@ -# \NotificationApi +# \NotificationAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**EditChannelSubscribers**](NotificationApi.md#EditChannelSubscribers) | **Patch** /channels/{channelId}/subscribers | チャンネルの通知購読者を編集 -[**GetChannelSubscribers**](NotificationApi.md#GetChannelSubscribers) | **Get** /channels/{channelId}/subscribers | チャンネルの通知購読者のリストを取得 -[**GetMyChannelSubscriptions**](NotificationApi.md#GetMyChannelSubscriptions) | **Get** /users/me/subscriptions | 自分のチャンネル購読状態を取得 -[**GetMyUnreadChannels**](NotificationApi.md#GetMyUnreadChannels) | **Get** /users/me/unread | 未読チャンネルを取得 -[**GetMyViewStates**](NotificationApi.md#GetMyViewStates) | **Get** /users/me/view-states | 自身のチャンネル閲覧状態一覧を取得 -[**ReadChannel**](NotificationApi.md#ReadChannel) | **Delete** /users/me/unread/{channelId} | チャンネルを既読にする -[**RegisterFCMDevice**](NotificationApi.md#RegisterFCMDevice) | **Post** /users/me/fcm-device | FCMデバイスを登録 -[**SetChannelSubscribeLevel**](NotificationApi.md#SetChannelSubscribeLevel) | **Put** /users/me/subscriptions/{channelId} | チャンネル購読レベルを設定 -[**SetChannelSubscribers**](NotificationApi.md#SetChannelSubscribers) | **Put** /channels/{channelId}/subscribers | チャンネルの通知購読者を設定 -[**Ws**](NotificationApi.md#Ws) | **Get** /ws | WebSocket通知ストリームに接続します +[**EditChannelSubscribers**](NotificationAPI.md#EditChannelSubscribers) | **Patch** /channels/{channelId}/subscribers | チャンネルの通知購読者を編集 +[**GetChannelSubscribers**](NotificationAPI.md#GetChannelSubscribers) | **Get** /channels/{channelId}/subscribers | チャンネルの通知購読者のリストを取得 +[**GetMyChannelSubscriptions**](NotificationAPI.md#GetMyChannelSubscriptions) | **Get** /users/me/subscriptions | 自分のチャンネル購読状態を取得 +[**GetMyUnreadChannels**](NotificationAPI.md#GetMyUnreadChannels) | **Get** /users/me/unread | 未読チャンネルを取得 +[**GetMyViewStates**](NotificationAPI.md#GetMyViewStates) | **Get** /users/me/view-states | 自身のチャンネル閲覧状態一覧を取得 +[**ReadChannel**](NotificationAPI.md#ReadChannel) | **Delete** /users/me/unread/{channelId} | チャンネルを既読にする +[**RegisterFCMDevice**](NotificationAPI.md#RegisterFCMDevice) | **Post** /users/me/fcm-device | FCMデバイスを登録 +[**SetChannelSubscribeLevel**](NotificationAPI.md#SetChannelSubscribeLevel) | **Put** /users/me/subscriptions/{channelId} | チャンネル購読レベルを設定 +[**SetChannelSubscribers**](NotificationAPI.md#SetChannelSubscribers) | **Put** /channels/{channelId}/subscribers | チャンネルの通知購読者を設定 +[**Ws**](NotificationAPI.md#Ws) | **Get** /ws | WebSocket通知ストリームに接続します @@ -31,23 +31,23 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - patchChannelSubscribersRequest := *traq.NewPatchChannelSubscribersRequest() // PatchChannelSubscribersRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.NotificationApi.EditChannelSubscribers(context.Background(), channelId).PatchChannelSubscribersRequest(patchChannelSubscribersRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `NotificationApi.EditChannelSubscribers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + patchChannelSubscribersRequest := *traq.NewPatchChannelSubscribersRequest() // PatchChannelSubscribersRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.NotificationAPI.EditChannelSubscribers(context.Background(), channelId).PatchChannelSubscribersRequest(patchChannelSubscribersRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.EditChannelSubscribers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -101,24 +101,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.NotificationApi.GetChannelSubscribers(context.Background(), channelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `NotificationApi.GetChannelSubscribers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetChannelSubscribers`: []string - fmt.Fprintf(os.Stdout, "Response from `NotificationApi.GetChannelSubscribers`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.NotificationAPI.GetChannelSubscribers(context.Background(), channelId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.GetChannelSubscribers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetChannelSubscribers`: []string + fmt.Fprintf(os.Stdout, "Response from `NotificationAPI.GetChannelSubscribers`: %v\n", resp) } ``` @@ -171,23 +171,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.NotificationApi.GetMyChannelSubscriptions(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `NotificationApi.GetMyChannelSubscriptions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyChannelSubscriptions`: []UserSubscribeState - fmt.Fprintf(os.Stdout, "Response from `NotificationApi.GetMyChannelSubscriptions`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.NotificationAPI.GetMyChannelSubscriptions(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.GetMyChannelSubscriptions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyChannelSubscriptions`: []UserSubscribeState + fmt.Fprintf(os.Stdout, "Response from `NotificationAPI.GetMyChannelSubscriptions`: %v\n", resp) } ``` @@ -232,23 +232,23 @@ Other parameters are passed through a pointer to a apiGetMyChannelSubscriptionsR package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.NotificationApi.GetMyUnreadChannels(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `NotificationApi.GetMyUnreadChannels``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyUnreadChannels`: []UnreadChannel - fmt.Fprintf(os.Stdout, "Response from `NotificationApi.GetMyUnreadChannels`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.NotificationAPI.GetMyUnreadChannels(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.GetMyUnreadChannels``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyUnreadChannels`: []UnreadChannel + fmt.Fprintf(os.Stdout, "Response from `NotificationAPI.GetMyUnreadChannels`: %v\n", resp) } ``` @@ -293,23 +293,23 @@ Other parameters are passed through a pointer to a apiGetMyUnreadChannelsRequest package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.NotificationApi.GetMyViewStates(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `NotificationApi.GetMyViewStates``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyViewStates`: []MyChannelViewState - fmt.Fprintf(os.Stdout, "Response from `NotificationApi.GetMyViewStates`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.NotificationAPI.GetMyViewStates(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.GetMyViewStates``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyViewStates`: []MyChannelViewState + fmt.Fprintf(os.Stdout, "Response from `NotificationAPI.GetMyViewStates`: %v\n", resp) } ``` @@ -354,22 +354,22 @@ Other parameters are passed through a pointer to a apiGetMyViewStatesRequest str package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.NotificationApi.ReadChannel(context.Background(), channelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `NotificationApi.ReadChannel``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.NotificationAPI.ReadChannel(context.Background(), channelId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.ReadChannel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -422,22 +422,22 @@ FCMデバイスを登録 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postMyFCMDeviceRequest := *traq.NewPostMyFCMDeviceRequest("bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1") // PostMyFCMDeviceRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.NotificationApi.RegisterFCMDevice(context.Background()).PostMyFCMDeviceRequest(postMyFCMDeviceRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `NotificationApi.RegisterFCMDevice``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + postMyFCMDeviceRequest := *traq.NewPostMyFCMDeviceRequest("bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1") // PostMyFCMDeviceRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.NotificationAPI.RegisterFCMDevice(context.Background()).PostMyFCMDeviceRequest(postMyFCMDeviceRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.RegisterFCMDevice``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -486,23 +486,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - putChannelSubscribeLevelRequest := *traq.NewPutChannelSubscribeLevelRequest(traq.ChannelSubscribeLevel(0)) // PutChannelSubscribeLevelRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.NotificationApi.SetChannelSubscribeLevel(context.Background(), channelId).PutChannelSubscribeLevelRequest(putChannelSubscribeLevelRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `NotificationApi.SetChannelSubscribeLevel``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + putChannelSubscribeLevelRequest := *traq.NewPutChannelSubscribeLevelRequest(traq.ChannelSubscribeLevel(0)) // PutChannelSubscribeLevelRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.NotificationAPI.SetChannelSubscribeLevel(context.Background(), channelId).PutChannelSubscribeLevelRequest(putChannelSubscribeLevelRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.SetChannelSubscribeLevel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -556,23 +556,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - putChannelSubscribersRequest := *traq.NewPutChannelSubscribersRequest([]string{"On_example"}) // PutChannelSubscribersRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.NotificationApi.SetChannelSubscribers(context.Background(), channelId).PutChannelSubscribersRequest(putChannelSubscribersRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `NotificationApi.SetChannelSubscribers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + putChannelSubscribersRequest := *traq.NewPutChannelSubscribersRequest([]string{"On_example"}) // PutChannelSubscribersRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.NotificationAPI.SetChannelSubscribers(context.Background(), channelId).PutChannelSubscribersRequest(putChannelSubscribersRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.SetChannelSubscribers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -626,21 +626,21 @@ WebSocket通知ストリームに接続します package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.NotificationApi.Ws(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `NotificationApi.Ws``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.NotificationAPI.Ws(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.Ws``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` diff --git a/docs/Oauth2Api.md b/docs/Oauth2API.md similarity index 58% rename from docs/Oauth2Api.md rename to docs/Oauth2API.md index d256bed..650b984 100644 --- a/docs/Oauth2Api.md +++ b/docs/Oauth2API.md @@ -1,22 +1,22 @@ -# \Oauth2Api +# \Oauth2API All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateClient**](Oauth2Api.md#CreateClient) | **Post** /clients | OAuth2クライアントを作成 -[**DeleteClient**](Oauth2Api.md#DeleteClient) | **Delete** /clients/{clientId} | OAuth2クライアントを削除 -[**EditClient**](Oauth2Api.md#EditClient) | **Patch** /clients/{clientId} | OAuth2クライアント情報を変更 -[**GetClient**](Oauth2Api.md#GetClient) | **Get** /clients/{clientId} | OAuth2クライアント情報を取得 -[**GetClients**](Oauth2Api.md#GetClients) | **Get** /clients | OAuth2クライアントのリストを取得 -[**GetMyTokens**](Oauth2Api.md#GetMyTokens) | **Get** /users/me/tokens | 有効トークンのリストを取得 -[**GetOAuth2Authorize**](Oauth2Api.md#GetOAuth2Authorize) | **Get** /oauth2/authorize | OAuth2 認可エンドポイント -[**PostOAuth2Authorize**](Oauth2Api.md#PostOAuth2Authorize) | **Post** /oauth2/authorize | OAuth2 認可エンドポイント -[**PostOAuth2AuthorizeDecide**](Oauth2Api.md#PostOAuth2AuthorizeDecide) | **Post** /oauth2/authorize/decide | OAuth2 認可承諾API -[**PostOAuth2Token**](Oauth2Api.md#PostOAuth2Token) | **Post** /oauth2/token | OAuth2 トークンエンドポイント -[**RevokeClientTokens**](Oauth2Api.md#RevokeClientTokens) | **Delete** /clients/{clientId}/tokens | OAuthクライアントのトークンを削除 -[**RevokeMyToken**](Oauth2Api.md#RevokeMyToken) | **Delete** /users/me/tokens/{tokenId} | トークンの認可を取り消す -[**RevokeOAuth2Token**](Oauth2Api.md#RevokeOAuth2Token) | **Post** /oauth2/revoke | OAuth2 トークン無効化エンドポイント +[**CreateClient**](Oauth2API.md#CreateClient) | **Post** /clients | OAuth2クライアントを作成 +[**DeleteClient**](Oauth2API.md#DeleteClient) | **Delete** /clients/{clientId} | OAuth2クライアントを削除 +[**EditClient**](Oauth2API.md#EditClient) | **Patch** /clients/{clientId} | OAuth2クライアント情報を変更 +[**GetClient**](Oauth2API.md#GetClient) | **Get** /clients/{clientId} | OAuth2クライアント情報を取得 +[**GetClients**](Oauth2API.md#GetClients) | **Get** /clients | OAuth2クライアントのリストを取得 +[**GetMyTokens**](Oauth2API.md#GetMyTokens) | **Get** /users/me/tokens | 有効トークンのリストを取得 +[**GetOAuth2Authorize**](Oauth2API.md#GetOAuth2Authorize) | **Get** /oauth2/authorize | OAuth2 認可エンドポイント +[**PostOAuth2Authorize**](Oauth2API.md#PostOAuth2Authorize) | **Post** /oauth2/authorize | OAuth2 認可エンドポイント +[**PostOAuth2AuthorizeDecide**](Oauth2API.md#PostOAuth2AuthorizeDecide) | **Post** /oauth2/authorize/decide | OAuth2 認可承諾API +[**PostOAuth2Token**](Oauth2API.md#PostOAuth2Token) | **Post** /oauth2/token | OAuth2 トークンエンドポイント +[**RevokeClientTokens**](Oauth2API.md#RevokeClientTokens) | **Delete** /clients/{clientId}/tokens | OAuthクライアントのトークンを削除 +[**RevokeMyToken**](Oauth2API.md#RevokeMyToken) | **Delete** /users/me/tokens/{tokenId} | トークンの認可を取り消す +[**RevokeOAuth2Token**](Oauth2API.md#RevokeOAuth2Token) | **Post** /oauth2/revoke | OAuth2 トークン無効化エンドポイント @@ -34,24 +34,24 @@ OAuth2クライアントを作成 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postClientRequest := *traq.NewPostClientRequest("Name_example", "CallbackUrl_example", []traq.OAuth2Scope{traq.OAuth2Scope("openid")}, "Description_example") // PostClientRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.Oauth2Api.CreateClient(context.Background()).PostClientRequest(postClientRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.CreateClient``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateClient`: OAuth2ClientDetail - fmt.Fprintf(os.Stdout, "Response from `Oauth2Api.CreateClient`: %v\n", resp) + postClientRequest := *traq.NewPostClientRequest("Name_example", "CallbackUrl_example", []traq.OAuth2Scope{traq.OAuth2Scope("openid")}, "Description_example") // PostClientRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.Oauth2API.CreateClient(context.Background()).PostClientRequest(postClientRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Oauth2API.CreateClient``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateClient`: OAuth2ClientDetail + fmt.Fprintf(os.Stdout, "Response from `Oauth2API.CreateClient`: %v\n", resp) } ``` @@ -100,22 +100,22 @@ OAuth2クライアントを削除 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - clientId := "clientId_example" // string | OAuth2クライアントUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.Oauth2Api.DeleteClient(context.Background(), clientId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.DeleteClient``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + clientId := "clientId_example" // string | OAuth2クライアントUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.Oauth2API.DeleteClient(context.Background(), clientId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Oauth2API.DeleteClient``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -168,23 +168,23 @@ OAuth2クライアント情報を変更 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - clientId := "clientId_example" // string | OAuth2クライアントUUID - patchClientRequest := *traq.NewPatchClientRequest() // PatchClientRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.Oauth2Api.EditClient(context.Background(), clientId).PatchClientRequest(patchClientRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.EditClient``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + clientId := "clientId_example" // string | OAuth2クライアントUUID + patchClientRequest := *traq.NewPatchClientRequest() // PatchClientRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.Oauth2API.EditClient(context.Background(), clientId).PatchClientRequest(patchClientRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Oauth2API.EditClient``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -238,25 +238,25 @@ OAuth2クライアント情報を取得 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - clientId := "clientId_example" // string | OAuth2クライアントUUID - detail := true // bool | 詳細情報を含めるかどうか (optional) (default to false) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.Oauth2Api.GetClient(context.Background(), clientId).Detail(detail).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.GetClient``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetClient`: GetClient200Response - fmt.Fprintf(os.Stdout, "Response from `Oauth2Api.GetClient`: %v\n", resp) + clientId := "clientId_example" // string | OAuth2クライアントUUID + detail := true // bool | 詳細情報を含めるかどうか (optional) (default to false) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.Oauth2API.GetClient(context.Background(), clientId).Detail(detail).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Oauth2API.GetClient``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetClient`: GetClient200Response + fmt.Fprintf(os.Stdout, "Response from `Oauth2API.GetClient`: %v\n", resp) } ``` @@ -310,24 +310,24 @@ OAuth2クライアントのリストを取得 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - all := true // bool | 全てのクライアントを取得するかどうか (optional) (default to false) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.Oauth2Api.GetClients(context.Background()).All(all).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.GetClients``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetClients`: []OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `Oauth2Api.GetClients`: %v\n", resp) + all := true // bool | 全てのクライアントを取得するかどうか (optional) (default to false) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.Oauth2API.GetClients(context.Background()).All(all).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Oauth2API.GetClients``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetClients`: []OAuth2Client + fmt.Fprintf(os.Stdout, "Response from `Oauth2API.GetClients`: %v\n", resp) } ``` @@ -376,23 +376,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.Oauth2Api.GetMyTokens(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.GetMyTokens``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyTokens`: []ActiveOAuth2Token - fmt.Fprintf(os.Stdout, "Response from `Oauth2Api.GetMyTokens`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.Oauth2API.GetMyTokens(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Oauth2API.GetMyTokens``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyTokens`: []ActiveOAuth2Token + fmt.Fprintf(os.Stdout, "Response from `Oauth2API.GetMyTokens`: %v\n", resp) } ``` @@ -437,30 +437,30 @@ OAuth2 認可エンドポイント package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - clientId := "clientId_example" // string | - responseType := traq.OAuth2ResponseType("code") // OAuth2ResponseType | (optional) - redirectUri := "redirectUri_example" // string | (optional) - scope := "scope_example" // string | (optional) - state := "state_example" // string | (optional) - codeChallenge := "codeChallenge_example" // string | (optional) - codeChallengeMethod := "codeChallengeMethod_example" // string | (optional) - nonce := "nonce_example" // string | (optional) - prompt := traq.OAuth2Prompt("none") // OAuth2Prompt | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.Oauth2Api.GetOAuth2Authorize(context.Background()).ClientId(clientId).ResponseType(responseType).RedirectUri(redirectUri).Scope(scope).State(state).CodeChallenge(codeChallenge).CodeChallengeMethod(codeChallengeMethod).Nonce(nonce).Prompt(prompt).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.GetOAuth2Authorize``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + clientId := "clientId_example" // string | + responseType := traq.OAuth2ResponseType("code") // OAuth2ResponseType | (optional) + redirectUri := "redirectUri_example" // string | (optional) + scope := "scope_example" // string | (optional) + state := "state_example" // string | (optional) + codeChallenge := "codeChallenge_example" // string | (optional) + codeChallengeMethod := "codeChallengeMethod_example" // string | (optional) + nonce := "nonce_example" // string | (optional) + prompt := traq.OAuth2Prompt("none") // OAuth2Prompt | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.Oauth2API.GetOAuth2Authorize(context.Background()).ClientId(clientId).ResponseType(responseType).RedirectUri(redirectUri).Scope(scope).State(state).CodeChallenge(codeChallenge).CodeChallengeMethod(codeChallengeMethod).Nonce(nonce).Prompt(prompt).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Oauth2API.GetOAuth2Authorize``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -517,30 +517,30 @@ OAuth2 認可エンドポイント package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - clientId := "clientId_example" // string | - responseType := traq.OAuth2ResponseType("code") // OAuth2ResponseType | (optional) - redirectUri := "redirectUri_example" // string | (optional) - scope := "scope_example" // string | (optional) - state := "state_example" // string | (optional) - codeChallenge := "codeChallenge_example" // string | (optional) - codeChallengeMethod := "codeChallengeMethod_example" // string | (optional) - nonce := "nonce_example" // string | (optional) - prompt := traq.OAuth2Prompt("none") // OAuth2Prompt | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.Oauth2Api.PostOAuth2Authorize(context.Background()).ClientId(clientId).ResponseType(responseType).RedirectUri(redirectUri).Scope(scope).State(state).CodeChallenge(codeChallenge).CodeChallengeMethod(codeChallengeMethod).Nonce(nonce).Prompt(prompt).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.PostOAuth2Authorize``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + clientId := "clientId_example" // string | + responseType := traq.OAuth2ResponseType("code") // OAuth2ResponseType | (optional) + redirectUri := "redirectUri_example" // string | (optional) + scope := "scope_example" // string | (optional) + state := "state_example" // string | (optional) + codeChallenge := "codeChallenge_example" // string | (optional) + codeChallengeMethod := "codeChallengeMethod_example" // string | (optional) + nonce := "nonce_example" // string | (optional) + prompt := traq.OAuth2Prompt("none") // OAuth2Prompt | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.Oauth2API.PostOAuth2Authorize(context.Background()).ClientId(clientId).ResponseType(responseType).RedirectUri(redirectUri).Scope(scope).State(state).CodeChallenge(codeChallenge).CodeChallengeMethod(codeChallengeMethod).Nonce(nonce).Prompt(prompt).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Oauth2API.PostOAuth2Authorize``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -597,22 +597,22 @@ OAuth2 認可承諾API package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - submit := "submit_example" // string | 承諾する場合は\\\"approve\\\" - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.Oauth2Api.PostOAuth2AuthorizeDecide(context.Background()).Submit(submit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.PostOAuth2AuthorizeDecide``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + submit := "submit_example" // string | 承諾する場合は\\\"approve\\\" + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.Oauth2API.PostOAuth2AuthorizeDecide(context.Background()).Submit(submit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Oauth2API.PostOAuth2AuthorizeDecide``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -661,33 +661,33 @@ OAuth2 トークンエンドポイント package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - grantType := "grantType_example" // string | - code := "code_example" // string | (optional) - redirectUri := "redirectUri_example" // string | (optional) - clientId := "clientId_example" // string | (optional) - codeVerifier := "codeVerifier_example" // string | (optional) - username := "username_example" // string | (optional) - password := "password_example" // string | (optional) - scope := "scope_example" // string | (optional) - refreshToken := "refreshToken_example" // string | (optional) - clientSecret := "clientSecret_example" // string | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.Oauth2Api.PostOAuth2Token(context.Background()).GrantType(grantType).Code(code).RedirectUri(redirectUri).ClientId(clientId).CodeVerifier(codeVerifier).Username(username).Password(password).Scope(scope).RefreshToken(refreshToken).ClientSecret(clientSecret).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.PostOAuth2Token``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PostOAuth2Token`: OAuth2Token - fmt.Fprintf(os.Stdout, "Response from `Oauth2Api.PostOAuth2Token`: %v\n", resp) + grantType := "grantType_example" // string | + code := "code_example" // string | (optional) + redirectUri := "redirectUri_example" // string | (optional) + clientId := "clientId_example" // string | (optional) + codeVerifier := "codeVerifier_example" // string | (optional) + username := "username_example" // string | (optional) + password := "password_example" // string | (optional) + scope := "scope_example" // string | (optional) + refreshToken := "refreshToken_example" // string | (optional) + clientSecret := "clientSecret_example" // string | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.Oauth2API.PostOAuth2Token(context.Background()).GrantType(grantType).Code(code).RedirectUri(redirectUri).ClientId(clientId).CodeVerifier(codeVerifier).Username(username).Password(password).Scope(scope).RefreshToken(refreshToken).ClientSecret(clientSecret).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Oauth2API.PostOAuth2Token``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PostOAuth2Token`: OAuth2Token + fmt.Fprintf(os.Stdout, "Response from `Oauth2API.PostOAuth2Token`: %v\n", resp) } ``` @@ -745,22 +745,22 @@ OAuthクライアントのトークンを削除 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - clientId := "clientId_example" // string | OAuth2クライアントUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.Oauth2Api.RevokeClientTokens(context.Background(), clientId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.RevokeClientTokens``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + clientId := "clientId_example" // string | OAuth2クライアントUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.Oauth2API.RevokeClientTokens(context.Background(), clientId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Oauth2API.RevokeClientTokens``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -813,22 +813,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - tokenId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | OAuth2トークンUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.Oauth2Api.RevokeMyToken(context.Background(), tokenId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.RevokeMyToken``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + tokenId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | OAuth2トークンUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.Oauth2API.RevokeMyToken(context.Background(), tokenId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Oauth2API.RevokeMyToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -881,22 +881,22 @@ OAuth2 トークン無効化エンドポイント package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - token := "token_example" // string | 無効化するOAuth2トークンまたはOAuth2リフレッシュトークン - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.Oauth2Api.RevokeOAuth2Token(context.Background()).Token(token).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `Oauth2Api.RevokeOAuth2Token``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + token := "token_example" // string | 無効化するOAuth2トークンまたはOAuth2リフレッシュトークン + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.Oauth2API.RevokeOAuth2Token(context.Background()).Token(token).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Oauth2API.RevokeOAuth2Token``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` diff --git a/docs/OgpApi.md b/docs/OgpAPI.md similarity index 60% rename from docs/OgpApi.md rename to docs/OgpAPI.md index aaa681c..2ff3142 100644 --- a/docs/OgpApi.md +++ b/docs/OgpAPI.md @@ -1,11 +1,11 @@ -# \OgpApi +# \OgpAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DeleteOgpCache**](OgpApi.md#DeleteOgpCache) | **Delete** /ogp/cache | OGP情報のキャッシュを削除 -[**GetOgp**](OgpApi.md#GetOgp) | **Get** /ogp | OGP情報を取得 +[**DeleteOgpCache**](OgpAPI.md#DeleteOgpCache) | **Delete** /ogp/cache | OGP情報のキャッシュを削除 +[**GetOgp**](OgpAPI.md#GetOgp) | **Get** /ogp | OGP情報を取得 @@ -23,22 +23,22 @@ OGP情報のキャッシュを削除 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - url := "url_example" // string | OGPのキャッシュを削除したいURL - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.OgpApi.DeleteOgpCache(context.Background()).Url(url).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OgpApi.DeleteOgpCache``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + url := "url_example" // string | OGPのキャッシュを削除したいURL + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.OgpAPI.DeleteOgpCache(context.Background()).Url(url).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OgpAPI.DeleteOgpCache``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -87,24 +87,24 @@ OGP情報を取得 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - url := "url_example" // string | OGPを取得したいURL - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.OgpApi.GetOgp(context.Background()).Url(url).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OgpApi.GetOgp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOgp`: Ogp - fmt.Fprintf(os.Stdout, "Response from `OgpApi.GetOgp`: %v\n", resp) + url := "url_example" // string | OGPを取得したいURL + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.OgpAPI.GetOgp(context.Background()).Url(url).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OgpAPI.GetOgp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOgp`: Ogp + fmt.Fprintf(os.Stdout, "Response from `OgpAPI.GetOgp`: %v\n", resp) } ``` diff --git a/docs/PinApi.md b/docs/PinAPI.md similarity index 63% rename from docs/PinApi.md rename to docs/PinAPI.md index 7f9c31f..62ba7f9 100644 --- a/docs/PinApi.md +++ b/docs/PinAPI.md @@ -1,13 +1,13 @@ -# \PinApi +# \PinAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreatePin**](PinApi.md#CreatePin) | **Post** /messages/{messageId}/pin | ピン留めする -[**GetChannelPins**](PinApi.md#GetChannelPins) | **Get** /channels/{channelId}/pins | チャンネルピンのリストを取得 -[**GetPin**](PinApi.md#GetPin) | **Get** /messages/{messageId}/pin | ピン留めを取得 -[**RemovePin**](PinApi.md#RemovePin) | **Delete** /messages/{messageId}/pin | ピン留めを外す +[**CreatePin**](PinAPI.md#CreatePin) | **Post** /messages/{messageId}/pin | ピン留めする +[**GetChannelPins**](PinAPI.md#GetChannelPins) | **Get** /channels/{channelId}/pins | チャンネルピンのリストを取得 +[**GetPin**](PinAPI.md#GetPin) | **Get** /messages/{messageId}/pin | ピン留めを取得 +[**RemovePin**](PinAPI.md#RemovePin) | **Delete** /messages/{messageId}/pin | ピン留めを外す @@ -25,24 +25,24 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.PinApi.CreatePin(context.Background(), messageId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PinApi.CreatePin``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreatePin`: MessagePin - fmt.Fprintf(os.Stdout, "Response from `PinApi.CreatePin`: %v\n", resp) + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.PinAPI.CreatePin(context.Background(), messageId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PinAPI.CreatePin``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreatePin`: MessagePin + fmt.Fprintf(os.Stdout, "Response from `PinAPI.CreatePin`: %v\n", resp) } ``` @@ -95,24 +95,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.PinApi.GetChannelPins(context.Background(), channelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PinApi.GetChannelPins``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetChannelPins`: []Pin - fmt.Fprintf(os.Stdout, "Response from `PinApi.GetChannelPins`: %v\n", resp) + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.PinAPI.GetChannelPins(context.Background(), channelId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PinAPI.GetChannelPins``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetChannelPins`: []Pin + fmt.Fprintf(os.Stdout, "Response from `PinAPI.GetChannelPins`: %v\n", resp) } ``` @@ -165,24 +165,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.PinApi.GetPin(context.Background(), messageId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PinApi.GetPin``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetPin`: MessagePin - fmt.Fprintf(os.Stdout, "Response from `PinApi.GetPin`: %v\n", resp) + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.PinAPI.GetPin(context.Background(), messageId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PinAPI.GetPin``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetPin`: MessagePin + fmt.Fprintf(os.Stdout, "Response from `PinAPI.GetPin`: %v\n", resp) } ``` @@ -235,22 +235,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.PinApi.RemovePin(context.Background(), messageId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PinApi.RemovePin``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.PinAPI.RemovePin(context.Background(), messageId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PinAPI.RemovePin``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` diff --git a/docs/PublicApi.md b/docs/PublicAPI.md similarity index 60% rename from docs/PublicApi.md rename to docs/PublicAPI.md index a3b4fb4..d02b790 100644 --- a/docs/PublicApi.md +++ b/docs/PublicAPI.md @@ -1,11 +1,11 @@ -# \PublicApi +# \PublicAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetPublicUserIcon**](PublicApi.md#GetPublicUserIcon) | **Get** /public/icon/{username} | ユーザーのアイコン画像を取得 -[**GetServerVersion**](PublicApi.md#GetServerVersion) | **Get** /version | バージョンを取得 +[**GetPublicUserIcon**](PublicAPI.md#GetPublicUserIcon) | **Get** /public/icon/{username} | ユーザーのアイコン画像を取得 +[**GetServerVersion**](PublicAPI.md#GetServerVersion) | **Get** /version | バージョンを取得 @@ -23,24 +23,24 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - username := "username_example" // string | ユーザー名 - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.PublicApi.GetPublicUserIcon(context.Background(), username).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.GetPublicUserIcon``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetPublicUserIcon`: *os.File - fmt.Fprintf(os.Stdout, "Response from `PublicApi.GetPublicUserIcon`: %v\n", resp) + username := "username_example" // string | ユーザー名 + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.PublicAPI.GetPublicUserIcon(context.Background(), username).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetPublicUserIcon``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetPublicUserIcon`: *os.File + fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetPublicUserIcon`: %v\n", resp) } ``` @@ -93,23 +93,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.PublicApi.GetServerVersion(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.GetServerVersion``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetServerVersion`: Version - fmt.Fprintf(os.Stdout, "Response from `PublicApi.GetServerVersion`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.PublicAPI.GetServerVersion(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetServerVersion``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetServerVersion`: Version + fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetServerVersion`: %v\n", resp) } ``` diff --git a/docs/QallApi.md b/docs/QallAPI.md similarity index 58% rename from docs/QallApi.md rename to docs/QallAPI.md index 382d6a6..512fbb6 100644 --- a/docs/QallApi.md +++ b/docs/QallAPI.md @@ -1,19 +1,19 @@ -# \QallApi +# \QallAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ChangeParticipantRole**](QallApi.md#ChangeParticipantRole) | **Patch** /qall/rooms/{roomId}/participants | ルームでの発言権限を変更 -[**GetLiveKitToken**](QallApi.md#GetLiveKitToken) | **Get** /qall/token | LiveKitトークンを取得 -[**GetQallEndpoints**](QallApi.md#GetQallEndpoints) | **Get** /qall/endpoints | LiveKitエンドポイントを取得 -[**GetRoomMetadata**](QallApi.md#GetRoomMetadata) | **Get** /qall/rooms/{roomId}/metadata | ルームのメタデータを取得 -[**GetRooms**](QallApi.md#GetRooms) | **Get** /qall/rooms | ルームと参加者の一覧を取得 -[**GetSoundboardList**](QallApi.md#GetSoundboardList) | **Get** /qall/soundboard | サウンドボード用の音声一覧を取得 -[**LiveKitWebhook**](QallApi.md#LiveKitWebhook) | **Post** /qall/webhook | LiveKit Webhook受信 -[**PostSoundboard**](QallApi.md#PostSoundboard) | **Post** /qall/soundboard | サウンドボード用の短い音声ファイルをアップロード -[**PostSoundboardPlay**](QallApi.md#PostSoundboardPlay) | **Post** /qall/soundboard/play | アップロード済み音声を LiveKit ルームで再生 -[**UpdateRoomMetadata**](QallApi.md#UpdateRoomMetadata) | **Patch** /qall/rooms/{roomId}/metadata | ルームのメタデータを更新 +[**ChangeParticipantRole**](QallAPI.md#ChangeParticipantRole) | **Patch** /qall/rooms/{roomId}/participants | ルームでの発言権限を変更 +[**GetLiveKitToken**](QallAPI.md#GetLiveKitToken) | **Get** /qall/token | LiveKitトークンを取得 +[**GetQallEndpoints**](QallAPI.md#GetQallEndpoints) | **Get** /qall/endpoints | LiveKitエンドポイントを取得 +[**GetRoomMetadata**](QallAPI.md#GetRoomMetadata) | **Get** /qall/rooms/{roomId}/metadata | ルームのメタデータを取得 +[**GetRooms**](QallAPI.md#GetRooms) | **Get** /qall/rooms | ルームと参加者の一覧を取得 +[**GetSoundboardList**](QallAPI.md#GetSoundboardList) | **Get** /qall/soundboard | サウンドボード用の音声一覧を取得 +[**LiveKitWebhook**](QallAPI.md#LiveKitWebhook) | **Post** /qall/webhook | LiveKit Webhook受信 +[**PostSoundboard**](QallAPI.md#PostSoundboard) | **Post** /qall/soundboard | サウンドボード用の短い音声ファイルをアップロード +[**PostSoundboardPlay**](QallAPI.md#PostSoundboardPlay) | **Post** /qall/soundboard/play | アップロード済み音声を LiveKit ルームで再生 +[**UpdateRoomMetadata**](QallAPI.md#UpdateRoomMetadata) | **Patch** /qall/rooms/{roomId}/metadata | ルームのメタデータを更新 @@ -31,25 +31,25 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - roomId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ルームUUID - qallParticipantRequest := []traq.QallParticipantRequest{*traq.NewQallParticipantRequest([]traq.QallParticipantRequestUsersInner{*traq.NewQallParticipantRequestUsersInner()})} // []QallParticipantRequest | 発言権限を変更する参加者の情報 - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.QallApi.ChangeParticipantRole(context.Background(), roomId).QallParticipantRequest(qallParticipantRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `QallApi.ChangeParticipantRole``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ChangeParticipantRole`: QallParticipantResponse - fmt.Fprintf(os.Stdout, "Response from `QallApi.ChangeParticipantRole`: %v\n", resp) + roomId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ルームUUID + qallParticipantRequest := []traq.QallParticipantRequest{*traq.NewQallParticipantRequest([]traq.QallParticipantRequestUsersInner{*traq.NewQallParticipantRequestUsersInner()})} // []QallParticipantRequest | 発言権限を変更する参加者の情報 + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.QallAPI.ChangeParticipantRole(context.Background(), roomId).QallParticipantRequest(qallParticipantRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QallAPI.ChangeParticipantRole``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ChangeParticipantRole`: QallParticipantResponse + fmt.Fprintf(os.Stdout, "Response from `QallAPI.ChangeParticipantRole`: %v\n", resp) } ``` @@ -103,25 +103,25 @@ LiveKitトークンを取得 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - roomId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ルームUUID (optional) - isWebinar := true // bool | ウェビナールームかどうか(デフォルト false) (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.QallApi.GetLiveKitToken(context.Background()).RoomId(roomId).IsWebinar(isWebinar).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `QallApi.GetLiveKitToken``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetLiveKitToken`: QallTokenResponse - fmt.Fprintf(os.Stdout, "Response from `QallApi.GetLiveKitToken`: %v\n", resp) + roomId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ルームUUID (optional) + isWebinar := true // bool | ウェビナールームかどうか(デフォルト false) (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.QallAPI.GetLiveKitToken(context.Background()).RoomId(roomId).IsWebinar(isWebinar).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QallAPI.GetLiveKitToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetLiveKitToken`: QallTokenResponse + fmt.Fprintf(os.Stdout, "Response from `QallAPI.GetLiveKitToken`: %v\n", resp) } ``` @@ -171,23 +171,23 @@ LiveKitエンドポイントを取得 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.QallApi.GetQallEndpoints(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `QallApi.GetQallEndpoints``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetQallEndpoints`: QallEndpointResponse - fmt.Fprintf(os.Stdout, "Response from `QallApi.GetQallEndpoints`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.QallAPI.GetQallEndpoints(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QallAPI.GetQallEndpoints``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetQallEndpoints`: QallEndpointResponse + fmt.Fprintf(os.Stdout, "Response from `QallAPI.GetQallEndpoints`: %v\n", resp) } ``` @@ -232,24 +232,24 @@ Other parameters are passed through a pointer to a apiGetQallEndpointsRequest st package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - roomId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ルームUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.QallApi.GetRoomMetadata(context.Background(), roomId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `QallApi.GetRoomMetadata``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRoomMetadata`: QallMetadataResponse - fmt.Fprintf(os.Stdout, "Response from `QallApi.GetRoomMetadata`: %v\n", resp) + roomId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ルームUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.QallAPI.GetRoomMetadata(context.Background(), roomId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QallAPI.GetRoomMetadata``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRoomMetadata`: QallMetadataResponse + fmt.Fprintf(os.Stdout, "Response from `QallAPI.GetRoomMetadata`: %v\n", resp) } ``` @@ -302,23 +302,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.QallApi.GetRooms(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `QallApi.GetRooms``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRooms`: []QallRoomWithParticipants - fmt.Fprintf(os.Stdout, "Response from `QallApi.GetRooms`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.QallAPI.GetRooms(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QallAPI.GetRooms``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRooms`: []QallRoomWithParticipants + fmt.Fprintf(os.Stdout, "Response from `QallAPI.GetRooms`: %v\n", resp) } ``` @@ -363,23 +363,23 @@ Other parameters are passed through a pointer to a apiGetRoomsRequest struct via package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.QallApi.GetSoundboardList(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `QallApi.GetSoundboardList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetSoundboardList`: []SoundboardItem - fmt.Fprintf(os.Stdout, "Response from `QallApi.GetSoundboardList`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.QallAPI.GetSoundboardList(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QallAPI.GetSoundboardList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetSoundboardList`: []SoundboardItem + fmt.Fprintf(os.Stdout, "Response from `QallAPI.GetSoundboardList`: %v\n", resp) } ``` @@ -424,22 +424,22 @@ LiveKit Webhook受信 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - body := map[string]interface{}{ ... } // map[string]interface{} | - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.QallApi.LiveKitWebhook(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `QallApi.LiveKitWebhook``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.QallAPI.LiveKitWebhook(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QallAPI.LiveKitWebhook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -488,26 +488,26 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - audio := os.NewFile(1234, "some_file") // *os.File | アップロードする音声ファイル(20秒以内) - soundName := "soundName_example" // string | ユーザが自由につけるサウンド名 - stampId := "stampId_example" // string | アイコンスタンプID (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.QallApi.PostSoundboard(context.Background()).Audio(audio).SoundName(soundName).StampId(stampId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `QallApi.PostSoundboard``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PostSoundboard`: SoundboardUploadResponse - fmt.Fprintf(os.Stdout, "Response from `QallApi.PostSoundboard`: %v\n", resp) + audio := os.NewFile(1234, "some_file") // *os.File | アップロードする音声ファイル(20秒以内) + soundName := "soundName_example" // string | ユーザが自由につけるサウンド名 + stampId := "stampId_example" // string | アイコンスタンプID (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.QallAPI.PostSoundboard(context.Background()).Audio(audio).SoundName(soundName).StampId(stampId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QallAPI.PostSoundboard``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PostSoundboard`: SoundboardUploadResponse + fmt.Fprintf(os.Stdout, "Response from `QallAPI.PostSoundboard`: %v\n", resp) } ``` @@ -558,24 +558,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - soundboardPlayRequest := *traq.NewSoundboardPlayRequest("SoundId_example", "RoomName_example") // SoundboardPlayRequest | - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.QallApi.PostSoundboardPlay(context.Background()).SoundboardPlayRequest(soundboardPlayRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `QallApi.PostSoundboardPlay``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PostSoundboardPlay`: SoundboardPlayResponse - fmt.Fprintf(os.Stdout, "Response from `QallApi.PostSoundboardPlay`: %v\n", resp) + soundboardPlayRequest := *traq.NewSoundboardPlayRequest("SoundId_example", "RoomName_example") // SoundboardPlayRequest | + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.QallAPI.PostSoundboardPlay(context.Background()).SoundboardPlayRequest(soundboardPlayRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QallAPI.PostSoundboardPlay``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PostSoundboardPlay`: SoundboardPlayResponse + fmt.Fprintf(os.Stdout, "Response from `QallAPI.PostSoundboardPlay`: %v\n", resp) } ``` @@ -624,23 +624,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - roomId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ルームUUID - qallMetadataRequest := *traq.NewQallMetadataRequest() // QallMetadataRequest | ルームのメタデータ - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.QallApi.UpdateRoomMetadata(context.Background(), roomId).QallMetadataRequest(qallMetadataRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `QallApi.UpdateRoomMetadata``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + roomId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ルームUUID + qallMetadataRequest := *traq.NewQallMetadataRequest() // QallMetadataRequest | ルームのメタデータ + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.QallAPI.UpdateRoomMetadata(context.Background(), roomId).QallMetadataRequest(qallMetadataRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QallAPI.UpdateRoomMetadata``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` diff --git a/docs/StampApi.md b/docs/StampAPI.md similarity index 61% rename from docs/StampApi.md rename to docs/StampAPI.md index 857a3bb..844038d 100644 --- a/docs/StampApi.md +++ b/docs/StampAPI.md @@ -1,26 +1,26 @@ -# \StampApi +# \StampAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AddMessageStamp**](StampApi.md#AddMessageStamp) | **Post** /messages/{messageId}/stamps/{stampId} | スタンプを押す -[**ChangeStampImage**](StampApi.md#ChangeStampImage) | **Put** /stamps/{stampId}/image | スタンプ画像を変更 -[**CreateStamp**](StampApi.md#CreateStamp) | **Post** /stamps | スタンプを作成 -[**CreateStampPalette**](StampApi.md#CreateStampPalette) | **Post** /stamp-palettes | スタンプパレットを作成 -[**DeleteStamp**](StampApi.md#DeleteStamp) | **Delete** /stamps/{stampId} | スタンプを削除 -[**DeleteStampPalette**](StampApi.md#DeleteStampPalette) | **Delete** /stamp-palettes/{paletteId} | スタンプパレットを削除 -[**EditStamp**](StampApi.md#EditStamp) | **Patch** /stamps/{stampId} | スタンプ情報を変更 -[**EditStampPalette**](StampApi.md#EditStampPalette) | **Patch** /stamp-palettes/{paletteId} | スタンプパレットを編集 -[**GetMessageStamps**](StampApi.md#GetMessageStamps) | **Get** /messages/{messageId}/stamps | メッセージのスタンプリストを取得 -[**GetMyStampHistory**](StampApi.md#GetMyStampHistory) | **Get** /users/me/stamp-history | スタンプ履歴を取得 -[**GetStamp**](StampApi.md#GetStamp) | **Get** /stamps/{stampId} | スタンプ情報を取得 -[**GetStampImage**](StampApi.md#GetStampImage) | **Get** /stamps/{stampId}/image | スタンプ画像を取得 -[**GetStampPalette**](StampApi.md#GetStampPalette) | **Get** /stamp-palettes/{paletteId} | スタンプパレットを取得 -[**GetStampPalettes**](StampApi.md#GetStampPalettes) | **Get** /stamp-palettes | スタンプパレットのリストを取得 -[**GetStampStats**](StampApi.md#GetStampStats) | **Get** /stamps/{stampId}/stats | スタンプ統計情報を取得 -[**GetStamps**](StampApi.md#GetStamps) | **Get** /stamps | スタンプリストを取得 -[**RemoveMessageStamp**](StampApi.md#RemoveMessageStamp) | **Delete** /messages/{messageId}/stamps/{stampId} | スタンプを消す +[**AddMessageStamp**](StampAPI.md#AddMessageStamp) | **Post** /messages/{messageId}/stamps/{stampId} | スタンプを押す +[**ChangeStampImage**](StampAPI.md#ChangeStampImage) | **Put** /stamps/{stampId}/image | スタンプ画像を変更 +[**CreateStamp**](StampAPI.md#CreateStamp) | **Post** /stamps | スタンプを作成 +[**CreateStampPalette**](StampAPI.md#CreateStampPalette) | **Post** /stamp-palettes | スタンプパレットを作成 +[**DeleteStamp**](StampAPI.md#DeleteStamp) | **Delete** /stamps/{stampId} | スタンプを削除 +[**DeleteStampPalette**](StampAPI.md#DeleteStampPalette) | **Delete** /stamp-palettes/{paletteId} | スタンプパレットを削除 +[**EditStamp**](StampAPI.md#EditStamp) | **Patch** /stamps/{stampId} | スタンプ情報を変更 +[**EditStampPalette**](StampAPI.md#EditStampPalette) | **Patch** /stamp-palettes/{paletteId} | スタンプパレットを編集 +[**GetMessageStamps**](StampAPI.md#GetMessageStamps) | **Get** /messages/{messageId}/stamps | メッセージのスタンプリストを取得 +[**GetMyStampHistory**](StampAPI.md#GetMyStampHistory) | **Get** /users/me/stamp-history | スタンプ履歴を取得 +[**GetStamp**](StampAPI.md#GetStamp) | **Get** /stamps/{stampId} | スタンプ情報を取得 +[**GetStampImage**](StampAPI.md#GetStampImage) | **Get** /stamps/{stampId}/image | スタンプ画像を取得 +[**GetStampPalette**](StampAPI.md#GetStampPalette) | **Get** /stamp-palettes/{paletteId} | スタンプパレットを取得 +[**GetStampPalettes**](StampAPI.md#GetStampPalettes) | **Get** /stamp-palettes | スタンプパレットのリストを取得 +[**GetStampStats**](StampAPI.md#GetStampStats) | **Get** /stamps/{stampId}/stats | スタンプ統計情報を取得 +[**GetStamps**](StampAPI.md#GetStamps) | **Get** /stamps | スタンプリストを取得 +[**RemoveMessageStamp**](StampAPI.md#RemoveMessageStamp) | **Delete** /messages/{messageId}/stamps/{stampId} | スタンプを消す @@ -38,24 +38,24 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID - postMessageStampRequest := *traq.NewPostMessageStampRequest(int32(123)) // PostMessageStampRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.StampApi.AddMessageStamp(context.Background(), messageId, stampId).PostMessageStampRequest(postMessageStampRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.AddMessageStamp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID + postMessageStampRequest := *traq.NewPostMessageStampRequest(int32(123)) // PostMessageStampRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.StampAPI.AddMessageStamp(context.Background(), messageId, stampId).PostMessageStampRequest(postMessageStampRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.AddMessageStamp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -111,23 +111,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID - file := os.NewFile(1234, "some_file") // *os.File | スタンプ画像(1MBまでのpng, jpeg, gif) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.StampApi.ChangeStampImage(context.Background(), stampId).File(file).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.ChangeStampImage``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID + file := os.NewFile(1234, "some_file") // *os.File | スタンプ画像(1MBまでのpng, jpeg, gif) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.StampAPI.ChangeStampImage(context.Background(), stampId).File(file).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.ChangeStampImage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -181,25 +181,25 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - name := "name_example" // string | スタンプ名 - file := os.NewFile(1234, "some_file") // *os.File | スタンプ画像(1MBまでのpng, jpeg, gif) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.StampApi.CreateStamp(context.Background()).Name(name).File(file).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.CreateStamp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateStamp`: Stamp - fmt.Fprintf(os.Stdout, "Response from `StampApi.CreateStamp`: %v\n", resp) + name := "name_example" // string | スタンプ名 + file := os.NewFile(1234, "some_file") // *os.File | スタンプ画像(1MBまでのpng, jpeg, gif) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.StampAPI.CreateStamp(context.Background()).Name(name).File(file).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.CreateStamp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateStamp`: Stamp + fmt.Fprintf(os.Stdout, "Response from `StampAPI.CreateStamp`: %v\n", resp) } ``` @@ -249,24 +249,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postStampPaletteRequest := *traq.NewPostStampPaletteRequest([]string{"Stamps_example"}, "Name_example", "Description_example") // PostStampPaletteRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.StampApi.CreateStampPalette(context.Background()).PostStampPaletteRequest(postStampPaletteRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.CreateStampPalette``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateStampPalette`: StampPalette - fmt.Fprintf(os.Stdout, "Response from `StampApi.CreateStampPalette`: %v\n", resp) + postStampPaletteRequest := *traq.NewPostStampPaletteRequest([]string{"Stamps_example"}, "Name_example", "Description_example") // PostStampPaletteRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.StampAPI.CreateStampPalette(context.Background()).PostStampPaletteRequest(postStampPaletteRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.CreateStampPalette``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateStampPalette`: StampPalette + fmt.Fprintf(os.Stdout, "Response from `StampAPI.CreateStampPalette`: %v\n", resp) } ``` @@ -315,22 +315,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.StampApi.DeleteStamp(context.Background(), stampId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.DeleteStamp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.StampAPI.DeleteStamp(context.Background(), stampId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.DeleteStamp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -383,22 +383,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - paletteId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプパレットUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.StampApi.DeleteStampPalette(context.Background(), paletteId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.DeleteStampPalette``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + paletteId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプパレットUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.StampAPI.DeleteStampPalette(context.Background(), paletteId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.DeleteStampPalette``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -451,23 +451,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID - patchStampRequest := *traq.NewPatchStampRequest() // PatchStampRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.StampApi.EditStamp(context.Background(), stampId).PatchStampRequest(patchStampRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.EditStamp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID + patchStampRequest := *traq.NewPatchStampRequest() // PatchStampRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.StampAPI.EditStamp(context.Background(), stampId).PatchStampRequest(patchStampRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.EditStamp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -521,23 +521,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - paletteId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプパレットUUID - patchStampPaletteRequest := *traq.NewPatchStampPaletteRequest() // PatchStampPaletteRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.StampApi.EditStampPalette(context.Background(), paletteId).PatchStampPaletteRequest(patchStampPaletteRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.EditStampPalette``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + paletteId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプパレットUUID + patchStampPaletteRequest := *traq.NewPatchStampPaletteRequest() // PatchStampPaletteRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.StampAPI.EditStampPalette(context.Background(), paletteId).PatchStampPaletteRequest(patchStampPaletteRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.EditStampPalette``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -591,24 +591,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.StampApi.GetMessageStamps(context.Background(), messageId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.GetMessageStamps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMessageStamps`: []MessageStamp - fmt.Fprintf(os.Stdout, "Response from `StampApi.GetMessageStamps`: %v\n", resp) + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.StampAPI.GetMessageStamps(context.Background(), messageId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.GetMessageStamps``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMessageStamps`: []MessageStamp + fmt.Fprintf(os.Stdout, "Response from `StampAPI.GetMessageStamps`: %v\n", resp) } ``` @@ -661,24 +661,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - limit := int32(56) // int32 | 件数 (optional) (default to 100) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.StampApi.GetMyStampHistory(context.Background()).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.GetMyStampHistory``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyStampHistory`: []StampHistoryEntry - fmt.Fprintf(os.Stdout, "Response from `StampApi.GetMyStampHistory`: %v\n", resp) + limit := int32(56) // int32 | 件数 (optional) (default to 100) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.StampAPI.GetMyStampHistory(context.Background()).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.GetMyStampHistory``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyStampHistory`: []StampHistoryEntry + fmt.Fprintf(os.Stdout, "Response from `StampAPI.GetMyStampHistory`: %v\n", resp) } ``` @@ -727,24 +727,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.StampApi.GetStamp(context.Background(), stampId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.GetStamp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetStamp`: Stamp - fmt.Fprintf(os.Stdout, "Response from `StampApi.GetStamp`: %v\n", resp) + stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.StampAPI.GetStamp(context.Background(), stampId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.GetStamp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetStamp`: Stamp + fmt.Fprintf(os.Stdout, "Response from `StampAPI.GetStamp`: %v\n", resp) } ``` @@ -797,24 +797,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.StampApi.GetStampImage(context.Background(), stampId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.GetStampImage``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetStampImage`: *os.File - fmt.Fprintf(os.Stdout, "Response from `StampApi.GetStampImage`: %v\n", resp) + stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.StampAPI.GetStampImage(context.Background(), stampId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.GetStampImage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetStampImage`: *os.File + fmt.Fprintf(os.Stdout, "Response from `StampAPI.GetStampImage`: %v\n", resp) } ``` @@ -867,24 +867,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - paletteId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプパレットUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.StampApi.GetStampPalette(context.Background(), paletteId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.GetStampPalette``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetStampPalette`: StampPalette - fmt.Fprintf(os.Stdout, "Response from `StampApi.GetStampPalette`: %v\n", resp) + paletteId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプパレットUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.StampAPI.GetStampPalette(context.Background(), paletteId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.GetStampPalette``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetStampPalette`: StampPalette + fmt.Fprintf(os.Stdout, "Response from `StampAPI.GetStampPalette`: %v\n", resp) } ``` @@ -937,23 +937,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.StampApi.GetStampPalettes(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.GetStampPalettes``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetStampPalettes`: []StampPalette - fmt.Fprintf(os.Stdout, "Response from `StampApi.GetStampPalettes`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.StampAPI.GetStampPalettes(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.GetStampPalettes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetStampPalettes`: []StampPalette + fmt.Fprintf(os.Stdout, "Response from `StampAPI.GetStampPalettes`: %v\n", resp) } ``` @@ -998,24 +998,24 @@ Other parameters are passed through a pointer to a apiGetStampPalettesRequest st package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.StampApi.GetStampStats(context.Background(), stampId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.GetStampStats``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetStampStats`: StampStats - fmt.Fprintf(os.Stdout, "Response from `StampApi.GetStampStats`: %v\n", resp) + stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.StampAPI.GetStampStats(context.Background(), stampId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.GetStampStats``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetStampStats`: StampStats + fmt.Fprintf(os.Stdout, "Response from `StampAPI.GetStampStats`: %v\n", resp) } ``` @@ -1068,25 +1068,25 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - includeUnicode := true // bool | Unicode絵文字を含ませるかどうか Deprecated: typeクエリを指定しなければ全てのスタンプを取得できるため、そちらを利用してください (optional) (default to true) - type_ := "type__example" // string | 取得するスタンプの種類 (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.StampApi.GetStamps(context.Background()).IncludeUnicode(includeUnicode).Type_(type_).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.GetStamps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetStamps`: []StampWithThumbnail - fmt.Fprintf(os.Stdout, "Response from `StampApi.GetStamps`: %v\n", resp) + includeUnicode := true // bool | Unicode絵文字を含ませるかどうか Deprecated: typeクエリを指定しなければ全てのスタンプを取得できるため、そちらを利用してください (optional) (default to true) + type_ := "type__example" // string | 取得するスタンプの種類 (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.StampAPI.GetStamps(context.Background()).IncludeUnicode(includeUnicode).Type_(type_).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.GetStamps``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetStamps`: []StampWithThumbnail + fmt.Fprintf(os.Stdout, "Response from `StampAPI.GetStamps`: %v\n", resp) } ``` @@ -1136,23 +1136,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID - stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.StampApi.RemoveMessageStamp(context.Background(), messageId, stampId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StampApi.RemoveMessageStamp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + messageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | メッセージUUID + stampId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | スタンプUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.StampAPI.RemoveMessageStamp(context.Background(), messageId, stampId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StampAPI.RemoveMessageStamp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` diff --git a/docs/StarApi.md b/docs/StarAPI.md similarity index 62% rename from docs/StarApi.md rename to docs/StarAPI.md index d608c39..f0f4bfe 100644 --- a/docs/StarApi.md +++ b/docs/StarAPI.md @@ -1,12 +1,12 @@ -# \StarApi +# \StarAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AddMyStar**](StarApi.md#AddMyStar) | **Post** /users/me/stars | チャンネルをスターに追加 -[**GetMyStars**](StarApi.md#GetMyStars) | **Get** /users/me/stars | スターチャンネルリストを取得 -[**RemoveMyStar**](StarApi.md#RemoveMyStar) | **Delete** /users/me/stars/{channelId} | チャンネルをスターから削除します +[**AddMyStar**](StarAPI.md#AddMyStar) | **Post** /users/me/stars | チャンネルをスターに追加 +[**GetMyStars**](StarAPI.md#GetMyStars) | **Get** /users/me/stars | スターチャンネルリストを取得 +[**RemoveMyStar**](StarAPI.md#RemoveMyStar) | **Delete** /users/me/stars/{channelId} | チャンネルをスターから削除します @@ -24,22 +24,22 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postStarRequest := *traq.NewPostStarRequest("ChannelId_example") // PostStarRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.StarApi.AddMyStar(context.Background()).PostStarRequest(postStarRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StarApi.AddMyStar``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + postStarRequest := *traq.NewPostStarRequest("ChannelId_example") // PostStarRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.StarAPI.AddMyStar(context.Background()).PostStarRequest(postStarRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StarAPI.AddMyStar``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -88,23 +88,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.StarApi.GetMyStars(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StarApi.GetMyStars``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyStars`: []string - fmt.Fprintf(os.Stdout, "Response from `StarApi.GetMyStars`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.StarAPI.GetMyStars(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StarAPI.GetMyStars``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyStars`: []string + fmt.Fprintf(os.Stdout, "Response from `StarAPI.GetMyStars`: %v\n", resp) } ``` @@ -149,22 +149,22 @@ Other parameters are passed through a pointer to a apiGetMyStarsRequest struct v package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.StarApi.RemoveMyStar(context.Background(), channelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `StarApi.RemoveMyStar``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + channelId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | チャンネルUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.StarAPI.RemoveMyStar(context.Background(), channelId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StarAPI.RemoveMyStar``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` diff --git a/docs/UserApi.md b/docs/UserAPI.md similarity index 60% rename from docs/UserApi.md rename to docs/UserAPI.md index 98eb10b..ba08293 100644 --- a/docs/UserApi.md +++ b/docs/UserAPI.md @@ -1,24 +1,24 @@ -# \UserApi +# \UserAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AddUserTag**](UserApi.md#AddUserTag) | **Post** /users/{userId}/tags | ユーザーにタグを追加 -[**ChangeUserIcon**](UserApi.md#ChangeUserIcon) | **Put** /users/{userId}/icon | ユーザーのアイコン画像を変更します -[**ChangeUserPassword**](UserApi.md#ChangeUserPassword) | **Put** /users/{userId}/password | ユーザーのパスワードを変更 -[**CreateUser**](UserApi.md#CreateUser) | **Post** /users | ユーザーを登録 -[**EditUser**](UserApi.md#EditUser) | **Patch** /users/{userId} | ユーザー情報を変更 -[**EditUserTag**](UserApi.md#EditUserTag) | **Patch** /users/{userId}/tags/{tagId} | ユーザーのタグを編集 -[**GetDirectMessages**](UserApi.md#GetDirectMessages) | **Get** /users/{userId}/messages | ダイレクトメッセージのリストを取得 -[**GetUser**](UserApi.md#GetUser) | **Get** /users/{userId} | ユーザー詳細情報を取得 -[**GetUserDMChannel**](UserApi.md#GetUserDMChannel) | **Get** /users/{userId}/dm-channel | DMチャンネル情報を取得 -[**GetUserIcon**](UserApi.md#GetUserIcon) | **Get** /users/{userId}/icon | ユーザーのアイコン画像を取得 -[**GetUserStats**](UserApi.md#GetUserStats) | **Get** /users/{userId}/stats | ユーザー統計情報を取得 -[**GetUserTags**](UserApi.md#GetUserTags) | **Get** /users/{userId}/tags | ユーザーのタグリストを取得 -[**GetUsers**](UserApi.md#GetUsers) | **Get** /users | ユーザーのリストを取得 -[**PostDirectMessage**](UserApi.md#PostDirectMessage) | **Post** /users/{userId}/messages | ダイレクトメッセージを送信 -[**RemoveUserTag**](UserApi.md#RemoveUserTag) | **Delete** /users/{userId}/tags/{tagId} | ユーザーからタグを削除します +[**AddUserTag**](UserAPI.md#AddUserTag) | **Post** /users/{userId}/tags | ユーザーにタグを追加 +[**ChangeUserIcon**](UserAPI.md#ChangeUserIcon) | **Put** /users/{userId}/icon | ユーザーのアイコン画像を変更します +[**ChangeUserPassword**](UserAPI.md#ChangeUserPassword) | **Put** /users/{userId}/password | ユーザーのパスワードを変更 +[**CreateUser**](UserAPI.md#CreateUser) | **Post** /users | ユーザーを登録 +[**EditUser**](UserAPI.md#EditUser) | **Patch** /users/{userId} | ユーザー情報を変更 +[**EditUserTag**](UserAPI.md#EditUserTag) | **Patch** /users/{userId}/tags/{tagId} | ユーザーのタグを編集 +[**GetDirectMessages**](UserAPI.md#GetDirectMessages) | **Get** /users/{userId}/messages | ダイレクトメッセージのリストを取得 +[**GetUser**](UserAPI.md#GetUser) | **Get** /users/{userId} | ユーザー詳細情報を取得 +[**GetUserDMChannel**](UserAPI.md#GetUserDMChannel) | **Get** /users/{userId}/dm-channel | DMチャンネル情報を取得 +[**GetUserIcon**](UserAPI.md#GetUserIcon) | **Get** /users/{userId}/icon | ユーザーのアイコン画像を取得 +[**GetUserStats**](UserAPI.md#GetUserStats) | **Get** /users/{userId}/stats | ユーザー統計情報を取得 +[**GetUserTags**](UserAPI.md#GetUserTags) | **Get** /users/{userId}/tags | ユーザーのタグリストを取得 +[**GetUsers**](UserAPI.md#GetUsers) | **Get** /users | ユーザーのリストを取得 +[**PostDirectMessage**](UserAPI.md#PostDirectMessage) | **Post** /users/{userId}/messages | ダイレクトメッセージを送信 +[**RemoveUserTag**](UserAPI.md#RemoveUserTag) | **Delete** /users/{userId}/tags/{tagId} | ユーザーからタグを削除します @@ -36,25 +36,25 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - postUserTagRequest := *traq.NewPostUserTagRequest("Tag_example") // PostUserTagRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.UserApi.AddUserTag(context.Background(), userId).PostUserTagRequest(postUserTagRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserApi.AddUserTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddUserTag`: UserTag - fmt.Fprintf(os.Stdout, "Response from `UserApi.AddUserTag`: %v\n", resp) + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + postUserTagRequest := *traq.NewPostUserTagRequest("Tag_example") // PostUserTagRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.UserAPI.AddUserTag(context.Background(), userId).PostUserTagRequest(postUserTagRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.AddUserTag``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddUserTag`: UserTag + fmt.Fprintf(os.Stdout, "Response from `UserAPI.AddUserTag`: %v\n", resp) } ``` @@ -108,23 +108,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - file := os.NewFile(1234, "some_file") // *os.File | アイコン画像(2MBまでのpng, jpeg, gif) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.UserApi.ChangeUserIcon(context.Background(), userId).File(file).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserApi.ChangeUserIcon``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + file := os.NewFile(1234, "some_file") // *os.File | アイコン画像(2MBまでのpng, jpeg, gif) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.UserAPI.ChangeUserIcon(context.Background(), userId).File(file).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.ChangeUserIcon``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -178,23 +178,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - putUserPasswordRequest := *traq.NewPutUserPasswordRequest("NewPassword_example") // PutUserPasswordRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.UserApi.ChangeUserPassword(context.Background(), userId).PutUserPasswordRequest(putUserPasswordRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserApi.ChangeUserPassword``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + putUserPasswordRequest := *traq.NewPutUserPasswordRequest("NewPassword_example") // PutUserPasswordRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.UserAPI.ChangeUserPassword(context.Background(), userId).PutUserPasswordRequest(putUserPasswordRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.ChangeUserPassword``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -248,24 +248,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postUserRequest := *traq.NewPostUserRequest("Name_example") // PostUserRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.UserApi.CreateUser(context.Background()).PostUserRequest(postUserRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateUser`: UserDetail - fmt.Fprintf(os.Stdout, "Response from `UserApi.CreateUser`: %v\n", resp) + postUserRequest := *traq.NewPostUserRequest("Name_example") // PostUserRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.UserAPI.CreateUser(context.Background()).PostUserRequest(postUserRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.CreateUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateUser`: UserDetail + fmt.Fprintf(os.Stdout, "Response from `UserAPI.CreateUser`: %v\n", resp) } ``` @@ -314,23 +314,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - patchUserRequest := *traq.NewPatchUserRequest() // PatchUserRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.UserApi.EditUser(context.Background(), userId).PatchUserRequest(patchUserRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserApi.EditUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + patchUserRequest := *traq.NewPatchUserRequest() // PatchUserRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.UserAPI.EditUser(context.Background(), userId).PatchUserRequest(patchUserRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.EditUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -384,24 +384,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID - patchUserTagRequest := *traq.NewPatchUserTagRequest(false) // PatchUserTagRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.UserApi.EditUserTag(context.Background(), userId, tagId).PatchUserTagRequest(patchUserTagRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserApi.EditUserTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID + patchUserTagRequest := *traq.NewPatchUserTagRequest(false) // PatchUserTagRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.UserAPI.EditUserTag(context.Background(), userId, tagId).PatchUserTagRequest(patchUserTagRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.EditUserTag``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -457,31 +457,31 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" + "context" + "fmt" + "os" "time" - traq "github.com/traPtitech/go-traq" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - limit := int32(50) // int32 | 取得する件数 (optional) - offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) - since := time.Now() // time.Time | 取得する時間範囲の開始日時 (optional) (default to "0000-01-01T00:00Z") - until := time.Now() // time.Time | 取得する時間範囲の終了日時 (optional) - inclusive := true // bool | 範囲の端を含めるかどうか (optional) (default to false) - order := "order_example" // string | 昇順か降順か (optional) (default to "desc") - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.UserApi.GetDirectMessages(context.Background(), userId).Limit(limit).Offset(offset).Since(since).Until(until).Inclusive(inclusive).Order(order).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetDirectMessages``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetDirectMessages`: []Message - fmt.Fprintf(os.Stdout, "Response from `UserApi.GetDirectMessages`: %v\n", resp) + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + limit := int32(50) // int32 | 取得する件数 (optional) + offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) + since := time.Now() // time.Time | 取得する時間範囲の開始日時 (optional) (default to "0000-01-01T00:00Z") + until := time.Now() // time.Time | 取得する時間範囲の終了日時 (optional) + inclusive := true // bool | 範囲の端を含めるかどうか (optional) (default to false) + order := "order_example" // string | 昇順か降順か (optional) (default to "desc") + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.UserAPI.GetDirectMessages(context.Background(), userId).Limit(limit).Offset(offset).Since(since).Until(until).Inclusive(inclusive).Order(order).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.GetDirectMessages``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetDirectMessages`: []Message + fmt.Fprintf(os.Stdout, "Response from `UserAPI.GetDirectMessages`: %v\n", resp) } ``` @@ -540,24 +540,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.UserApi.GetUser(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUser`: UserDetail - fmt.Fprintf(os.Stdout, "Response from `UserApi.GetUser`: %v\n", resp) + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.UserAPI.GetUser(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.GetUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUser`: UserDetail + fmt.Fprintf(os.Stdout, "Response from `UserAPI.GetUser`: %v\n", resp) } ``` @@ -610,24 +610,24 @@ DMチャンネル情報を取得 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.UserApi.GetUserDMChannel(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetUserDMChannel``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserDMChannel`: DMChannel - fmt.Fprintf(os.Stdout, "Response from `UserApi.GetUserDMChannel`: %v\n", resp) + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.UserAPI.GetUserDMChannel(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.GetUserDMChannel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserDMChannel`: DMChannel + fmt.Fprintf(os.Stdout, "Response from `UserAPI.GetUserDMChannel`: %v\n", resp) } ``` @@ -680,24 +680,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.UserApi.GetUserIcon(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetUserIcon``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserIcon`: *os.File - fmt.Fprintf(os.Stdout, "Response from `UserApi.GetUserIcon`: %v\n", resp) + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.UserAPI.GetUserIcon(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.GetUserIcon``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserIcon`: *os.File + fmt.Fprintf(os.Stdout, "Response from `UserAPI.GetUserIcon`: %v\n", resp) } ``` @@ -750,24 +750,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.UserApi.GetUserStats(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetUserStats``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserStats`: UserStats - fmt.Fprintf(os.Stdout, "Response from `UserApi.GetUserStats`: %v\n", resp) + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.UserAPI.GetUserStats(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.GetUserStats``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserStats`: UserStats + fmt.Fprintf(os.Stdout, "Response from `UserAPI.GetUserStats`: %v\n", resp) } ``` @@ -820,24 +820,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.UserApi.GetUserTags(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetUserTags``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserTags`: []UserTag - fmt.Fprintf(os.Stdout, "Response from `UserApi.GetUserTags`: %v\n", resp) + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.UserAPI.GetUserTags(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.GetUserTags``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserTags`: []UserTag + fmt.Fprintf(os.Stdout, "Response from `UserAPI.GetUserTags`: %v\n", resp) } ``` @@ -890,25 +890,25 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - includeSuspended := true // bool | アカウントがアクティブでないユーザーを含め、全てのユーザーを取得するかどうか (optional) (default to false) - name := "name_example" // string | 名前が一致するアカウントのみを取得する (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.UserApi.GetUsers(context.Background()).IncludeSuspended(includeSuspended).Name(name).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUsers`: []User - fmt.Fprintf(os.Stdout, "Response from `UserApi.GetUsers`: %v\n", resp) + includeSuspended := true // bool | アカウントがアクティブでないユーザーを含め、全てのユーザーを取得するかどうか (optional) (default to false) + name := "name_example" // string | 名前が一致するアカウントのみを取得する (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.UserAPI.GetUsers(context.Background()).IncludeSuspended(includeSuspended).Name(name).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.GetUsers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUsers`: []User + fmt.Fprintf(os.Stdout, "Response from `UserAPI.GetUsers`: %v\n", resp) } ``` @@ -958,25 +958,25 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - postMessageRequest := *traq.NewPostMessageRequest("Content_example") // PostMessageRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.UserApi.PostDirectMessage(context.Background(), userId).PostMessageRequest(postMessageRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserApi.PostDirectMessage``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PostDirectMessage`: Message - fmt.Fprintf(os.Stdout, "Response from `UserApi.PostDirectMessage`: %v\n", resp) + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + postMessageRequest := *traq.NewPostMessageRequest("Content_example") // PostMessageRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.UserAPI.PostDirectMessage(context.Background(), userId).PostMessageRequest(postMessageRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.PostDirectMessage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PostDirectMessage`: Message + fmt.Fprintf(os.Stdout, "Response from `UserAPI.PostDirectMessage`: %v\n", resp) } ``` @@ -1030,23 +1030,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.UserApi.RemoveUserTag(context.Background(), userId, tagId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserApi.RemoveUserTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.UserAPI.RemoveUserTag(context.Background(), userId, tagId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.RemoveUserTag``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` diff --git a/docs/UserTagApi.md b/docs/UserTagAPI.md similarity index 61% rename from docs/UserTagApi.md rename to docs/UserTagAPI.md index 55c63fc..92be8ef 100644 --- a/docs/UserTagApi.md +++ b/docs/UserTagAPI.md @@ -1,18 +1,18 @@ -# \UserTagApi +# \UserTagAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AddMyUserTag**](UserTagApi.md#AddMyUserTag) | **Post** /users/me/tags | 自分にタグを追加 -[**AddUserTag**](UserTagApi.md#AddUserTag) | **Post** /users/{userId}/tags | ユーザーにタグを追加 -[**EditMyUserTag**](UserTagApi.md#EditMyUserTag) | **Patch** /users/me/tags/{tagId} | 自分のタグを編集 -[**EditUserTag**](UserTagApi.md#EditUserTag) | **Patch** /users/{userId}/tags/{tagId} | ユーザーのタグを編集 -[**GetMyUserTags**](UserTagApi.md#GetMyUserTags) | **Get** /users/me/tags | 自分のタグリストを取得 -[**GetTag**](UserTagApi.md#GetTag) | **Get** /tags/{tagId} | タグ情報を取得 -[**GetUserTags**](UserTagApi.md#GetUserTags) | **Get** /users/{userId}/tags | ユーザーのタグリストを取得 -[**RemoveMyUserTag**](UserTagApi.md#RemoveMyUserTag) | **Delete** /users/me/tags/{tagId} | 自分からタグを削除します -[**RemoveUserTag**](UserTagApi.md#RemoveUserTag) | **Delete** /users/{userId}/tags/{tagId} | ユーザーからタグを削除します +[**AddMyUserTag**](UserTagAPI.md#AddMyUserTag) | **Post** /users/me/tags | 自分にタグを追加 +[**AddUserTag**](UserTagAPI.md#AddUserTag) | **Post** /users/{userId}/tags | ユーザーにタグを追加 +[**EditMyUserTag**](UserTagAPI.md#EditMyUserTag) | **Patch** /users/me/tags/{tagId} | 自分のタグを編集 +[**EditUserTag**](UserTagAPI.md#EditUserTag) | **Patch** /users/{userId}/tags/{tagId} | ユーザーのタグを編集 +[**GetMyUserTags**](UserTagAPI.md#GetMyUserTags) | **Get** /users/me/tags | 自分のタグリストを取得 +[**GetTag**](UserTagAPI.md#GetTag) | **Get** /tags/{tagId} | タグ情報を取得 +[**GetUserTags**](UserTagAPI.md#GetUserTags) | **Get** /users/{userId}/tags | ユーザーのタグリストを取得 +[**RemoveMyUserTag**](UserTagAPI.md#RemoveMyUserTag) | **Delete** /users/me/tags/{tagId} | 自分からタグを削除します +[**RemoveUserTag**](UserTagAPI.md#RemoveUserTag) | **Delete** /users/{userId}/tags/{tagId} | ユーザーからタグを削除します @@ -30,24 +30,24 @@ Method | HTTP request | Description package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postUserTagRequest := *traq.NewPostUserTagRequest("Tag_example") // PostUserTagRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.UserTagApi.AddMyUserTag(context.Background()).PostUserTagRequest(postUserTagRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.AddMyUserTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddMyUserTag`: UserTag - fmt.Fprintf(os.Stdout, "Response from `UserTagApi.AddMyUserTag`: %v\n", resp) + postUserTagRequest := *traq.NewPostUserTagRequest("Tag_example") // PostUserTagRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.UserTagAPI.AddMyUserTag(context.Background()).PostUserTagRequest(postUserTagRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserTagAPI.AddMyUserTag``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddMyUserTag`: UserTag + fmt.Fprintf(os.Stdout, "Response from `UserTagAPI.AddMyUserTag`: %v\n", resp) } ``` @@ -96,25 +96,25 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - postUserTagRequest := *traq.NewPostUserTagRequest("Tag_example") // PostUserTagRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.UserTagApi.AddUserTag(context.Background(), userId).PostUserTagRequest(postUserTagRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.AddUserTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddUserTag`: UserTag - fmt.Fprintf(os.Stdout, "Response from `UserTagApi.AddUserTag`: %v\n", resp) + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + postUserTagRequest := *traq.NewPostUserTagRequest("Tag_example") // PostUserTagRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.UserTagAPI.AddUserTag(context.Background(), userId).PostUserTagRequest(postUserTagRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserTagAPI.AddUserTag``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddUserTag`: UserTag + fmt.Fprintf(os.Stdout, "Response from `UserTagAPI.AddUserTag`: %v\n", resp) } ``` @@ -168,23 +168,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID - patchUserTagRequest := *traq.NewPatchUserTagRequest(false) // PatchUserTagRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.UserTagApi.EditMyUserTag(context.Background(), tagId).PatchUserTagRequest(patchUserTagRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.EditMyUserTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID + patchUserTagRequest := *traq.NewPatchUserTagRequest(false) // PatchUserTagRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.UserTagAPI.EditMyUserTag(context.Background(), tagId).PatchUserTagRequest(patchUserTagRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserTagAPI.EditMyUserTag``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -238,24 +238,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID - patchUserTagRequest := *traq.NewPatchUserTagRequest(false) // PatchUserTagRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.UserTagApi.EditUserTag(context.Background(), userId, tagId).PatchUserTagRequest(patchUserTagRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.EditUserTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID + patchUserTagRequest := *traq.NewPatchUserTagRequest(false) // PatchUserTagRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.UserTagAPI.EditUserTag(context.Background(), userId, tagId).PatchUserTagRequest(patchUserTagRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserTagAPI.EditUserTag``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -311,23 +311,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.UserTagApi.GetMyUserTags(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.GetMyUserTags``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyUserTags`: []UserTag - fmt.Fprintf(os.Stdout, "Response from `UserTagApi.GetMyUserTags`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.UserTagAPI.GetMyUserTags(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserTagAPI.GetMyUserTags``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMyUserTags`: []UserTag + fmt.Fprintf(os.Stdout, "Response from `UserTagAPI.GetMyUserTags`: %v\n", resp) } ``` @@ -372,24 +372,24 @@ Other parameters are passed through a pointer to a apiGetMyUserTagsRequest struc package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.UserTagApi.GetTag(context.Background(), tagId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.GetTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetTag`: Tag - fmt.Fprintf(os.Stdout, "Response from `UserTagApi.GetTag`: %v\n", resp) + tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.UserTagAPI.GetTag(context.Background(), tagId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserTagAPI.GetTag``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTag`: Tag + fmt.Fprintf(os.Stdout, "Response from `UserTagAPI.GetTag`: %v\n", resp) } ``` @@ -442,24 +442,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.UserTagApi.GetUserTags(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.GetUserTags``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserTags`: []UserTag - fmt.Fprintf(os.Stdout, "Response from `UserTagApi.GetUserTags`: %v\n", resp) + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.UserTagAPI.GetUserTags(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserTagAPI.GetUserTags``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserTags`: []UserTag + fmt.Fprintf(os.Stdout, "Response from `UserTagAPI.GetUserTags`: %v\n", resp) } ``` @@ -512,22 +512,22 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.UserTagApi.RemoveMyUserTag(context.Background(), tagId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.RemoveMyUserTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.UserTagAPI.RemoveMyUserTag(context.Background(), tagId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserTagAPI.RemoveMyUserTag``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -580,23 +580,23 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID - tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.UserTagApi.RemoveUserTag(context.Background(), userId, tagId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserTagApi.RemoveUserTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + userId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ユーザーUUID + tagId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | タグUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.UserTagAPI.RemoveUserTag(context.Background(), userId, tagId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserTagAPI.RemoveUserTag``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` diff --git a/docs/WebhookApi.md b/docs/WebhookAPI.md similarity index 59% rename from docs/WebhookApi.md rename to docs/WebhookAPI.md index 9597a99..318c766 100644 --- a/docs/WebhookApi.md +++ b/docs/WebhookAPI.md @@ -1,18 +1,18 @@ -# \WebhookApi +# \WebhookAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ChangeWebhookIcon**](WebhookApi.md#ChangeWebhookIcon) | **Put** /webhooks/{webhookId}/icon | Webhookのアイコンを変更 -[**CreateWebhook**](WebhookApi.md#CreateWebhook) | **Post** /webhooks | Webhookを新規作成 -[**DeleteWebhook**](WebhookApi.md#DeleteWebhook) | **Delete** /webhooks/{webhookId} | Webhookを削除 -[**EditWebhook**](WebhookApi.md#EditWebhook) | **Patch** /webhooks/{webhookId} | Webhook情報を変更 -[**GetWebhook**](WebhookApi.md#GetWebhook) | **Get** /webhooks/{webhookId} | Webhook情報を取得 -[**GetWebhookIcon**](WebhookApi.md#GetWebhookIcon) | **Get** /webhooks/{webhookId}/icon | Webhookのアイコンを取得 -[**GetWebhookMessages**](WebhookApi.md#GetWebhookMessages) | **Get** /webhooks/{webhookId}/messages | Webhookの投稿メッセージのリストを取得 -[**GetWebhooks**](WebhookApi.md#GetWebhooks) | **Get** /webhooks | Webhook情報のリストを取得します -[**PostWebhook**](WebhookApi.md#PostWebhook) | **Post** /webhooks/{webhookId} | Webhookを送信 +[**ChangeWebhookIcon**](WebhookAPI.md#ChangeWebhookIcon) | **Put** /webhooks/{webhookId}/icon | Webhookのアイコンを変更 +[**CreateWebhook**](WebhookAPI.md#CreateWebhook) | **Post** /webhooks | Webhookを新規作成 +[**DeleteWebhook**](WebhookAPI.md#DeleteWebhook) | **Delete** /webhooks/{webhookId} | Webhookを削除 +[**EditWebhook**](WebhookAPI.md#EditWebhook) | **Patch** /webhooks/{webhookId} | Webhook情報を変更 +[**GetWebhook**](WebhookAPI.md#GetWebhook) | **Get** /webhooks/{webhookId} | Webhook情報を取得 +[**GetWebhookIcon**](WebhookAPI.md#GetWebhookIcon) | **Get** /webhooks/{webhookId}/icon | Webhookのアイコンを取得 +[**GetWebhookMessages**](WebhookAPI.md#GetWebhookMessages) | **Get** /webhooks/{webhookId}/messages | Webhookの投稿メッセージのリストを取得 +[**GetWebhooks**](WebhookAPI.md#GetWebhooks) | **Get** /webhooks | Webhook情報のリストを取得します +[**PostWebhook**](WebhookAPI.md#PostWebhook) | **Post** /webhooks/{webhookId} | Webhookを送信 @@ -30,23 +30,23 @@ Webhookのアイコンを変更 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - webhookId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | WebhookUUID - file := os.NewFile(1234, "some_file") // *os.File | アイコン画像(2MBまでのpng, jpeg, gif) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.WebhookApi.ChangeWebhookIcon(context.Background(), webhookId).File(file).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhookApi.ChangeWebhookIcon``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + webhookId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | WebhookUUID + file := os.NewFile(1234, "some_file") // *os.File | アイコン画像(2MBまでのpng, jpeg, gif) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.WebhookAPI.ChangeWebhookIcon(context.Background(), webhookId).File(file).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.ChangeWebhookIcon``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -100,24 +100,24 @@ Webhookを新規作成 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postWebhookRequest := *traq.NewPostWebhookRequest("Name_example", "Description_example", "ChannelId_example", "Secret_example") // PostWebhookRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.WebhookApi.CreateWebhook(context.Background()).PostWebhookRequest(postWebhookRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhookApi.CreateWebhook``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateWebhook`: Webhook - fmt.Fprintf(os.Stdout, "Response from `WebhookApi.CreateWebhook`: %v\n", resp) + postWebhookRequest := *traq.NewPostWebhookRequest("Name_example", "Description_example", "ChannelId_example", "Secret_example") // PostWebhookRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.WebhookAPI.CreateWebhook(context.Background()).PostWebhookRequest(postWebhookRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.CreateWebhook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateWebhook`: Webhook + fmt.Fprintf(os.Stdout, "Response from `WebhookAPI.CreateWebhook`: %v\n", resp) } ``` @@ -166,22 +166,22 @@ Webhookを削除 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - webhookId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | WebhookUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.WebhookApi.DeleteWebhook(context.Background(), webhookId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhookApi.DeleteWebhook``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + webhookId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | WebhookUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.WebhookAPI.DeleteWebhook(context.Background(), webhookId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.DeleteWebhook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -234,23 +234,23 @@ Webhook情報を変更 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - webhookId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | WebhookUUID - patchWebhookRequest := *traq.NewPatchWebhookRequest() // PatchWebhookRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.WebhookApi.EditWebhook(context.Background(), webhookId).PatchWebhookRequest(patchWebhookRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhookApi.EditWebhook``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + webhookId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | WebhookUUID + patchWebhookRequest := *traq.NewPatchWebhookRequest() // PatchWebhookRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.WebhookAPI.EditWebhook(context.Background(), webhookId).PatchWebhookRequest(patchWebhookRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.EditWebhook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -304,24 +304,24 @@ Webhook情報を取得 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - webhookId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | WebhookUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.WebhookApi.GetWebhook(context.Background(), webhookId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhookApi.GetWebhook``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetWebhook`: Webhook - fmt.Fprintf(os.Stdout, "Response from `WebhookApi.GetWebhook`: %v\n", resp) + webhookId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | WebhookUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.WebhookAPI.GetWebhook(context.Background(), webhookId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.GetWebhook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetWebhook`: Webhook + fmt.Fprintf(os.Stdout, "Response from `WebhookAPI.GetWebhook`: %v\n", resp) } ``` @@ -374,24 +374,24 @@ Webhookのアイコンを取得 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - webhookId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | WebhookUUID - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.WebhookApi.GetWebhookIcon(context.Background(), webhookId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhookApi.GetWebhookIcon``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetWebhookIcon`: *os.File - fmt.Fprintf(os.Stdout, "Response from `WebhookApi.GetWebhookIcon`: %v\n", resp) + webhookId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | WebhookUUID + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.WebhookAPI.GetWebhookIcon(context.Background(), webhookId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.GetWebhookIcon``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetWebhookIcon`: *os.File + fmt.Fprintf(os.Stdout, "Response from `WebhookAPI.GetWebhookIcon`: %v\n", resp) } ``` @@ -444,31 +444,31 @@ Webhookの投稿メッセージのリストを取得 package main import ( - "context" - "fmt" - "os" + "context" + "fmt" + "os" "time" - traq "github.com/traPtitech/go-traq" + traq "github.com/traPtitech/go-traq" ) func main() { - webhookId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | WebhookUUID - limit := int32(50) // int32 | 取得する件数 (optional) - offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) - since := time.Now() // time.Time | 取得する時間範囲の開始日時 (optional) (default to "0000-01-01T00:00Z") - until := time.Now() // time.Time | 取得する時間範囲の終了日時 (optional) - inclusive := true // bool | 範囲の端を含めるかどうか (optional) (default to false) - order := "order_example" // string | 昇順か降順か (optional) (default to "desc") - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.WebhookApi.GetWebhookMessages(context.Background(), webhookId).Limit(limit).Offset(offset).Since(since).Until(until).Inclusive(inclusive).Order(order).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhookApi.GetWebhookMessages``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetWebhookMessages`: []Message - fmt.Fprintf(os.Stdout, "Response from `WebhookApi.GetWebhookMessages`: %v\n", resp) + webhookId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | WebhookUUID + limit := int32(50) // int32 | 取得する件数 (optional) + offset := int32(150) // int32 | 取得するオフセット (optional) (default to 0) + since := time.Now() // time.Time | 取得する時間範囲の開始日時 (optional) (default to "0000-01-01T00:00Z") + until := time.Now() // time.Time | 取得する時間範囲の終了日時 (optional) + inclusive := true // bool | 範囲の端を含めるかどうか (optional) (default to false) + order := "order_example" // string | 昇順か降順か (optional) (default to "desc") + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.WebhookAPI.GetWebhookMessages(context.Background(), webhookId).Limit(limit).Offset(offset).Since(since).Until(until).Inclusive(inclusive).Order(order).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.GetWebhookMessages``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetWebhookMessages`: []Message + fmt.Fprintf(os.Stdout, "Response from `WebhookAPI.GetWebhookMessages`: %v\n", resp) } ``` @@ -527,24 +527,24 @@ Webhook情報のリストを取得します package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - all := true // bool | 全てのWebhookを取得します。権限が必要です。 (optional) (default to false) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.WebhookApi.GetWebhooks(context.Background()).All(all).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhookApi.GetWebhooks``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetWebhooks`: []Webhook - fmt.Fprintf(os.Stdout, "Response from `WebhookApi.GetWebhooks`: %v\n", resp) + all := true // bool | 全てのWebhookを取得します。権限が必要です。 (optional) (default to false) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.WebhookAPI.GetWebhooks(context.Background()).All(all).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.GetWebhooks``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetWebhooks`: []Webhook + fmt.Fprintf(os.Stdout, "Response from `WebhookAPI.GetWebhooks`: %v\n", resp) } ``` @@ -593,26 +593,26 @@ Webhookを送信 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - webhookId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | WebhookUUID - xTRAQSignature := "xTRAQSignature_example" // string | リクエストボディシグネチャ(Secretが設定されている場合は必須) (optional) - xTRAQChannelId := "xTRAQChannelId_example" // string | 投稿先のチャンネルID(変更する場合) (optional) - embed := int32(56) // int32 | メンション・チャンネルリンクを自動埋め込みする場合に1を指定する (optional) (default to 0) - body := "body_example" // string | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - r, err := apiClient.WebhookApi.PostWebhook(context.Background(), webhookId).XTRAQSignature(xTRAQSignature).XTRAQChannelId(xTRAQChannelId).Embed(embed).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhookApi.PostWebhook``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + webhookId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | WebhookUUID + xTRAQSignature := "xTRAQSignature_example" // string | リクエストボディシグネチャ(Secretが設定されている場合は必須) (optional) + xTRAQChannelId := "xTRAQChannelId_example" // string | 投稿先のチャンネルID(変更する場合) (optional) + embed := int32(56) // int32 | メンション・チャンネルリンクを自動埋め込みする場合に1を指定する (optional) (default to 0) + body := "body_example" // string | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + r, err := apiClient.WebhookAPI.PostWebhook(context.Background(), webhookId).XTRAQSignature(xTRAQSignature).XTRAQChannelId(xTRAQChannelId).Embed(embed).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.PostWebhook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` diff --git a/docs/WebrtcApi.md b/docs/WebrtcAPI.md similarity index 57% rename from docs/WebrtcApi.md rename to docs/WebrtcAPI.md index e008c46..eed60f5 100644 --- a/docs/WebrtcApi.md +++ b/docs/WebrtcAPI.md @@ -1,11 +1,11 @@ -# \WebrtcApi +# \WebrtcAPI All URIs are relative to *https://q.trap.jp/api/v3* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetWebRTCState**](WebrtcApi.md#GetWebRTCState) | **Get** /webrtc/state | WebRTC状態を取得 -[**PostWebRTCAuthenticate**](WebrtcApi.md#PostWebRTCAuthenticate) | **Post** /webrtc/authenticate | Skyway用認証API +[**GetWebRTCState**](WebrtcAPI.md#GetWebRTCState) | **Get** /webrtc/state | WebRTC状態を取得 +[**PostWebRTCAuthenticate**](WebrtcAPI.md#PostWebRTCAuthenticate) | **Post** /webrtc/authenticate | Skyway用認証API @@ -23,23 +23,23 @@ WebRTC状態を取得 package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.WebrtcApi.GetWebRTCState(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebrtcApi.GetWebRTCState``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetWebRTCState`: []WebRTCUserState - fmt.Fprintf(os.Stdout, "Response from `WebrtcApi.GetWebRTCState`: %v\n", resp) + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.WebrtcAPI.GetWebRTCState(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WebrtcAPI.GetWebRTCState``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetWebRTCState`: []WebRTCUserState + fmt.Fprintf(os.Stdout, "Response from `WebrtcAPI.GetWebRTCState`: %v\n", resp) } ``` @@ -84,24 +84,24 @@ Skyway用認証API package main import ( - "context" - "fmt" - "os" - traq "github.com/traPtitech/go-traq" + "context" + "fmt" + "os" + traq "github.com/traPtitech/go-traq" ) func main() { - postWebRTCAuthenticateRequest := *traq.NewPostWebRTCAuthenticateRequest("PeerId_example") // PostWebRTCAuthenticateRequest | (optional) - - configuration := traq.NewConfiguration() - apiClient := traq.NewAPIClient(configuration) - resp, r, err := apiClient.WebrtcApi.PostWebRTCAuthenticate(context.Background()).PostWebRTCAuthenticateRequest(postWebRTCAuthenticateRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebrtcApi.PostWebRTCAuthenticate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PostWebRTCAuthenticate`: WebRTCAuthenticateResult - fmt.Fprintf(os.Stdout, "Response from `WebrtcApi.PostWebRTCAuthenticate`: %v\n", resp) + postWebRTCAuthenticateRequest := *traq.NewPostWebRTCAuthenticateRequest("PeerId_example") // PostWebRTCAuthenticateRequest | (optional) + + configuration := traq.NewConfiguration() + apiClient := traq.NewAPIClient(configuration) + resp, r, err := apiClient.WebrtcAPI.PostWebRTCAuthenticate(context.Background()).PostWebRTCAuthenticateRequest(postWebRTCAuthenticateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WebrtcAPI.PostWebRTCAuthenticate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PostWebRTCAuthenticate`: WebRTCAuthenticateResult + fmt.Fprintf(os.Stdout, "Response from `WebrtcAPI.PostWebRTCAuthenticate`: %v\n", resp) } ``` diff --git a/generate.sh b/generate.sh index 45a5f50..6950d7c 100755 --- a/generate.sh +++ b/generate.sh @@ -23,6 +23,10 @@ mv README.md.bak README.md sed -i.bak s/\(time.RFC3339\)/\(time.RFC3339Nano\)/g ./client.go rm ./client.go.bak +# openapi-generator bug: https://github.com/OpenAPITools/openapi-generator/issues/20749 +# Replace default value of time.Time from "0000-01-01T00:00Z" (string) to time.Time (zero value) +find . -name "*.go" -print0 | xargs -0 sed -i -E 's/var\s+defaultValue\s+time\.Time\s*=\s*"0000-01-01T00:00Z"/var defaultValue time.Time/g' + # setup go go fmt ./... go mod tidy diff --git a/go.mod b/go.mod index 9108602..01f8b54 100644 --- a/go.mod +++ b/go.mod @@ -4,4 +4,7 @@ go 1.22 toolchain go1.22.2 -require golang.org/x/oauth2 v0.20.0 +require ( + golang.org/x/oauth2 v0.20.0 + gopkg.in/validator.v2 v2.0.1 +) diff --git a/go.sum b/go.sum index 29b9460..e5bf931 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,12 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/validator.v2 v2.0.1 h1:xF0KWyGWXm/LM2G1TrEjqOu4pa6coO9AlWSf3msVfDY= +gopkg.in/validator.v2 v2.0.1/go.mod h1:lIUZBlB3Im4s/eYp39Ry/wkR02yOPhZ9IwIRBjuPuG8= diff --git a/model_active_o_auth2_token.go b/model_active_o_auth2_token.go index 843a036..e11cf6c 100644 --- a/model_active_o_auth2_token.go +++ b/model_active_o_auth2_token.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -30,6 +32,8 @@ type ActiveOAuth2Token struct { IssuedAt time.Time `json:"issuedAt"` } +type _ActiveOAuth2Token ActiveOAuth2Token + // NewActiveOAuth2Token instantiates a new ActiveOAuth2Token object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -164,6 +168,46 @@ func (o ActiveOAuth2Token) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ActiveOAuth2Token) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "clientId", + "scopes", + "issuedAt", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varActiveOAuth2Token := _ActiveOAuth2Token{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varActiveOAuth2Token) + + if err != nil { + return err + } + + *o = ActiveOAuth2Token(varActiveOAuth2Token) + + return err +} + type NullableActiveOAuth2Token struct { value *ActiveOAuth2Token isSet bool diff --git a/model_activity_timeline_message.go b/model_activity_timeline_message.go index 5688313..e935e0a 100644 --- a/model_activity_timeline_message.go +++ b/model_activity_timeline_message.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -34,6 +36,8 @@ type ActivityTimelineMessage struct { UpdatedAt time.Time `json:"updatedAt"` } +type _ActivityTimelineMessage ActivityTimelineMessage + // NewActivityTimelineMessage instantiates a new ActivityTimelineMessage object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -220,6 +224,48 @@ func (o ActivityTimelineMessage) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ActivityTimelineMessage) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "userId", + "channelId", + "content", + "createdAt", + "updatedAt", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varActivityTimelineMessage := _ActivityTimelineMessage{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varActivityTimelineMessage) + + if err != nil { + return err + } + + *o = ActivityTimelineMessage(varActivityTimelineMessage) + + return err +} + type NullableActivityTimelineMessage struct { value *ActivityTimelineMessage isSet bool diff --git a/model_add_user_group_member_request.go b/model_add_user_group_member_request.go index cc966a2..ff1aa99 100644 --- a/model_add_user_group_member_request.go +++ b/model_add_user_group_member_request.go @@ -13,6 +13,7 @@ package traq import ( "encoding/json" "fmt" + "gopkg.in/validator.v2" ) // AddUserGroupMemberRequest - struct for AddUserGroupMemberRequest @@ -46,7 +47,11 @@ func (dst *AddUserGroupMemberRequest) UnmarshalJSON(data []byte) error { if string(jsonUserGroupMember) == "{}" { // empty struct dst.UserGroupMember = nil } else { - match++ + if err = validator.Validate(dst.UserGroupMember); err != nil { + dst.UserGroupMember = nil + } else { + match++ + } } } else { dst.UserGroupMember = nil @@ -59,7 +64,11 @@ func (dst *AddUserGroupMemberRequest) UnmarshalJSON(data []byte) error { if string(jsonArrayOfUserGroupMember) == "{}" { // empty struct dst.ArrayOfUserGroupMember = nil } else { - match++ + if err = validator.Validate(dst.ArrayOfUserGroupMember); err != nil { + dst.ArrayOfUserGroupMember = nil + } else { + match++ + } } } else { dst.ArrayOfUserGroupMember = nil @@ -108,6 +117,20 @@ func (obj *AddUserGroupMemberRequest) GetActualInstance() interface{} { return nil } +// Get the actual instance value +func (obj AddUserGroupMemberRequest) GetActualInstanceValue() interface{} { + if obj.UserGroupMember != nil { + return *obj.UserGroupMember + } + + if obj.ArrayOfUserGroupMember != nil { + return *obj.ArrayOfUserGroupMember + } + + // all schemas are nil + return nil +} + type NullableAddUserGroupMemberRequest struct { value *AddUserGroupMemberRequest isSet bool diff --git a/model_bot.go b/model_bot.go index 0c4e340..6c9940a 100644 --- a/model_bot.go +++ b/model_bot.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -38,6 +40,8 @@ type Bot struct { UpdatedAt time.Time `json:"updatedAt"` } +type _Bot Bot + // NewBot instantiates a new Bot object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -302,6 +306,51 @@ func (o Bot) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *Bot) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "botUserId", + "description", + "developerId", + "subscribeEvents", + "mode", + "state", + "createdAt", + "updatedAt", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBot := _Bot{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBot) + + if err != nil { + return err + } + + *o = Bot(varBot) + + return err +} + type NullableBot struct { value *Bot isSet bool diff --git a/model_bot_detail.go b/model_bot_detail.go index c3060e6..dada966 100644 --- a/model_bot_detail.go +++ b/model_bot_detail.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -45,6 +47,8 @@ type BotDetail struct { Channels []string `json:"channels"` } +type _BotDetail BotDetail + // NewBotDetail instantiates a new BotDetail object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -413,6 +417,55 @@ func (o BotDetail) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *BotDetail) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "updatedAt", + "createdAt", + "mode", + "state", + "subscribeEvents", + "developerId", + "description", + "botUserId", + "tokens", + "endpoint", + "privileged", + "channels", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBotDetail := _BotDetail{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBotDetail) + + if err != nil { + return err + } + + *o = BotDetail(varBotDetail) + + return err +} + type NullableBotDetail struct { value *BotDetail isSet bool diff --git a/model_bot_event_log.go b/model_bot_event_log.go index 6ec18c2..6a2c1c3 100644 --- a/model_bot_event_log.go +++ b/model_bot_event_log.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -33,6 +35,8 @@ type BotEventLog struct { Datetime time.Time `json:"datetime"` } +type _BotEventLog BotEventLog + // NewBotEventLog instantiates a new BotEventLog object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -228,6 +232,47 @@ func (o BotEventLog) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *BotEventLog) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "botId", + "requestId", + "event", + "code", + "datetime", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBotEventLog := _BotEventLog{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBotEventLog) + + if err != nil { + return err + } + + *o = BotEventLog(varBotEventLog) + + return err +} + type NullableBotEventLog struct { value *BotEventLog isSet bool diff --git a/model_bot_tokens.go b/model_bot_tokens.go index 3ae049f..5d3bd95 100644 --- a/model_bot_tokens.go +++ b/model_bot_tokens.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the BotTokens type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type BotTokens struct { AccessToken string `json:"accessToken"` } +type _BotTokens BotTokens + // NewBotTokens instantiates a new BotTokens object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o BotTokens) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *BotTokens) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "verificationToken", + "accessToken", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBotTokens := _BotTokens{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBotTokens) + + if err != nil { + return err + } + + *o = BotTokens(varBotTokens) + + return err +} + type NullableBotTokens struct { value *BotTokens isSet bool diff --git a/model_bot_user.go b/model_bot_user.go index 9955c42..d5291b5 100644 --- a/model_bot_user.go +++ b/model_bot_user.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the BotUser type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type BotUser struct { BotUserId string `json:"botUserId"` } +type _BotUser BotUser + // NewBotUser instantiates a new BotUser object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o BotUser) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *BotUser) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "botUserId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBotUser := _BotUser{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBotUser) + + if err != nil { + return err + } + + *o = BotUser(varBotUser) + + return err +} + type NullableBotUser struct { value *BotUser isSet bool diff --git a/model_channel.go b/model_channel.go index b91a234..7ca6cad 100644 --- a/model_channel.go +++ b/model_channel.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the Channel type satisfies the MappedNullable interface at compile time @@ -30,11 +32,13 @@ type Channel struct { // チャンネルトピック Topic string `json:"topic"` // チャンネル名 - Name string `json:"name"` + Name string `json:"name" validate:"regexp=^[a-zA-Z0-9-_]{1,20}$"` // 子チャンネルのUUID配列 Children []string `json:"children"` } +type _Channel Channel + // NewChannel instantiates a new Channel object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -249,6 +253,49 @@ func (o Channel) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *Channel) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "parentId", + "archived", + "force", + "topic", + "name", + "children", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChannel := _Channel{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChannel) + + if err != nil { + return err + } + + *o = Channel(varChannel) + + return err +} + type NullableChannel struct { value *Channel isSet bool diff --git a/model_channel_event.go b/model_channel_event.go index 5ce0a3f..4178db7 100644 --- a/model_channel_event.go +++ b/model_channel_event.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -27,6 +29,8 @@ type ChannelEvent struct { Detail ChannelEventDetail `json:"detail"` } +type _ChannelEvent ChannelEvent + // NewChannelEvent instantiates a new ChannelEvent object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o ChannelEvent) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ChannelEvent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "datetime", + "detail", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChannelEvent := _ChannelEvent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChannelEvent) + + if err != nil { + return err + } + + *o = ChannelEvent(varChannelEvent) + + return err +} + type NullableChannelEvent struct { value *ChannelEvent isSet bool diff --git a/model_channel_event_detail.go b/model_channel_event_detail.go index 5c0ec7d..eaf6c9a 100644 --- a/model_channel_event_detail.go +++ b/model_channel_event_detail.go @@ -13,6 +13,7 @@ package traq import ( "encoding/json" "fmt" + "gopkg.in/validator.v2" ) // ChannelEventDetail - イベント内容 @@ -102,7 +103,11 @@ func (dst *ChannelEventDetail) UnmarshalJSON(data []byte) error { if string(jsonChildCreatedEvent) == "{}" { // empty struct dst.ChildCreatedEvent = nil } else { - match++ + if err = validator.Validate(dst.ChildCreatedEvent); err != nil { + dst.ChildCreatedEvent = nil + } else { + match++ + } } } else { dst.ChildCreatedEvent = nil @@ -115,7 +120,11 @@ func (dst *ChannelEventDetail) UnmarshalJSON(data []byte) error { if string(jsonForcedNotificationChangedEvent) == "{}" { // empty struct dst.ForcedNotificationChangedEvent = nil } else { - match++ + if err = validator.Validate(dst.ForcedNotificationChangedEvent); err != nil { + dst.ForcedNotificationChangedEvent = nil + } else { + match++ + } } } else { dst.ForcedNotificationChangedEvent = nil @@ -128,7 +137,11 @@ func (dst *ChannelEventDetail) UnmarshalJSON(data []byte) error { if string(jsonNameChangedEvent) == "{}" { // empty struct dst.NameChangedEvent = nil } else { - match++ + if err = validator.Validate(dst.NameChangedEvent); err != nil { + dst.NameChangedEvent = nil + } else { + match++ + } } } else { dst.NameChangedEvent = nil @@ -141,7 +154,11 @@ func (dst *ChannelEventDetail) UnmarshalJSON(data []byte) error { if string(jsonParentChangedEvent) == "{}" { // empty struct dst.ParentChangedEvent = nil } else { - match++ + if err = validator.Validate(dst.ParentChangedEvent); err != nil { + dst.ParentChangedEvent = nil + } else { + match++ + } } } else { dst.ParentChangedEvent = nil @@ -154,7 +171,11 @@ func (dst *ChannelEventDetail) UnmarshalJSON(data []byte) error { if string(jsonPinAddedEvent) == "{}" { // empty struct dst.PinAddedEvent = nil } else { - match++ + if err = validator.Validate(dst.PinAddedEvent); err != nil { + dst.PinAddedEvent = nil + } else { + match++ + } } } else { dst.PinAddedEvent = nil @@ -167,7 +188,11 @@ func (dst *ChannelEventDetail) UnmarshalJSON(data []byte) error { if string(jsonPinRemovedEvent) == "{}" { // empty struct dst.PinRemovedEvent = nil } else { - match++ + if err = validator.Validate(dst.PinRemovedEvent); err != nil { + dst.PinRemovedEvent = nil + } else { + match++ + } } } else { dst.PinRemovedEvent = nil @@ -180,7 +205,11 @@ func (dst *ChannelEventDetail) UnmarshalJSON(data []byte) error { if string(jsonSubscribersChangedEvent) == "{}" { // empty struct dst.SubscribersChangedEvent = nil } else { - match++ + if err = validator.Validate(dst.SubscribersChangedEvent); err != nil { + dst.SubscribersChangedEvent = nil + } else { + match++ + } } } else { dst.SubscribersChangedEvent = nil @@ -193,7 +222,11 @@ func (dst *ChannelEventDetail) UnmarshalJSON(data []byte) error { if string(jsonTopicChangedEvent) == "{}" { // empty struct dst.TopicChangedEvent = nil } else { - match++ + if err = validator.Validate(dst.TopicChangedEvent); err != nil { + dst.TopicChangedEvent = nil + } else { + match++ + } } } else { dst.TopicChangedEvent = nil @@ -206,7 +239,11 @@ func (dst *ChannelEventDetail) UnmarshalJSON(data []byte) error { if string(jsonVisibilityChangedEvent) == "{}" { // empty struct dst.VisibilityChangedEvent = nil } else { - match++ + if err = validator.Validate(dst.VisibilityChangedEvent); err != nil { + dst.VisibilityChangedEvent = nil + } else { + match++ + } } } else { dst.VisibilityChangedEvent = nil @@ -318,6 +355,48 @@ func (obj *ChannelEventDetail) GetActualInstance() interface{} { return nil } +// Get the actual instance value +func (obj ChannelEventDetail) GetActualInstanceValue() interface{} { + if obj.ChildCreatedEvent != nil { + return *obj.ChildCreatedEvent + } + + if obj.ForcedNotificationChangedEvent != nil { + return *obj.ForcedNotificationChangedEvent + } + + if obj.NameChangedEvent != nil { + return *obj.NameChangedEvent + } + + if obj.ParentChangedEvent != nil { + return *obj.ParentChangedEvent + } + + if obj.PinAddedEvent != nil { + return *obj.PinAddedEvent + } + + if obj.PinRemovedEvent != nil { + return *obj.PinRemovedEvent + } + + if obj.SubscribersChangedEvent != nil { + return *obj.SubscribersChangedEvent + } + + if obj.TopicChangedEvent != nil { + return *obj.TopicChangedEvent + } + + if obj.VisibilityChangedEvent != nil { + return *obj.VisibilityChangedEvent + } + + // all schemas are nil + return nil +} + type NullableChannelEventDetail struct { value *ChannelEventDetail isSet bool diff --git a/model_channel_list.go b/model_channel_list.go index 8c67eb5..070155a 100644 --- a/model_channel_list.go +++ b/model_channel_list.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ChannelList type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type ChannelList struct { Dm []DMChannel `json:"dm,omitempty"` } +type _ChannelList ChannelList + // NewChannelList instantiates a new ChannelList object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -116,6 +120,43 @@ func (o ChannelList) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ChannelList) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "public", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChannelList := _ChannelList{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChannelList) + + if err != nil { + return err + } + + *o = ChannelList(varChannelList) + + return err +} + type NullableChannelList struct { value *ChannelList isSet bool diff --git a/model_channel_path.go b/model_channel_path.go index 7dedfdb..9546ae8 100644 --- a/model_channel_path.go +++ b/model_channel_path.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ChannelPath type satisfies the MappedNullable interface at compile time @@ -20,9 +22,11 @@ var _ MappedNullable = &ChannelPath{} // ChannelPath チャンネルパス type ChannelPath struct { // チャンネルパス - Path string `json:"path"` + Path string `json:"path" validate:"regexp=^(\\/[a-zA-Z0-9-_]+)+$"` } +type _ChannelPath ChannelPath + // NewChannelPath instantiates a new ChannelPath object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o ChannelPath) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ChannelPath) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "path", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChannelPath := _ChannelPath{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChannelPath) + + if err != nil { + return err + } + + *o = ChannelPath(varChannelPath) + + return err +} + type NullableChannelPath struct { value *ChannelPath isSet bool diff --git a/model_channel_stats.go b/model_channel_stats.go index b77e786..9d12da0 100644 --- a/model_channel_stats.go +++ b/model_channel_stats.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -30,6 +32,8 @@ type ChannelStats struct { Datetime time.Time `json:"datetime"` } +type _ChannelStats ChannelStats + // NewChannelStats instantiates a new ChannelStats object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -164,6 +168,46 @@ func (o ChannelStats) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ChannelStats) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "totalMessageCount", + "stamps", + "users", + "datetime", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChannelStats := _ChannelStats{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChannelStats) + + if err != nil { + return err + } + + *o = ChannelStats(varChannelStats) + + return err +} + type NullableChannelStats struct { value *ChannelStats isSet bool diff --git a/model_channel_stats_stamp.go b/model_channel_stats_stamp.go index be29bb4..1eea3ea 100644 --- a/model_channel_stats_stamp.go +++ b/model_channel_stats_stamp.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ChannelStatsStamp type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type ChannelStatsStamp struct { Total int64 `json:"total"` } +type _ChannelStatsStamp ChannelStatsStamp + // NewChannelStatsStamp instantiates a new ChannelStatsStamp object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o ChannelStatsStamp) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ChannelStatsStamp) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "count", + "total", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChannelStatsStamp := _ChannelStatsStamp{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChannelStatsStamp) + + if err != nil { + return err + } + + *o = ChannelStatsStamp(varChannelStatsStamp) + + return err +} + type NullableChannelStatsStamp struct { value *ChannelStatsStamp isSet bool diff --git a/model_channel_stats_user.go b/model_channel_stats_user.go index d513ee9..4a59f8f 100644 --- a/model_channel_stats_user.go +++ b/model_channel_stats_user.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ChannelStatsUser type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type ChannelStatsUser struct { MessageCount int64 `json:"messageCount"` } +type _ChannelStatsUser ChannelStatsUser + // NewChannelStatsUser instantiates a new ChannelStatsUser object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o ChannelStatsUser) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ChannelStatsUser) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "messageCount", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChannelStatsUser := _ChannelStatsUser{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChannelStatsUser) + + if err != nil { + return err + } + + *o = ChannelStatsUser(varChannelStatsUser) + + return err +} + type NullableChannelStatsUser struct { value *ChannelStatsUser isSet bool diff --git a/model_channel_topic.go b/model_channel_topic.go index 35bf6da..8b4b773 100644 --- a/model_channel_topic.go +++ b/model_channel_topic.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ChannelTopic type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type ChannelTopic struct { Topic string `json:"topic"` } +type _ChannelTopic ChannelTopic + // NewChannelTopic instantiates a new ChannelTopic object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o ChannelTopic) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ChannelTopic) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "topic", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChannelTopic := _ChannelTopic{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChannelTopic) + + if err != nil { + return err + } + + *o = ChannelTopic(varChannelTopic) + + return err +} + type NullableChannelTopic struct { value *ChannelTopic isSet bool diff --git a/model_channel_viewer.go b/model_channel_viewer.go index 577bc16..4f5b73f 100644 --- a/model_channel_viewer.go +++ b/model_channel_viewer.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -27,6 +29,8 @@ type ChannelViewer struct { UpdatedAt time.Time `json:"updatedAt"` } +type _ChannelViewer ChannelViewer + // NewChannelViewer instantiates a new ChannelViewer object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o ChannelViewer) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ChannelViewer) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "userId", + "state", + "updatedAt", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChannelViewer := _ChannelViewer{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChannelViewer) + + if err != nil { + return err + } + + *o = ChannelViewer(varChannelViewer) + + return err +} + type NullableChannelViewer struct { value *ChannelViewer isSet bool diff --git a/model_child_created_event.go b/model_child_created_event.go index 19b8d62..527da04 100644 --- a/model_child_created_event.go +++ b/model_child_created_event.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ChildCreatedEvent type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type ChildCreatedEvent struct { ChannelId string `json:"channelId"` } +type _ChildCreatedEvent ChildCreatedEvent + // NewChildCreatedEvent instantiates a new ChildCreatedEvent object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o ChildCreatedEvent) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ChildCreatedEvent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "userId", + "channelId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChildCreatedEvent := _ChildCreatedEvent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChildCreatedEvent) + + if err != nil { + return err + } + + *o = ChildCreatedEvent(varChildCreatedEvent) + + return err +} + type NullableChildCreatedEvent struct { value *ChildCreatedEvent isSet bool diff --git a/model_clip_folder.go b/model_clip_folder.go index f56cda6..9acea6f 100644 --- a/model_clip_folder.go +++ b/model_clip_folder.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -32,6 +34,8 @@ type ClipFolder struct { Description string `json:"description"` } +type _ClipFolder ClipFolder + // NewClipFolder instantiates a new ClipFolder object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -192,6 +196,47 @@ func (o ClipFolder) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ClipFolder) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "createdAt", + "ownerId", + "description", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varClipFolder := _ClipFolder{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varClipFolder) + + if err != nil { + return err + } + + *o = ClipFolder(varClipFolder) + + return err +} + type NullableClipFolder struct { value *ClipFolder isSet bool diff --git a/model_clipped_message.go b/model_clipped_message.go index 15f6fb6..be59da7 100644 --- a/model_clipped_message.go +++ b/model_clipped_message.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -25,6 +27,8 @@ type ClippedMessage struct { ClippedAt time.Time `json:"clippedAt"` } +type _ClippedMessage ClippedMessage + // NewClippedMessage instantiates a new ClippedMessage object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o ClippedMessage) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ClippedMessage) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + "clippedAt", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varClippedMessage := _ClippedMessage{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varClippedMessage) + + if err != nil { + return err + } + + *o = ClippedMessage(varClippedMessage) + + return err +} + type NullableClippedMessage struct { value *ClippedMessage isSet bool diff --git a/model_dm_channel.go b/model_dm_channel.go index 11349cb..ee0d823 100644 --- a/model_dm_channel.go +++ b/model_dm_channel.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the DMChannel type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type DMChannel struct { UserId string `json:"userId"` } +type _DMChannel DMChannel + // NewDMChannel instantiates a new DMChannel object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o DMChannel) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *DMChannel) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "userId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDMChannel := _DMChannel{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDMChannel) + + if err != nil { + return err + } + + *o = DMChannel(varDMChannel) + + return err +} + type NullableDMChannel struct { value *DMChannel isSet bool diff --git a/model_external_provider_user.go b/model_external_provider_user.go index 3a09c0a..cd44ff9 100644 --- a/model_external_provider_user.go +++ b/model_external_provider_user.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ExternalProviderUser type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type ExternalProviderUser struct { ExternalName string `json:"externalName"` } +type _ExternalProviderUser ExternalProviderUser + // NewExternalProviderUser instantiates a new ExternalProviderUser object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o ExternalProviderUser) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ExternalProviderUser) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "providerName", + "linkedAt", + "externalName", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExternalProviderUser := _ExternalProviderUser{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExternalProviderUser) + + if err != nil { + return err + } + + *o = ExternalProviderUser(varExternalProviderUser) + + return err +} + type NullableExternalProviderUser struct { value *ExternalProviderUser isSet bool diff --git a/model_file_info.go b/model_file_info.go index b05797c..31c2642 100644 --- a/model_file_info.go +++ b/model_file_info.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -43,6 +45,8 @@ type FileInfo struct { UploaderId NullableString `json:"uploaderId"` } +type _FileInfo FileInfo + // NewFileInfo instantiates a new FileInfo object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -368,6 +372,53 @@ func (o FileInfo) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *FileInfo) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "mime", + "size", + "md5", + "isAnimatedImage", + "createdAt", + "thumbnails", + "thumbnail", + "channelId", + "uploaderId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFileInfo := _FileInfo{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFileInfo) + + if err != nil { + return err + } + + *o = FileInfo(varFileInfo) + + return err +} + type NullableFileInfo struct { value *FileInfo isSet bool diff --git a/model_file_info_thumbnail.go b/model_file_info_thumbnail.go index fb52fb6..539a913 100644 --- a/model_file_info_thumbnail.go +++ b/model_file_info_thumbnail.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the FileInfoThumbnail type satisfies the MappedNullable interface at compile time @@ -30,6 +32,8 @@ type FileInfoThumbnail struct { Height *int32 `json:"height,omitempty"` } +type _FileInfoThumbnail FileInfoThumbnail + // NewFileInfoThumbnail instantiates a new FileInfoThumbnail object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -165,6 +169,43 @@ func (o FileInfoThumbnail) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *FileInfoThumbnail) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "mime", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFileInfoThumbnail := _FileInfoThumbnail{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFileInfoThumbnail) + + if err != nil { + return err + } + + *o = FileInfoThumbnail(varFileInfoThumbnail) + + return err +} + type NullableFileInfoThumbnail struct { value *FileInfoThumbnail isSet bool diff --git a/model_forced_notification_changed_event.go b/model_forced_notification_changed_event.go index fbae0ec..9817477 100644 --- a/model_forced_notification_changed_event.go +++ b/model_forced_notification_changed_event.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ForcedNotificationChangedEvent type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type ForcedNotificationChangedEvent struct { Force bool `json:"force"` } +type _ForcedNotificationChangedEvent ForcedNotificationChangedEvent + // NewForcedNotificationChangedEvent instantiates a new ForcedNotificationChangedEvent object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o ForcedNotificationChangedEvent) ToMap() (map[string]interface{}, error) return toSerialize, nil } +func (o *ForcedNotificationChangedEvent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "userId", + "force", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varForcedNotificationChangedEvent := _ForcedNotificationChangedEvent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varForcedNotificationChangedEvent) + + if err != nil { + return err + } + + *o = ForcedNotificationChangedEvent(varForcedNotificationChangedEvent) + + return err +} + type NullableForcedNotificationChangedEvent struct { value *ForcedNotificationChangedEvent isSet bool diff --git a/model_get_bot_200_response.go b/model_get_bot_200_response.go index ff7ae11..38554be 100644 --- a/model_get_bot_200_response.go +++ b/model_get_bot_200_response.go @@ -13,6 +13,7 @@ package traq import ( "encoding/json" "fmt" + "gopkg.in/validator.v2" ) // GetBot200Response - struct for GetBot200Response @@ -46,7 +47,11 @@ func (dst *GetBot200Response) UnmarshalJSON(data []byte) error { if string(jsonBot) == "{}" { // empty struct dst.Bot = nil } else { - match++ + if err = validator.Validate(dst.Bot); err != nil { + dst.Bot = nil + } else { + match++ + } } } else { dst.Bot = nil @@ -59,7 +64,11 @@ func (dst *GetBot200Response) UnmarshalJSON(data []byte) error { if string(jsonBotDetail) == "{}" { // empty struct dst.BotDetail = nil } else { - match++ + if err = validator.Validate(dst.BotDetail); err != nil { + dst.BotDetail = nil + } else { + match++ + } } } else { dst.BotDetail = nil @@ -108,6 +117,20 @@ func (obj *GetBot200Response) GetActualInstance() interface{} { return nil } +// Get the actual instance value +func (obj GetBot200Response) GetActualInstanceValue() interface{} { + if obj.Bot != nil { + return *obj.Bot + } + + if obj.BotDetail != nil { + return *obj.BotDetail + } + + // all schemas are nil + return nil +} + type NullableGetBot200Response struct { value *GetBot200Response isSet bool diff --git a/model_get_client_200_response.go b/model_get_client_200_response.go index a7c412c..e99d972 100644 --- a/model_get_client_200_response.go +++ b/model_get_client_200_response.go @@ -13,6 +13,7 @@ package traq import ( "encoding/json" "fmt" + "gopkg.in/validator.v2" ) // GetClient200Response - struct for GetClient200Response @@ -46,7 +47,11 @@ func (dst *GetClient200Response) UnmarshalJSON(data []byte) error { if string(jsonOAuth2Client) == "{}" { // empty struct dst.OAuth2Client = nil } else { - match++ + if err = validator.Validate(dst.OAuth2Client); err != nil { + dst.OAuth2Client = nil + } else { + match++ + } } } else { dst.OAuth2Client = nil @@ -59,7 +64,11 @@ func (dst *GetClient200Response) UnmarshalJSON(data []byte) error { if string(jsonOAuth2ClientDetail) == "{}" { // empty struct dst.OAuth2ClientDetail = nil } else { - match++ + if err = validator.Validate(dst.OAuth2ClientDetail); err != nil { + dst.OAuth2ClientDetail = nil + } else { + match++ + } } } else { dst.OAuth2ClientDetail = nil @@ -108,6 +117,20 @@ func (obj *GetClient200Response) GetActualInstance() interface{} { return nil } +// Get the actual instance value +func (obj GetClient200Response) GetActualInstanceValue() interface{} { + if obj.OAuth2Client != nil { + return *obj.OAuth2Client + } + + if obj.OAuth2ClientDetail != nil { + return *obj.OAuth2ClientDetail + } + + // all schemas are nil + return nil +} + type NullableGetClient200Response struct { value *GetClient200Response isSet bool diff --git a/model_get_notify_citation.go b/model_get_notify_citation.go index b8bfdbe..e884756 100644 --- a/model_get_notify_citation.go +++ b/model_get_notify_citation.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the GetNotifyCitation type satisfies the MappedNullable interface at compile time @@ -22,6 +24,8 @@ type GetNotifyCitation struct { NotifyCitation bool `json:"notifyCitation"` } +type _GetNotifyCitation GetNotifyCitation + // NewGetNotifyCitation instantiates a new GetNotifyCitation object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -78,6 +82,43 @@ func (o GetNotifyCitation) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *GetNotifyCitation) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "notifyCitation", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetNotifyCitation := _GetNotifyCitation{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGetNotifyCitation) + + if err != nil { + return err + } + + *o = GetNotifyCitation(varGetNotifyCitation) + + return err +} + type NullableGetNotifyCitation struct { value *GetNotifyCitation isSet bool diff --git a/model_login_session.go b/model_login_session.go index b75d1c8..47cbed0 100644 --- a/model_login_session.go +++ b/model_login_session.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -26,6 +28,8 @@ type LoginSession struct { IssuedAt time.Time `json:"issuedAt"` } +type _LoginSession LoginSession + // NewLoginSession instantiates a new LoginSession object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -108,6 +112,44 @@ func (o LoginSession) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *LoginSession) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "issuedAt", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLoginSession := _LoginSession{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLoginSession) + + if err != nil { + return err + } + + *o = LoginSession(varLoginSession) + + return err +} + type NullableLoginSession struct { value *LoginSession isSet bool diff --git a/model_message.go b/model_message.go index 5917fd1..433dac9 100644 --- a/model_message.go +++ b/model_message.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -40,6 +42,8 @@ type Message struct { ThreadId NullableString `json:"threadId"` } +type _Message Message + // NewMessage instantiates a new Message object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -306,6 +310,51 @@ func (o Message) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *Message) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "userId", + "channelId", + "content", + "createdAt", + "updatedAt", + "pinned", + "stamps", + "threadId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMessage := _Message{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMessage) + + if err != nil { + return err + } + + *o = Message(varMessage) + + return err +} + type NullableMessage struct { value *Message isSet bool diff --git a/model_message_clip.go b/model_message_clip.go index 8f4ea00..b1033c5 100644 --- a/model_message_clip.go +++ b/model_message_clip.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -26,6 +28,8 @@ type MessageClip struct { ClippedAt time.Time `json:"clippedAt"` } +type _MessageClip MessageClip + // NewMessageClip instantiates a new MessageClip object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -108,6 +112,44 @@ func (o MessageClip) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *MessageClip) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "folderId", + "clippedAt", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMessageClip := _MessageClip{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMessageClip) + + if err != nil { + return err + } + + *o = MessageClip(varMessageClip) + + return err +} + type NullableMessageClip struct { value *MessageClip isSet bool diff --git a/model_message_pin.go b/model_message_pin.go index e81ceeb..488d581 100644 --- a/model_message_pin.go +++ b/model_message_pin.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -26,6 +28,8 @@ type MessagePin struct { PinnedAt time.Time `json:"pinnedAt"` } +type _MessagePin MessagePin + // NewMessagePin instantiates a new MessagePin object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -108,6 +112,44 @@ func (o MessagePin) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *MessagePin) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "userId", + "pinnedAt", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMessagePin := _MessagePin{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMessagePin) + + if err != nil { + return err + } + + *o = MessagePin(varMessagePin) + + return err +} + type NullableMessagePin struct { value *MessagePin isSet bool diff --git a/model_message_search_result.go b/model_message_search_result.go index 3168b60..405b426 100644 --- a/model_message_search_result.go +++ b/model_message_search_result.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the MessageSearchResult type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type MessageSearchResult struct { Hits []Message `json:"hits"` } +type _MessageSearchResult MessageSearchResult + // NewMessageSearchResult instantiates a new MessageSearchResult object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o MessageSearchResult) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *MessageSearchResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "totalHits", + "hits", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMessageSearchResult := _MessageSearchResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMessageSearchResult) + + if err != nil { + return err + } + + *o = MessageSearchResult(varMessageSearchResult) + + return err +} + type NullableMessageSearchResult struct { value *MessageSearchResult isSet bool diff --git a/model_message_stamp.go b/model_message_stamp.go index 1f4c53c..67d4a99 100644 --- a/model_message_stamp.go +++ b/model_message_stamp.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -32,6 +34,8 @@ type MessageStamp struct { UpdatedAt time.Time `json:"updatedAt"` } +type _MessageStamp MessageStamp + // NewMessageStamp instantiates a new MessageStamp object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -192,6 +196,47 @@ func (o MessageStamp) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *MessageStamp) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "userId", + "stampId", + "count", + "createdAt", + "updatedAt", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMessageStamp := _MessageStamp{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMessageStamp) + + if err != nil { + return err + } + + *o = MessageStamp(varMessageStamp) + + return err +} + type NullableMessageStamp struct { value *MessageStamp isSet bool diff --git a/model_my_channel_view_state.go b/model_my_channel_view_state.go index 8af8cf6..15e2973 100644 --- a/model_my_channel_view_state.go +++ b/model_my_channel_view_state.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the MyChannelViewState type satisfies the MappedNullable interface at compile time @@ -26,6 +28,8 @@ type MyChannelViewState struct { State ChannelViewState `json:"state"` } +type _MyChannelViewState MyChannelViewState + // NewMyChannelViewState instantiates a new MyChannelViewState object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -134,6 +138,45 @@ func (o MyChannelViewState) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *MyChannelViewState) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "key", + "channelId", + "state", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMyChannelViewState := _MyChannelViewState{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMyChannelViewState) + + if err != nil { + return err + } + + *o = MyChannelViewState(varMyChannelViewState) + + return err +} + type NullableMyChannelViewState struct { value *MyChannelViewState isSet bool diff --git a/model_my_user_detail.go b/model_my_user_detail.go index 3b62cc5..42117d7 100644 --- a/model_my_user_detail.go +++ b/model_my_user_detail.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -33,9 +35,9 @@ type MyUserDetail struct { // 最終オンライン日時 LastOnline NullableTime `json:"lastOnline"` // Twitter ID - TwitterId string `json:"twitterId"` + TwitterId string `json:"twitterId" validate:"regexp=^[a-zA-Z0-9_]{1,15}$"` // ユーザー名 - Name string `json:"name"` + Name string `json:"name" validate:"regexp=^[a-zA-Z0-9_-]{1,32}$"` // ユーザー表示名 DisplayName string `json:"displayName"` // アイコンファイルUUID @@ -49,6 +51,8 @@ type MyUserDetail struct { HomeChannel NullableString `json:"homeChannel"` } +type _MyUserDetail MyUserDetail + // NewMyUserDetail instantiates a new MyUserDetail object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -447,6 +451,56 @@ func (o MyUserDetail) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *MyUserDetail) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "bio", + "groups", + "tags", + "updatedAt", + "lastOnline", + "twitterId", + "name", + "displayName", + "iconFileId", + "bot", + "state", + "permissions", + "homeChannel", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMyUserDetail := _MyUserDetail{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMyUserDetail) + + if err != nil { + return err + } + + *o = MyUserDetail(varMyUserDetail) + + return err +} + type NullableMyUserDetail struct { value *MyUserDetail isSet bool diff --git a/model_name_changed_event.go b/model_name_changed_event.go index 4dfc192..cddfba9 100644 --- a/model_name_changed_event.go +++ b/model_name_changed_event.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the NameChangedEvent type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type NameChangedEvent struct { After string `json:"after"` } +type _NameChangedEvent NameChangedEvent + // NewNameChangedEvent instantiates a new NameChangedEvent object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o NameChangedEvent) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *NameChangedEvent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "userId", + "before", + "after", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNameChangedEvent := _NameChangedEvent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNameChangedEvent) + + if err != nil { + return err + } + + *o = NameChangedEvent(varNameChangedEvent) + + return err +} + type NullableNameChangedEvent struct { value *NameChangedEvent isSet bool diff --git a/model_o_auth2_client.go b/model_o_auth2_client.go index ca4d8a0..afa0dbb 100644 --- a/model_o_auth2_client.go +++ b/model_o_auth2_client.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the OAuth2Client type satisfies the MappedNullable interface at compile time @@ -33,6 +35,8 @@ type OAuth2Client struct { Confidential bool `json:"confidential"` } +type _OAuth2Client OAuth2Client + // NewOAuth2Client instantiates a new OAuth2Client object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -219,6 +223,48 @@ func (o OAuth2Client) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *OAuth2Client) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "description", + "developerId", + "scopes", + "confidential", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOAuth2Client := _OAuth2Client{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOAuth2Client) + + if err != nil { + return err + } + + *o = OAuth2Client(varOAuth2Client) + + return err +} + type NullableOAuth2Client struct { value *OAuth2Client isSet bool diff --git a/model_o_auth2_client_detail.go b/model_o_auth2_client_detail.go index 701d610..144e065 100644 --- a/model_o_auth2_client_detail.go +++ b/model_o_auth2_client_detail.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the OAuth2ClientDetail type satisfies the MappedNullable interface at compile time @@ -37,6 +39,8 @@ type OAuth2ClientDetail struct { Confidential bool `json:"confidential"` } +type _OAuth2ClientDetail OAuth2ClientDetail + // NewOAuth2ClientDetail instantiates a new OAuth2ClientDetail object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -275,6 +279,50 @@ func (o OAuth2ClientDetail) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *OAuth2ClientDetail) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "developerId", + "description", + "name", + "scopes", + "callbackUrl", + "secret", + "confidential", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOAuth2ClientDetail := _OAuth2ClientDetail{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOAuth2ClientDetail) + + if err != nil { + return err + } + + *o = OAuth2ClientDetail(varOAuth2ClientDetail) + + return err +} + type NullableOAuth2ClientDetail struct { value *OAuth2ClientDetail isSet bool diff --git a/model_o_auth2_token.go b/model_o_auth2_token.go index 0df4fc6..bc32841 100644 --- a/model_o_auth2_token.go +++ b/model_o_auth2_token.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the OAuth2Token type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type OAuth2Token struct { IdToken *string `json:"id_token,omitempty"` } +type _OAuth2Token OAuth2Token + // NewOAuth2Token instantiates a new OAuth2Token object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -249,6 +253,44 @@ func (o OAuth2Token) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *OAuth2Token) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access_token", + "token_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOAuth2Token := _OAuth2Token{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOAuth2Token) + + if err != nil { + return err + } + + *o = OAuth2Token(varOAuth2Token) + + return err +} + type NullableOAuth2Token struct { value *OAuth2Token isSet bool diff --git a/model_ogp.go b/model_ogp.go index 1a64b0f..e0e5e03 100644 --- a/model_ogp.go +++ b/model_ogp.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the Ogp type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type Ogp struct { Videos []OgpMedia `json:"videos"` } +type _Ogp Ogp + // NewOgp instantiates a new Ogp object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -213,6 +217,48 @@ func (o Ogp) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *Ogp) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "title", + "url", + "images", + "description", + "videos", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOgp := _Ogp{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOgp) + + if err != nil { + return err + } + + *o = Ogp(varOgp) + + return err +} + type NullableOgp struct { value *Ogp isSet bool diff --git a/model_ogp_media.go b/model_ogp_media.go index 451d510..359da76 100644 --- a/model_ogp_media.go +++ b/model_ogp_media.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the OgpMedia type satisfies the MappedNullable interface at compile time @@ -26,6 +28,8 @@ type OgpMedia struct { Height NullableInt32 `json:"height"` } +type _OgpMedia OgpMedia + // NewOgpMedia instantiates a new OgpMedia object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -194,6 +198,47 @@ func (o OgpMedia) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *OgpMedia) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + "secureUrl", + "type", + "width", + "height", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOgpMedia := _OgpMedia{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOgpMedia) + + if err != nil { + return err + } + + *o = OgpMedia(varOgpMedia) + + return err +} + type NullableOgpMedia struct { value *OgpMedia isSet bool diff --git a/model_oidc_traq_user_info.go b/model_oidc_traq_user_info.go index ae4be86..7e5beef 100644 --- a/model_oidc_traq_user_info.go +++ b/model_oidc_traq_user_info.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -29,7 +31,7 @@ type OIDCTraqUserInfo struct { // 最終オンライン日時 LastOnline NullableTime `json:"last_online"` // Twitter ID - TwitterId string `json:"twitter_id"` + TwitterId string `json:"twitter_id" validate:"regexp=^[a-zA-Z0-9_]{1,15}$"` // ユーザー表示名 DisplayName string `json:"display_name"` // アイコンファイルUUID @@ -43,6 +45,8 @@ type OIDCTraqUserInfo struct { HomeChannel NullableString `json:"home_channel"` } +type _OIDCTraqUserInfo OIDCTraqUserInfo + // NewOIDCTraqUserInfo instantiates a new OIDCTraqUserInfo object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -363,6 +367,53 @@ func (o OIDCTraqUserInfo) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *OIDCTraqUserInfo) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "bio", + "groups", + "tags", + "last_online", + "twitter_id", + "display_name", + "icon_file_id", + "bot", + "state", + "permissions", + "home_channel", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOIDCTraqUserInfo := _OIDCTraqUserInfo{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOIDCTraqUserInfo) + + if err != nil { + return err + } + + *o = OIDCTraqUserInfo(varOIDCTraqUserInfo) + + return err +} + type NullableOIDCTraqUserInfo struct { value *OIDCTraqUserInfo isSet bool diff --git a/model_oidc_user_info.go b/model_oidc_user_info.go index fb3b9ce..ba71b1a 100644 --- a/model_oidc_user_info.go +++ b/model_oidc_user_info.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the OIDCUserInfo type satisfies the MappedNullable interface at compile time @@ -22,9 +24,9 @@ type OIDCUserInfo struct { // ユーザーUUID Sub string `json:"sub"` // ユーザー名 - Name string `json:"name"` + Name string `json:"name" validate:"regexp=^[a-zA-Z0-9_-]{1,32}$"` // ユーザー名 - PreferredUsername string `json:"preferred_username"` + PreferredUsername string `json:"preferred_username" validate:"regexp=^[a-zA-Z0-9_-]{1,32}$"` // アイコン画像URL Picture string `json:"picture"` // 更新日時 @@ -32,6 +34,8 @@ type OIDCUserInfo struct { Traq *OIDCTraqUserInfo `json:"traq,omitempty"` } +type _OIDCUserInfo OIDCUserInfo + // NewOIDCUserInfo instantiates a new OIDCUserInfo object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -236,6 +240,46 @@ func (o OIDCUserInfo) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *OIDCUserInfo) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "sub", + "name", + "preferred_username", + "picture", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOIDCUserInfo := _OIDCUserInfo{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOIDCUserInfo) + + if err != nil { + return err + } + + *o = OIDCUserInfo(varOIDCUserInfo) + + return err +} + type NullableOIDCUserInfo struct { value *OIDCUserInfo isSet bool diff --git a/model_parent_changed_event.go b/model_parent_changed_event.go index 8726aba..42c5168 100644 --- a/model_parent_changed_event.go +++ b/model_parent_changed_event.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ParentChangedEvent type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type ParentChangedEvent struct { After string `json:"after"` } +type _ParentChangedEvent ParentChangedEvent + // NewParentChangedEvent instantiates a new ParentChangedEvent object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o ParentChangedEvent) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ParentChangedEvent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "userId", + "before", + "after", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varParentChangedEvent := _ParentChangedEvent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varParentChangedEvent) + + if err != nil { + return err + } + + *o = ParentChangedEvent(varParentChangedEvent) + + return err +} + type NullableParentChangedEvent struct { value *ParentChangedEvent isSet bool diff --git a/model_patch_channel_request.go b/model_patch_channel_request.go index dae8c05..9132c4d 100644 --- a/model_patch_channel_request.go +++ b/model_patch_channel_request.go @@ -20,7 +20,7 @@ var _ MappedNullable = &PatchChannelRequest{} // PatchChannelRequest チャンネル情報変更リクエスト type PatchChannelRequest struct { // チャンネル名 - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty" validate:"regexp=^[a-zA-Z0-9-_]{1,20}$"` // アーカイブされているかどうか Archived *bool `json:"archived,omitempty"` // 強制通知チャンネルかどうか diff --git a/model_patch_group_member_request.go b/model_patch_group_member_request.go index b32793e..355a8e3 100644 --- a/model_patch_group_member_request.go +++ b/model_patch_group_member_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PatchGroupMemberRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PatchGroupMemberRequest struct { Role string `json:"role"` } +type _PatchGroupMemberRequest PatchGroupMemberRequest + // NewPatchGroupMemberRequest instantiates a new PatchGroupMemberRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PatchGroupMemberRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PatchGroupMemberRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "role", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPatchGroupMemberRequest := _PatchGroupMemberRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPatchGroupMemberRequest) + + if err != nil { + return err + } + + *o = PatchGroupMemberRequest(varPatchGroupMemberRequest) + + return err +} + type NullablePatchGroupMemberRequest struct { value *PatchGroupMemberRequest isSet bool diff --git a/model_patch_me_request.go b/model_patch_me_request.go index e8cc56b..9468881 100644 --- a/model_patch_me_request.go +++ b/model_patch_me_request.go @@ -22,7 +22,7 @@ type PatchMeRequest struct { // 新しい表示名 DisplayName *string `json:"displayName,omitempty"` // TwitterID - TwitterId *string `json:"twitterId,omitempty"` + TwitterId *string `json:"twitterId,omitempty" validate:"regexp=^[a-zA-Z0-9_]{1,15}$"` // 自己紹介(biography) Bio *string `json:"bio,omitempty"` // ホームチャンネルのUUID `00000000-0000-0000-0000-000000000000`を指定すると、ホームチャンネルが`null`に設定されます diff --git a/model_patch_stamp_request.go b/model_patch_stamp_request.go index 66b043b..bed6b0a 100644 --- a/model_patch_stamp_request.go +++ b/model_patch_stamp_request.go @@ -20,7 +20,7 @@ var _ MappedNullable = &PatchStampRequest{} // PatchStampRequest スタンプ情報変更リクエスト type PatchStampRequest struct { // スタンプ名 - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty" validate:"regexp=^[a-zA-Z0-9_-]{1,32}$"` // 作成者UUID CreatorId *string `json:"creatorId,omitempty"` } diff --git a/model_patch_user_request.go b/model_patch_user_request.go index 660e800..b06332c 100644 --- a/model_patch_user_request.go +++ b/model_patch_user_request.go @@ -22,7 +22,7 @@ type PatchUserRequest struct { // 新しい表示名 DisplayName *string `json:"displayName,omitempty"` // TwitterID - TwitterId *string `json:"twitterId,omitempty"` + TwitterId *string `json:"twitterId,omitempty" validate:"regexp=^[a-zA-Z0-9_]{1,15}$"` State *UserAccountState `json:"state,omitempty"` // ユーザーロール Role *string `json:"role,omitempty"` diff --git a/model_patch_user_tag_request.go b/model_patch_user_tag_request.go index 5c2ac1e..9289cbd 100644 --- a/model_patch_user_tag_request.go +++ b/model_patch_user_tag_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PatchUserTagRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PatchUserTagRequest struct { IsLocked bool `json:"isLocked"` } +type _PatchUserTagRequest PatchUserTagRequest + // NewPatchUserTagRequest instantiates a new PatchUserTagRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PatchUserTagRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PatchUserTagRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "isLocked", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPatchUserTagRequest := _PatchUserTagRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPatchUserTagRequest) + + if err != nil { + return err + } + + *o = PatchUserTagRequest(varPatchUserTagRequest) + + return err +} + type NullablePatchUserTagRequest struct { value *PatchUserTagRequest isSet bool diff --git a/model_pin.go b/model_pin.go index d6b180b..d2109a7 100644 --- a/model_pin.go +++ b/model_pin.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -27,6 +29,8 @@ type Pin struct { Message Message `json:"message"` } +type _Pin Pin + // NewPin instantiates a new Pin object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o Pin) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *Pin) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "userId", + "pinnedAt", + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPin := _Pin{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPin) + + if err != nil { + return err + } + + *o = Pin(varPin) + + return err +} + type NullablePin struct { value *Pin isSet bool diff --git a/model_pin_added_event.go b/model_pin_added_event.go index 0089e08..49eb072 100644 --- a/model_pin_added_event.go +++ b/model_pin_added_event.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PinAddedEvent type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type PinAddedEvent struct { MessageId string `json:"messageId"` } +type _PinAddedEvent PinAddedEvent + // NewPinAddedEvent instantiates a new PinAddedEvent object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o PinAddedEvent) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PinAddedEvent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "userId", + "messageId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPinAddedEvent := _PinAddedEvent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPinAddedEvent) + + if err != nil { + return err + } + + *o = PinAddedEvent(varPinAddedEvent) + + return err +} + type NullablePinAddedEvent struct { value *PinAddedEvent isSet bool diff --git a/model_pin_removed_event.go b/model_pin_removed_event.go index 6456df5..92f7292 100644 --- a/model_pin_removed_event.go +++ b/model_pin_removed_event.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PinRemovedEvent type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type PinRemovedEvent struct { MessageId string `json:"messageId"` } +type _PinRemovedEvent PinRemovedEvent + // NewPinRemovedEvent instantiates a new PinRemovedEvent object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o PinRemovedEvent) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PinRemovedEvent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "userId", + "messageId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPinRemovedEvent := _PinRemovedEvent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPinRemovedEvent) + + if err != nil { + return err + } + + *o = PinRemovedEvent(varPinRemovedEvent) + + return err +} + type NullablePinRemovedEvent struct { value *PinRemovedEvent isSet bool diff --git a/model_post_bot_action_join_request.go b/model_post_bot_action_join_request.go index 43e56a7..a2330ec 100644 --- a/model_post_bot_action_join_request.go +++ b/model_post_bot_action_join_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostBotActionJoinRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PostBotActionJoinRequest struct { ChannelId string `json:"channelId"` } +type _PostBotActionJoinRequest PostBotActionJoinRequest + // NewPostBotActionJoinRequest instantiates a new PostBotActionJoinRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PostBotActionJoinRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostBotActionJoinRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "channelId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostBotActionJoinRequest := _PostBotActionJoinRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostBotActionJoinRequest) + + if err != nil { + return err + } + + *o = PostBotActionJoinRequest(varPostBotActionJoinRequest) + + return err +} + type NullablePostBotActionJoinRequest struct { value *PostBotActionJoinRequest isSet bool diff --git a/model_post_bot_action_leave_request.go b/model_post_bot_action_leave_request.go index 1949414..cccce20 100644 --- a/model_post_bot_action_leave_request.go +++ b/model_post_bot_action_leave_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostBotActionLeaveRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PostBotActionLeaveRequest struct { ChannelId string `json:"channelId"` } +type _PostBotActionLeaveRequest PostBotActionLeaveRequest + // NewPostBotActionLeaveRequest instantiates a new PostBotActionLeaveRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PostBotActionLeaveRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostBotActionLeaveRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "channelId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostBotActionLeaveRequest := _PostBotActionLeaveRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostBotActionLeaveRequest) + + if err != nil { + return err + } + + *o = PostBotActionLeaveRequest(varPostBotActionLeaveRequest) + + return err +} + type NullablePostBotActionLeaveRequest struct { value *PostBotActionLeaveRequest isSet bool diff --git a/model_post_bot_request.go b/model_post_bot_request.go index 755550a..31eeee1 100644 --- a/model_post_bot_request.go +++ b/model_post_bot_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostBotRequest type satisfies the MappedNullable interface at compile time @@ -20,7 +22,7 @@ var _ MappedNullable = &PostBotRequest{} // PostBotRequest BOT作成リクエスト type PostBotRequest struct { // BOTユーザーID 自動的に接頭辞\"BOT_\"が付与されます - Name string `json:"name"` + Name string `json:"name" validate:"regexp=^[a-zA-Z0-9_-]{1,16}$"` // BOTユーザー表示名 DisplayName string `json:"displayName"` // BOTの説明 @@ -30,6 +32,8 @@ type PostBotRequest struct { Endpoint *string `json:"endpoint,omitempty"` } +type _PostBotRequest PostBotRequest + // NewPostBotRequest instantiates a new PostBotRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -199,6 +203,46 @@ func (o PostBotRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostBotRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "displayName", + "description", + "mode", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostBotRequest := _PostBotRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostBotRequest) + + if err != nil { + return err + } + + *o = PostBotRequest(varPostBotRequest) + + return err +} + type NullablePostBotRequest struct { value *PostBotRequest isSet bool diff --git a/model_post_channel_request.go b/model_post_channel_request.go index 6bc41f5..173e415 100644 --- a/model_post_channel_request.go +++ b/model_post_channel_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostChannelRequest type satisfies the MappedNullable interface at compile time @@ -20,11 +22,13 @@ var _ MappedNullable = &PostChannelRequest{} // PostChannelRequest チャンネル作成リクエスト type PostChannelRequest struct { // チャンネル名 - Name string `json:"name"` + Name string `json:"name" validate:"regexp=^[a-zA-Z0-9-_]{1,20}$"` // 親チャンネルのUUID ルートに作成する場合はnullを指定 Parent NullableString `json:"parent"` } +type _PostChannelRequest PostChannelRequest + // NewPostChannelRequest instantiates a new PostChannelRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -109,6 +113,44 @@ func (o PostChannelRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostChannelRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "parent", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostChannelRequest := _PostChannelRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostChannelRequest) + + if err != nil { + return err + } + + *o = PostChannelRequest(varPostChannelRequest) + + return err +} + type NullablePostChannelRequest struct { value *PostChannelRequest isSet bool diff --git a/model_post_client_request.go b/model_post_client_request.go index 3c2cc17..96e7aa6 100644 --- a/model_post_client_request.go +++ b/model_post_client_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostClientRequest type satisfies the MappedNullable interface at compile time @@ -31,6 +33,8 @@ type PostClientRequest struct { Confidential *bool `json:"confidential,omitempty"` } +type _PostClientRequest PostClientRequest + // NewPostClientRequest instantiates a new PostClientRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -204,6 +208,46 @@ func (o PostClientRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostClientRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "callbackUrl", + "scopes", + "description", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostClientRequest := _PostClientRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostClientRequest) + + if err != nil { + return err + } + + *o = PostClientRequest(varPostClientRequest) + + return err +} + type NullablePostClientRequest struct { value *PostClientRequest isSet bool diff --git a/model_post_clip_folder_message_request.go b/model_post_clip_folder_message_request.go index ec001ae..17e098d 100644 --- a/model_post_clip_folder_message_request.go +++ b/model_post_clip_folder_message_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostClipFolderMessageRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PostClipFolderMessageRequest struct { MessageId string `json:"messageId"` } +type _PostClipFolderMessageRequest PostClipFolderMessageRequest + // NewPostClipFolderMessageRequest instantiates a new PostClipFolderMessageRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PostClipFolderMessageRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostClipFolderMessageRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "messageId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostClipFolderMessageRequest := _PostClipFolderMessageRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostClipFolderMessageRequest) + + if err != nil { + return err + } + + *o = PostClipFolderMessageRequest(varPostClipFolderMessageRequest) + + return err +} + type NullablePostClipFolderMessageRequest struct { value *PostClipFolderMessageRequest isSet bool diff --git a/model_post_clip_folder_request.go b/model_post_clip_folder_request.go index 5ca8a0c..e72a6ce 100644 --- a/model_post_clip_folder_request.go +++ b/model_post_clip_folder_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostClipFolderRequest type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type PostClipFolderRequest struct { Description string `json:"description"` } +type _PostClipFolderRequest PostClipFolderRequest + // NewPostClipFolderRequest instantiates a new PostClipFolderRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o PostClipFolderRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostClipFolderRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "description", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostClipFolderRequest := _PostClipFolderRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostClipFolderRequest) + + if err != nil { + return err + } + + *o = PostClipFolderRequest(varPostClipFolderRequest) + + return err +} + type NullablePostClipFolderRequest struct { value *PostClipFolderRequest isSet bool diff --git a/model_post_link_external_account.go b/model_post_link_external_account.go index 27c6902..55a7e00 100644 --- a/model_post_link_external_account.go +++ b/model_post_link_external_account.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostLinkExternalAccount type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PostLinkExternalAccount struct { ProviderName string `json:"providerName"` } +type _PostLinkExternalAccount PostLinkExternalAccount + // NewPostLinkExternalAccount instantiates a new PostLinkExternalAccount object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PostLinkExternalAccount) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostLinkExternalAccount) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "providerName", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostLinkExternalAccount := _PostLinkExternalAccount{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostLinkExternalAccount) + + if err != nil { + return err + } + + *o = PostLinkExternalAccount(varPostLinkExternalAccount) + + return err +} + type NullablePostLinkExternalAccount struct { value *PostLinkExternalAccount isSet bool diff --git a/model_post_login_request.go b/model_post_login_request.go index 53d15c9..670fc1a 100644 --- a/model_post_login_request.go +++ b/model_post_login_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostLoginRequest type satisfies the MappedNullable interface at compile time @@ -20,11 +22,13 @@ var _ MappedNullable = &PostLoginRequest{} // PostLoginRequest ログインリクエスト type PostLoginRequest struct { // ユーザー名 - Name string `json:"name"` + Name string `json:"name" validate:"regexp=^[a-zA-Z0-9_-]{1,32}$"` // パスワード - Password string `json:"password"` + Password string `json:"password" validate:"regexp=^[\\\\x20-\\\\x7E]{10,32}$"` } +type _PostLoginRequest PostLoginRequest + // NewPostLoginRequest instantiates a new PostLoginRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o PostLoginRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostLoginRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "password", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostLoginRequest := _PostLoginRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostLoginRequest) + + if err != nil { + return err + } + + *o = PostLoginRequest(varPostLoginRequest) + + return err +} + type NullablePostLoginRequest struct { value *PostLoginRequest isSet bool diff --git a/model_post_message_request.go b/model_post_message_request.go index f750f19..9a1da52 100644 --- a/model_post_message_request.go +++ b/model_post_message_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostMessageRequest type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type PostMessageRequest struct { Embed *bool `json:"embed,omitempty"` } +type _PostMessageRequest PostMessageRequest + // NewPostMessageRequest instantiates a new PostMessageRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -120,6 +124,43 @@ func (o PostMessageRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostMessageRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "content", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostMessageRequest := _PostMessageRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostMessageRequest) + + if err != nil { + return err + } + + *o = PostMessageRequest(varPostMessageRequest) + + return err +} + type NullablePostMessageRequest struct { value *PostMessageRequest isSet bool diff --git a/model_post_message_stamp_request.go b/model_post_message_stamp_request.go index 33170c3..5b144bc 100644 --- a/model_post_message_stamp_request.go +++ b/model_post_message_stamp_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostMessageStampRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PostMessageStampRequest struct { Count int32 `json:"count"` } +type _PostMessageStampRequest PostMessageStampRequest + // NewPostMessageStampRequest instantiates a new PostMessageStampRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PostMessageStampRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostMessageStampRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostMessageStampRequest := _PostMessageStampRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostMessageStampRequest) + + if err != nil { + return err + } + + *o = PostMessageStampRequest(varPostMessageStampRequest) + + return err +} + type NullablePostMessageStampRequest struct { value *PostMessageStampRequest isSet bool diff --git a/model_post_my_fcm_device_request.go b/model_post_my_fcm_device_request.go index d8c493f..d32b0eb 100644 --- a/model_post_my_fcm_device_request.go +++ b/model_post_my_fcm_device_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostMyFCMDeviceRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PostMyFCMDeviceRequest struct { Token string `json:"token"` } +type _PostMyFCMDeviceRequest PostMyFCMDeviceRequest + // NewPostMyFCMDeviceRequest instantiates a new PostMyFCMDeviceRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PostMyFCMDeviceRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostMyFCMDeviceRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "token", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostMyFCMDeviceRequest := _PostMyFCMDeviceRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostMyFCMDeviceRequest) + + if err != nil { + return err + } + + *o = PostMyFCMDeviceRequest(varPostMyFCMDeviceRequest) + + return err +} + type NullablePostMyFCMDeviceRequest struct { value *PostMyFCMDeviceRequest isSet bool diff --git a/model_post_stamp_palette_request.go b/model_post_stamp_palette_request.go index 4c533c6..d40cb19 100644 --- a/model_post_stamp_palette_request.go +++ b/model_post_stamp_palette_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostStampPaletteRequest type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type PostStampPaletteRequest struct { Description string `json:"description"` } +type _PostStampPaletteRequest PostStampPaletteRequest + // NewPostStampPaletteRequest instantiates a new PostStampPaletteRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o PostStampPaletteRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostStampPaletteRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "stamps", + "name", + "description", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostStampPaletteRequest := _PostStampPaletteRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostStampPaletteRequest) + + if err != nil { + return err + } + + *o = PostStampPaletteRequest(varPostStampPaletteRequest) + + return err +} + type NullablePostStampPaletteRequest struct { value *PostStampPaletteRequest isSet bool diff --git a/model_post_star_request.go b/model_post_star_request.go index 0edee2c..fe870a7 100644 --- a/model_post_star_request.go +++ b/model_post_star_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostStarRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PostStarRequest struct { ChannelId string `json:"channelId"` } +type _PostStarRequest PostStarRequest + // NewPostStarRequest instantiates a new PostStarRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PostStarRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostStarRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "channelId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostStarRequest := _PostStarRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostStarRequest) + + if err != nil { + return err + } + + *o = PostStarRequest(varPostStarRequest) + + return err +} + type NullablePostStarRequest struct { value *PostStarRequest isSet bool diff --git a/model_post_unlink_external_account.go b/model_post_unlink_external_account.go index cd16a81..1168a55 100644 --- a/model_post_unlink_external_account.go +++ b/model_post_unlink_external_account.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostUnlinkExternalAccount type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PostUnlinkExternalAccount struct { ProviderName string `json:"providerName"` } +type _PostUnlinkExternalAccount PostUnlinkExternalAccount + // NewPostUnlinkExternalAccount instantiates a new PostUnlinkExternalAccount object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PostUnlinkExternalAccount) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostUnlinkExternalAccount) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "providerName", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostUnlinkExternalAccount := _PostUnlinkExternalAccount{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostUnlinkExternalAccount) + + if err != nil { + return err + } + + *o = PostUnlinkExternalAccount(varPostUnlinkExternalAccount) + + return err +} + type NullablePostUnlinkExternalAccount struct { value *PostUnlinkExternalAccount isSet bool diff --git a/model_post_user_group_admin_request.go b/model_post_user_group_admin_request.go index dccf3e1..ac67d9b 100644 --- a/model_post_user_group_admin_request.go +++ b/model_post_user_group_admin_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostUserGroupAdminRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PostUserGroupAdminRequest struct { Id string `json:"id"` } +type _PostUserGroupAdminRequest PostUserGroupAdminRequest + // NewPostUserGroupAdminRequest instantiates a new PostUserGroupAdminRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PostUserGroupAdminRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostUserGroupAdminRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostUserGroupAdminRequest := _PostUserGroupAdminRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostUserGroupAdminRequest) + + if err != nil { + return err + } + + *o = PostUserGroupAdminRequest(varPostUserGroupAdminRequest) + + return err +} + type NullablePostUserGroupAdminRequest struct { value *PostUserGroupAdminRequest isSet bool diff --git a/model_post_user_group_request.go b/model_post_user_group_request.go index 6603280..59c8c8c 100644 --- a/model_post_user_group_request.go +++ b/model_post_user_group_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostUserGroupRequest type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type PostUserGroupRequest struct { Type string `json:"type"` } +type _PostUserGroupRequest PostUserGroupRequest + // NewPostUserGroupRequest instantiates a new PostUserGroupRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o PostUserGroupRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostUserGroupRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "description", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostUserGroupRequest := _PostUserGroupRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostUserGroupRequest) + + if err != nil { + return err + } + + *o = PostUserGroupRequest(varPostUserGroupRequest) + + return err +} + type NullablePostUserGroupRequest struct { value *PostUserGroupRequest isSet bool diff --git a/model_post_user_request.go b/model_post_user_request.go index 828a34c..d8a5436 100644 --- a/model_post_user_request.go +++ b/model_post_user_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostUserRequest type satisfies the MappedNullable interface at compile time @@ -20,11 +22,13 @@ var _ MappedNullable = &PostUserRequest{} // PostUserRequest ユーザー登録リクエスト type PostUserRequest struct { // ユーザー名 - Name string `json:"name"` + Name string `json:"name" validate:"regexp=^[a-zA-Z0-9_-]{1,32}$"` // パスワード - Password *string `json:"password,omitempty"` + Password *string `json:"password,omitempty" validate:"regexp=^[\\\\x20-\\\\x7E]{10,32}$"` } +type _PostUserRequest PostUserRequest + // NewPostUserRequest instantiates a new PostUserRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -116,6 +120,43 @@ func (o PostUserRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostUserRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostUserRequest := _PostUserRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostUserRequest) + + if err != nil { + return err + } + + *o = PostUserRequest(varPostUserRequest) + + return err +} + type NullablePostUserRequest struct { value *PostUserRequest isSet bool diff --git a/model_post_user_tag_request.go b/model_post_user_tag_request.go index 3209db8..d7a38bc 100644 --- a/model_post_user_tag_request.go +++ b/model_post_user_tag_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostUserTagRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PostUserTagRequest struct { Tag string `json:"tag"` } +type _PostUserTagRequest PostUserTagRequest + // NewPostUserTagRequest instantiates a new PostUserTagRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PostUserTagRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostUserTagRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "tag", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostUserTagRequest := _PostUserTagRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostUserTagRequest) + + if err != nil { + return err + } + + *o = PostUserTagRequest(varPostUserTagRequest) + + return err +} + type NullablePostUserTagRequest struct { value *PostUserTagRequest isSet bool diff --git a/model_post_web_rtc_authenticate_request.go b/model_post_web_rtc_authenticate_request.go index dc54c68..fd5c4b6 100644 --- a/model_post_web_rtc_authenticate_request.go +++ b/model_post_web_rtc_authenticate_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostWebRTCAuthenticateRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PostWebRTCAuthenticateRequest struct { PeerId string `json:"peerId"` } +type _PostWebRTCAuthenticateRequest PostWebRTCAuthenticateRequest + // NewPostWebRTCAuthenticateRequest instantiates a new PostWebRTCAuthenticateRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PostWebRTCAuthenticateRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostWebRTCAuthenticateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "peerId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostWebRTCAuthenticateRequest := _PostWebRTCAuthenticateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostWebRTCAuthenticateRequest) + + if err != nil { + return err + } + + *o = PostWebRTCAuthenticateRequest(varPostWebRTCAuthenticateRequest) + + return err +} + type NullablePostWebRTCAuthenticateRequest struct { value *PostWebRTCAuthenticateRequest isSet bool diff --git a/model_post_webhook_request.go b/model_post_webhook_request.go index e5f8e3c..831fbb7 100644 --- a/model_post_webhook_request.go +++ b/model_post_webhook_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PostWebhookRequest type satisfies the MappedNullable interface at compile time @@ -29,6 +31,8 @@ type PostWebhookRequest struct { Secret string `json:"secret"` } +type _PostWebhookRequest PostWebhookRequest + // NewPostWebhookRequest instantiates a new PostWebhookRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -163,6 +167,46 @@ func (o PostWebhookRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PostWebhookRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "description", + "channelId", + "secret", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPostWebhookRequest := _PostWebhookRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPostWebhookRequest) + + if err != nil { + return err + } + + *o = PostWebhookRequest(varPostWebhookRequest) + + return err +} + type NullablePostWebhookRequest struct { value *PostWebhookRequest isSet bool diff --git a/model_put_channel_subscribe_level_request.go b/model_put_channel_subscribe_level_request.go index be64832..1fbc7a2 100644 --- a/model_put_channel_subscribe_level_request.go +++ b/model_put_channel_subscribe_level_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PutChannelSubscribeLevelRequest type satisfies the MappedNullable interface at compile time @@ -22,6 +24,8 @@ type PutChannelSubscribeLevelRequest struct { Level ChannelSubscribeLevel `json:"level"` } +type _PutChannelSubscribeLevelRequest PutChannelSubscribeLevelRequest + // NewPutChannelSubscribeLevelRequest instantiates a new PutChannelSubscribeLevelRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -78,6 +82,43 @@ func (o PutChannelSubscribeLevelRequest) ToMap() (map[string]interface{}, error) return toSerialize, nil } +func (o *PutChannelSubscribeLevelRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "level", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPutChannelSubscribeLevelRequest := _PutChannelSubscribeLevelRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPutChannelSubscribeLevelRequest) + + if err != nil { + return err + } + + *o = PutChannelSubscribeLevelRequest(varPutChannelSubscribeLevelRequest) + + return err +} + type NullablePutChannelSubscribeLevelRequest struct { value *PutChannelSubscribeLevelRequest isSet bool diff --git a/model_put_channel_subscribers_request.go b/model_put_channel_subscribers_request.go index c6f4b5f..d732a09 100644 --- a/model_put_channel_subscribers_request.go +++ b/model_put_channel_subscribers_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PutChannelSubscribersRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PutChannelSubscribersRequest struct { On []string `json:"on"` } +type _PutChannelSubscribersRequest PutChannelSubscribersRequest + // NewPutChannelSubscribersRequest instantiates a new PutChannelSubscribersRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PutChannelSubscribersRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PutChannelSubscribersRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "on", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPutChannelSubscribersRequest := _PutChannelSubscribersRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPutChannelSubscribersRequest) + + if err != nil { + return err + } + + *o = PutChannelSubscribersRequest(varPutChannelSubscribersRequest) + + return err +} + type NullablePutChannelSubscribersRequest struct { value *PutChannelSubscribersRequest isSet bool diff --git a/model_put_channel_topic_request.go b/model_put_channel_topic_request.go index 1385548..65eddde 100644 --- a/model_put_channel_topic_request.go +++ b/model_put_channel_topic_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PutChannelTopicRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PutChannelTopicRequest struct { Topic string `json:"topic"` } +type _PutChannelTopicRequest PutChannelTopicRequest + // NewPutChannelTopicRequest instantiates a new PutChannelTopicRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PutChannelTopicRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PutChannelTopicRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "topic", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPutChannelTopicRequest := _PutChannelTopicRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPutChannelTopicRequest) + + if err != nil { + return err + } + + *o = PutChannelTopicRequest(varPutChannelTopicRequest) + + return err +} + type NullablePutChannelTopicRequest struct { value *PutChannelTopicRequest isSet bool diff --git a/model_put_my_password_request.go b/model_put_my_password_request.go index 0ae5621..1b9a20f 100644 --- a/model_put_my_password_request.go +++ b/model_put_my_password_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PutMyPasswordRequest type satisfies the MappedNullable interface at compile time @@ -20,11 +22,13 @@ var _ MappedNullable = &PutMyPasswordRequest{} // PutMyPasswordRequest パスワード変更リクエスト type PutMyPasswordRequest struct { // 現在のパスワード - Password string `json:"password"` + Password string `json:"password" validate:"regexp=^[\\\\x20-\\\\x7E]{10,32}$"` // 新しいパスワード - NewPassword string `json:"newPassword"` + NewPassword string `json:"newPassword" validate:"regexp=^[\\\\x20-\\\\x7E]{10,32}$"` } +type _PutMyPasswordRequest PutMyPasswordRequest + // NewPutMyPasswordRequest instantiates a new PutMyPasswordRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o PutMyPasswordRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PutMyPasswordRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "password", + "newPassword", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPutMyPasswordRequest := _PutMyPasswordRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPutMyPasswordRequest) + + if err != nil { + return err + } + + *o = PutMyPasswordRequest(varPutMyPasswordRequest) + + return err +} + type NullablePutMyPasswordRequest struct { value *PutMyPasswordRequest isSet bool diff --git a/model_put_notify_citation_request.go b/model_put_notify_citation_request.go index 7ae6ba6..e76044b 100644 --- a/model_put_notify_citation_request.go +++ b/model_put_notify_citation_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PutNotifyCitationRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type PutNotifyCitationRequest struct { NotifyCitation bool `json:"notifyCitation"` } +type _PutNotifyCitationRequest PutNotifyCitationRequest + // NewPutNotifyCitationRequest instantiates a new PutNotifyCitationRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PutNotifyCitationRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PutNotifyCitationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "notifyCitation", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPutNotifyCitationRequest := _PutNotifyCitationRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPutNotifyCitationRequest) + + if err != nil { + return err + } + + *o = PutNotifyCitationRequest(varPutNotifyCitationRequest) + + return err +} + type NullablePutNotifyCitationRequest struct { value *PutNotifyCitationRequest isSet bool diff --git a/model_put_user_password_request.go b/model_put_user_password_request.go index b54ea79..f7c456d 100644 --- a/model_put_user_password_request.go +++ b/model_put_user_password_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the PutUserPasswordRequest type satisfies the MappedNullable interface at compile time @@ -20,9 +22,11 @@ var _ MappedNullable = &PutUserPasswordRequest{} // PutUserPasswordRequest ユーザーパスワード変更リクエスト type PutUserPasswordRequest struct { // 新しいパスワード - NewPassword string `json:"newPassword"` + NewPassword string `json:"newPassword" validate:"regexp=^[\\\\x20-\\\\x7E]{10,32}$"` } +type _PutUserPasswordRequest PutUserPasswordRequest + // NewPutUserPasswordRequest instantiates a new PutUserPasswordRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o PutUserPasswordRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PutUserPasswordRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "newPassword", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPutUserPasswordRequest := _PutUserPasswordRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPutUserPasswordRequest) + + if err != nil { + return err + } + + *o = PutUserPasswordRequest(varPutUserPasswordRequest) + + return err +} + type NullablePutUserPasswordRequest struct { value *PutUserPasswordRequest isSet bool diff --git a/model_qall_endpoint_response.go b/model_qall_endpoint_response.go index 96de00e..2d00d11 100644 --- a/model_qall_endpoint_response.go +++ b/model_qall_endpoint_response.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the QallEndpointResponse type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type QallEndpointResponse struct { Endpoint string `json:"endpoint"` } +type _QallEndpointResponse QallEndpointResponse + // NewQallEndpointResponse instantiates a new QallEndpointResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o QallEndpointResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *QallEndpointResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "endpoint", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQallEndpointResponse := _QallEndpointResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQallEndpointResponse) + + if err != nil { + return err + } + + *o = QallEndpointResponse(varQallEndpointResponse) + + return err +} + type NullableQallEndpointResponse struct { value *QallEndpointResponse isSet bool diff --git a/model_qall_participant_request.go b/model_qall_participant_request.go index c1bd50a..fc9412a 100644 --- a/model_qall_participant_request.go +++ b/model_qall_participant_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the QallParticipantRequest type satisfies the MappedNullable interface at compile time @@ -22,6 +24,8 @@ type QallParticipantRequest struct { Users []QallParticipantRequestUsersInner `json:"users"` } +type _QallParticipantRequest QallParticipantRequest + // NewQallParticipantRequest instantiates a new QallParticipantRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -78,6 +82,43 @@ func (o QallParticipantRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *QallParticipantRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "users", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQallParticipantRequest := _QallParticipantRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQallParticipantRequest) + + if err != nil { + return err + } + + *o = QallParticipantRequest(varQallParticipantRequest) + + return err +} + type NullableQallParticipantRequest struct { value *QallParticipantRequest isSet bool diff --git a/model_qall_room_state_changed_event.go b/model_qall_room_state_changed_event.go index 8985316..09d8999 100644 --- a/model_qall_room_state_changed_event.go +++ b/model_qall_room_state_changed_event.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the QallRoomStateChangedEvent type satisfies the MappedNullable interface at compile time @@ -22,6 +24,8 @@ type QallRoomStateChangedEvent struct { RoomStates []QallRoomStateChangedEventRoomStatesInner `json:"roomStates"` } +type _QallRoomStateChangedEvent QallRoomStateChangedEvent + // NewQallRoomStateChangedEvent instantiates a new QallRoomStateChangedEvent object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -78,6 +82,43 @@ func (o QallRoomStateChangedEvent) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *QallRoomStateChangedEvent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "roomStates", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQallRoomStateChangedEvent := _QallRoomStateChangedEvent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQallRoomStateChangedEvent) + + if err != nil { + return err + } + + *o = QallRoomStateChangedEvent(varQallRoomStateChangedEvent) + + return err +} + type NullableQallRoomStateChangedEvent struct { value *QallRoomStateChangedEvent isSet bool diff --git a/model_qall_room_state_changed_event_room_states_inner.go b/model_qall_room_state_changed_event_room_states_inner.go index f4ee3c5..5a828e4 100644 --- a/model_qall_room_state_changed_event_room_states_inner.go +++ b/model_qall_room_state_changed_event_room_states_inner.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the QallRoomStateChangedEventRoomStatesInner type satisfies the MappedNullable interface at compile time @@ -28,6 +30,8 @@ type QallRoomStateChangedEventRoomStatesInner struct { Metadata *string `json:"metadata,omitempty"` } +type _QallRoomStateChangedEventRoomStatesInner QallRoomStateChangedEventRoomStatesInner + // NewQallRoomStateChangedEventRoomStatesInner instantiates a new QallRoomStateChangedEventRoomStatesInner object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -171,6 +175,45 @@ func (o QallRoomStateChangedEventRoomStatesInner) ToMap() (map[string]interface{ return toSerialize, nil } +func (o *QallRoomStateChangedEventRoomStatesInner) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "roomId", + "participants", + "isWebinar", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQallRoomStateChangedEventRoomStatesInner := _QallRoomStateChangedEventRoomStatesInner{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQallRoomStateChangedEventRoomStatesInner) + + if err != nil { + return err + } + + *o = QallRoomStateChangedEventRoomStatesInner(varQallRoomStateChangedEventRoomStatesInner) + + return err +} + type NullableQallRoomStateChangedEventRoomStatesInner struct { value *QallRoomStateChangedEventRoomStatesInner isSet bool diff --git a/model_qall_room_state_changed_event_room_states_inner_participants_inner.go b/model_qall_room_state_changed_event_room_states_inner_participants_inner.go index 7f9c265..6717a20 100644 --- a/model_qall_room_state_changed_event_room_states_inner_participants_inner.go +++ b/model_qall_room_state_changed_event_room_states_inner_participants_inner.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -31,6 +33,8 @@ type QallRoomStateChangedEventRoomStatesInnerParticipantsInner struct { CanPublish bool `json:"canPublish"` } +type _QallRoomStateChangedEventRoomStatesInnerParticipantsInner QallRoomStateChangedEventRoomStatesInnerParticipantsInner + // NewQallRoomStateChangedEventRoomStatesInnerParticipantsInner instantiates a new QallRoomStateChangedEventRoomStatesInnerParticipantsInner object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -200,6 +204,46 @@ func (o QallRoomStateChangedEventRoomStatesInnerParticipantsInner) ToMap() (map[ return toSerialize, nil } +func (o *QallRoomStateChangedEventRoomStatesInnerParticipantsInner) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "identity", + "name", + "joinedAt", + "canPublish", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQallRoomStateChangedEventRoomStatesInnerParticipantsInner := _QallRoomStateChangedEventRoomStatesInnerParticipantsInner{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQallRoomStateChangedEventRoomStatesInnerParticipantsInner) + + if err != nil { + return err + } + + *o = QallRoomStateChangedEventRoomStatesInnerParticipantsInner(varQallRoomStateChangedEventRoomStatesInnerParticipantsInner) + + return err +} + type NullableQallRoomStateChangedEventRoomStatesInnerParticipantsInner struct { value *QallRoomStateChangedEventRoomStatesInnerParticipantsInner isSet bool diff --git a/model_qall_room_with_participants.go b/model_qall_room_with_participants.go index 426ccb2..bb4401b 100644 --- a/model_qall_room_with_participants.go +++ b/model_qall_room_with_participants.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the QallRoomWithParticipants type satisfies the MappedNullable interface at compile time @@ -28,6 +30,8 @@ type QallRoomWithParticipants struct { Metadata *string `json:"metadata,omitempty"` } +type _QallRoomWithParticipants QallRoomWithParticipants + // NewQallRoomWithParticipants instantiates a new QallRoomWithParticipants object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -180,6 +184,44 @@ func (o QallRoomWithParticipants) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *QallRoomWithParticipants) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "roomId", + "participants", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQallRoomWithParticipants := _QallRoomWithParticipants{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQallRoomWithParticipants) + + if err != nil { + return err + } + + *o = QallRoomWithParticipants(varQallRoomWithParticipants) + + return err +} + type NullableQallRoomWithParticipants struct { value *QallRoomWithParticipants isSet bool diff --git a/model_qall_soundboard_item_created_event.go b/model_qall_soundboard_item_created_event.go index cbc2a7d..3b8b884 100644 --- a/model_qall_soundboard_item_created_event.go +++ b/model_qall_soundboard_item_created_event.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the QallSoundboardItemCreatedEvent type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type QallSoundboardItemCreatedEvent struct { CreatorId string `json:"creatorId"` } +type _QallSoundboardItemCreatedEvent QallSoundboardItemCreatedEvent + // NewQallSoundboardItemCreatedEvent instantiates a new QallSoundboardItemCreatedEvent object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o QallSoundboardItemCreatedEvent) ToMap() (map[string]interface{}, error) return toSerialize, nil } +func (o *QallSoundboardItemCreatedEvent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "soundId", + "name", + "creatorId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQallSoundboardItemCreatedEvent := _QallSoundboardItemCreatedEvent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQallSoundboardItemCreatedEvent) + + if err != nil { + return err + } + + *o = QallSoundboardItemCreatedEvent(varQallSoundboardItemCreatedEvent) + + return err +} + type NullableQallSoundboardItemCreatedEvent struct { value *QallSoundboardItemCreatedEvent isSet bool diff --git a/model_qall_soundboard_item_deleted_event.go b/model_qall_soundboard_item_deleted_event.go index d674009..f1da5af 100644 --- a/model_qall_soundboard_item_deleted_event.go +++ b/model_qall_soundboard_item_deleted_event.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the QallSoundboardItemDeletedEvent type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type QallSoundboardItemDeletedEvent struct { SoundId string `json:"soundId"` } +type _QallSoundboardItemDeletedEvent QallSoundboardItemDeletedEvent + // NewQallSoundboardItemDeletedEvent instantiates a new QallSoundboardItemDeletedEvent object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o QallSoundboardItemDeletedEvent) ToMap() (map[string]interface{}, error) return toSerialize, nil } +func (o *QallSoundboardItemDeletedEvent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "soundId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQallSoundboardItemDeletedEvent := _QallSoundboardItemDeletedEvent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQallSoundboardItemDeletedEvent) + + if err != nil { + return err + } + + *o = QallSoundboardItemDeletedEvent(varQallSoundboardItemDeletedEvent) + + return err +} + type NullableQallSoundboardItemDeletedEvent struct { value *QallSoundboardItemDeletedEvent isSet bool diff --git a/model_qall_token_response.go b/model_qall_token_response.go index 78b344a..5c33c7c 100644 --- a/model_qall_token_response.go +++ b/model_qall_token_response.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the QallTokenResponse type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type QallTokenResponse struct { Token string `json:"token"` } +type _QallTokenResponse QallTokenResponse + // NewQallTokenResponse instantiates a new QallTokenResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o QallTokenResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *QallTokenResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "token", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQallTokenResponse := _QallTokenResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQallTokenResponse) + + if err != nil { + return err + } + + *o = QallTokenResponse(varQallTokenResponse) + + return err +} + type NullableQallTokenResponse struct { value *QallTokenResponse isSet bool diff --git a/model_session.go b/model_session.go index ea19555..d4f3677 100644 --- a/model_session.go +++ b/model_session.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the Session type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type Session struct { SessionId string `json:"sessionId"` } +type _Session Session + // NewSession instantiates a new Session object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o Session) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *Session) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "sessionId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSession := _Session{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSession) + + if err != nil { + return err + } + + *o = Session(varSession) + + return err +} + type NullableSession struct { value *Session isSet bool diff --git a/model_soundboard_item.go b/model_soundboard_item.go index 1a6e83a..e4cdf28 100644 --- a/model_soundboard_item.go +++ b/model_soundboard_item.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the SoundboardItem type satisfies the MappedNullable interface at compile time @@ -29,6 +31,8 @@ type SoundboardItem struct { CreatorId string `json:"creatorId"` } +type _SoundboardItem SoundboardItem + // NewSoundboardItem instantiates a new SoundboardItem object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -163,6 +167,46 @@ func (o SoundboardItem) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *SoundboardItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "soundId", + "soundName", + "stampId", + "creatorId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSoundboardItem := _SoundboardItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSoundboardItem) + + if err != nil { + return err + } + + *o = SoundboardItem(varSoundboardItem) + + return err +} + type NullableSoundboardItem struct { value *SoundboardItem isSet bool diff --git a/model_soundboard_play_request.go b/model_soundboard_play_request.go index fea4a0c..b9845d4 100644 --- a/model_soundboard_play_request.go +++ b/model_soundboard_play_request.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the SoundboardPlayRequest type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type SoundboardPlayRequest struct { RoomName string `json:"roomName"` } +type _SoundboardPlayRequest SoundboardPlayRequest + // NewSoundboardPlayRequest instantiates a new SoundboardPlayRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o SoundboardPlayRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *SoundboardPlayRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "soundId", + "roomName", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSoundboardPlayRequest := _SoundboardPlayRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSoundboardPlayRequest) + + if err != nil { + return err + } + + *o = SoundboardPlayRequest(varSoundboardPlayRequest) + + return err +} + type NullableSoundboardPlayRequest struct { value *SoundboardPlayRequest isSet bool diff --git a/model_soundboard_play_response.go b/model_soundboard_play_response.go index 52982b4..eb656a2 100644 --- a/model_soundboard_play_response.go +++ b/model_soundboard_play_response.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the SoundboardPlayResponse type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type SoundboardPlayResponse struct { StreamKey *string `json:"streamKey,omitempty"` } +type _SoundboardPlayResponse SoundboardPlayResponse + // NewSoundboardPlayResponse instantiates a new SoundboardPlayResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -153,6 +157,43 @@ func (o SoundboardPlayResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *SoundboardPlayResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "ingressId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSoundboardPlayResponse := _SoundboardPlayResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSoundboardPlayResponse) + + if err != nil { + return err + } + + *o = SoundboardPlayResponse(varSoundboardPlayResponse) + + return err +} + type NullableSoundboardPlayResponse struct { value *SoundboardPlayResponse isSet bool diff --git a/model_soundboard_upload_response.go b/model_soundboard_upload_response.go index a42f8e6..94edc63 100644 --- a/model_soundboard_upload_response.go +++ b/model_soundboard_upload_response.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the SoundboardUploadResponse type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type SoundboardUploadResponse struct { SoundId string `json:"soundId"` } +type _SoundboardUploadResponse SoundboardUploadResponse + // NewSoundboardUploadResponse instantiates a new SoundboardUploadResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o SoundboardUploadResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *SoundboardUploadResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "soundId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSoundboardUploadResponse := _SoundboardUploadResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSoundboardUploadResponse) + + if err != nil { + return err + } + + *o = SoundboardUploadResponse(varSoundboardUploadResponse) + + return err +} + type NullableSoundboardUploadResponse struct { value *SoundboardUploadResponse isSet bool diff --git a/model_stamp.go b/model_stamp.go index 1685bc3..fc72129 100644 --- a/model_stamp.go +++ b/model_stamp.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -23,7 +25,7 @@ type Stamp struct { // スタンプUUID Id string `json:"id"` // スタンプ名 - Name string `json:"name"` + Name string `json:"name" validate:"regexp=^[a-zA-Z0-9_-]{1,32}$"` // 作成者UUID CreatorId string `json:"creatorId"` // 作成日時 @@ -36,6 +38,8 @@ type Stamp struct { IsUnicode bool `json:"isUnicode"` } +type _Stamp Stamp + // NewStamp instantiates a new Stamp object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -248,6 +252,49 @@ func (o Stamp) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *Stamp) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "creatorId", + "createdAt", + "updatedAt", + "fileId", + "isUnicode", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varStamp := _Stamp{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varStamp) + + if err != nil { + return err + } + + *o = Stamp(varStamp) + + return err +} + type NullableStamp struct { value *Stamp isSet bool diff --git a/model_stamp_history_entry.go b/model_stamp_history_entry.go index 8062642..fdfdf19 100644 --- a/model_stamp_history_entry.go +++ b/model_stamp_history_entry.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -26,6 +28,8 @@ type StampHistoryEntry struct { Datetime time.Time `json:"datetime"` } +type _StampHistoryEntry StampHistoryEntry + // NewStampHistoryEntry instantiates a new StampHistoryEntry object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -108,6 +112,44 @@ func (o StampHistoryEntry) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *StampHistoryEntry) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "stampId", + "datetime", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varStampHistoryEntry := _StampHistoryEntry{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varStampHistoryEntry) + + if err != nil { + return err + } + + *o = StampHistoryEntry(varStampHistoryEntry) + + return err +} + type NullableStampHistoryEntry struct { value *StampHistoryEntry isSet bool diff --git a/model_stamp_palette.go b/model_stamp_palette.go index e235c8e..727901a 100644 --- a/model_stamp_palette.go +++ b/model_stamp_palette.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -36,6 +38,8 @@ type StampPalette struct { Description string `json:"description"` } +type _StampPalette StampPalette + // NewStampPalette instantiates a new StampPalette object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -248,6 +252,49 @@ func (o StampPalette) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *StampPalette) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "stamps", + "creatorId", + "createdAt", + "updatedAt", + "description", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varStampPalette := _StampPalette{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varStampPalette) + + if err != nil { + return err + } + + *o = StampPalette(varStampPalette) + + return err +} + type NullableStampPalette struct { value *StampPalette isSet bool diff --git a/model_stamp_stats.go b/model_stamp_stats.go index d2609aa..e405595 100644 --- a/model_stamp_stats.go +++ b/model_stamp_stats.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the StampStats type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type StampStats struct { TotalCount int64 `json:"totalCount"` } +type _StampStats StampStats + // NewStampStats instantiates a new StampStats object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o StampStats) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *StampStats) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "count", + "totalCount", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varStampStats := _StampStats{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varStampStats) + + if err != nil { + return err + } + + *o = StampStats(varStampStats) + + return err +} + type NullableStampStats struct { value *StampStats isSet bool diff --git a/model_stamp_with_thumbnail.go b/model_stamp_with_thumbnail.go index c754a81..a6579b3 100644 --- a/model_stamp_with_thumbnail.go +++ b/model_stamp_with_thumbnail.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -23,7 +25,7 @@ type StampWithThumbnail struct { // スタンプUUID Id string `json:"id"` // スタンプ名 - Name string `json:"name"` + Name string `json:"name" validate:"regexp=^[a-zA-Z0-9_-]{1,32}$"` // 作成者UUID CreatorId string `json:"creatorId"` // 作成日時 @@ -38,6 +40,8 @@ type StampWithThumbnail struct { HasThumbnail bool `json:"hasThumbnail"` } +type _StampWithThumbnail StampWithThumbnail + // NewStampWithThumbnail instantiates a new StampWithThumbnail object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -276,6 +280,50 @@ func (o StampWithThumbnail) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *StampWithThumbnail) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "creatorId", + "createdAt", + "updatedAt", + "fileId", + "isUnicode", + "hasThumbnail", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varStampWithThumbnail := _StampWithThumbnail{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varStampWithThumbnail) + + if err != nil { + return err + } + + *o = StampWithThumbnail(varStampWithThumbnail) + + return err +} + type NullableStampWithThumbnail struct { value *StampWithThumbnail isSet bool diff --git a/model_subscribers_changed_event.go b/model_subscribers_changed_event.go index 7725155..7300acc 100644 --- a/model_subscribers_changed_event.go +++ b/model_subscribers_changed_event.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the SubscribersChangedEvent type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type SubscribersChangedEvent struct { Off []string `json:"off"` } +type _SubscribersChangedEvent SubscribersChangedEvent + // NewSubscribersChangedEvent instantiates a new SubscribersChangedEvent object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o SubscribersChangedEvent) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *SubscribersChangedEvent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "userId", + "on", + "off", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSubscribersChangedEvent := _SubscribersChangedEvent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSubscribersChangedEvent) + + if err != nil { + return err + } + + *o = SubscribersChangedEvent(varSubscribersChangedEvent) + + return err +} + type NullableSubscribersChangedEvent struct { value *SubscribersChangedEvent isSet bool diff --git a/model_tag.go b/model_tag.go index fc830e6..74dde10 100644 --- a/model_tag.go +++ b/model_tag.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the Tag type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type Tag struct { Users []string `json:"users"` } +type _Tag Tag + // NewTag instantiates a new Tag object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o Tag) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *Tag) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "tag", + "users", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTag := _Tag{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTag) + + if err != nil { + return err + } + + *o = Tag(varTag) + + return err +} + type NullableTag struct { value *Tag isSet bool diff --git a/model_thumbnail_info.go b/model_thumbnail_info.go index 8dce1ae..6209d4f 100644 --- a/model_thumbnail_info.go +++ b/model_thumbnail_info.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ThumbnailInfo type satisfies the MappedNullable interface at compile time @@ -28,6 +30,8 @@ type ThumbnailInfo struct { Height *int32 `json:"height,omitempty"` } +type _ThumbnailInfo ThumbnailInfo + // NewThumbnailInfo instantiates a new ThumbnailInfo object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -182,6 +186,44 @@ func (o ThumbnailInfo) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ThumbnailInfo) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "mime", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varThumbnailInfo := _ThumbnailInfo{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varThumbnailInfo) + + if err != nil { + return err + } + + *o = ThumbnailInfo(varThumbnailInfo) + + return err +} + type NullableThumbnailInfo struct { value *ThumbnailInfo isSet bool diff --git a/model_topic_changed_event.go b/model_topic_changed_event.go index e5f36c5..7bd45ec 100644 --- a/model_topic_changed_event.go +++ b/model_topic_changed_event.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the TopicChangedEvent type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type TopicChangedEvent struct { After string `json:"after"` } +type _TopicChangedEvent TopicChangedEvent + // NewTopicChangedEvent instantiates a new TopicChangedEvent object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o TopicChangedEvent) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *TopicChangedEvent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "userId", + "before", + "after", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTopicChangedEvent := _TopicChangedEvent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTopicChangedEvent) + + if err != nil { + return err + } + + *o = TopicChangedEvent(varTopicChangedEvent) + + return err +} + type NullableTopicChangedEvent struct { value *TopicChangedEvent isSet bool diff --git a/model_unread_channel.go b/model_unread_channel.go index f4865e8..12afd44 100644 --- a/model_unread_channel.go +++ b/model_unread_channel.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -34,6 +36,8 @@ type UnreadChannel struct { OldestMessageId string `json:"oldestMessageId"` } +type _UnreadChannel UnreadChannel + // NewUnreadChannel instantiates a new UnreadChannel object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -220,6 +224,48 @@ func (o UnreadChannel) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *UnreadChannel) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "channelId", + "count", + "noticeable", + "since", + "updatedAt", + "oldestMessageId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUnreadChannel := _UnreadChannel{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUnreadChannel) + + if err != nil { + return err + } + + *o = UnreadChannel(varUnreadChannel) + + return err +} + type NullableUnreadChannel struct { value *UnreadChannel isSet bool diff --git a/model_user.go b/model_user.go index f404b2c..8bed97a 100644 --- a/model_user.go +++ b/model_user.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -23,7 +25,7 @@ type User struct { // ユーザーUUID Id string `json:"id"` // ユーザー名 - Name string `json:"name"` + Name string `json:"name" validate:"regexp=^[a-zA-Z0-9_-]{1,32}$"` // ユーザー表示名 DisplayName string `json:"displayName"` // アイコンファイルUUID @@ -35,6 +37,8 @@ type User struct { UpdatedAt time.Time `json:"updatedAt"` } +type _User User + // NewUser instantiates a new User object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -247,6 +251,49 @@ func (o User) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *User) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "displayName", + "iconFileId", + "bot", + "state", + "updatedAt", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUser := _User{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUser) + + if err != nil { + return err + } + + *o = User(varUser) + + return err +} + type NullableUser struct { value *User isSet bool diff --git a/model_user_detail.go b/model_user_detail.go index 1f26d16..8c21e8d 100644 --- a/model_user_detail.go +++ b/model_user_detail.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -30,9 +32,9 @@ type UserDetail struct { // ユーザー表示名 DisplayName string `json:"displayName"` // ユーザー名 - Name string `json:"name"` + Name string `json:"name" validate:"regexp=^[a-zA-Z0-9_-]{1,32}$"` // Twitter ID - TwitterId string `json:"twitterId"` + TwitterId string `json:"twitterId" validate:"regexp=^[a-zA-Z0-9_]{0,15}$"` // 最終オンライン日時 LastOnline NullableTime `json:"lastOnline"` // 更新日時 @@ -47,6 +49,8 @@ type UserDetail struct { HomeChannel NullableString `json:"homeChannel"` } +type _UserDetail UserDetail + // NewUserDetail instantiates a new UserDetail object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -419,6 +423,55 @@ func (o UserDetail) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *UserDetail) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "state", + "bot", + "iconFileId", + "displayName", + "name", + "twitterId", + "lastOnline", + "updatedAt", + "tags", + "groups", + "bio", + "homeChannel", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserDetail := _UserDetail{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserDetail) + + if err != nil { + return err + } + + *o = UserDetail(varUserDetail) + + return err +} + type NullableUserDetail struct { value *UserDetail isSet bool diff --git a/model_user_group.go b/model_user_group.go index 0094195..6c3b313 100644 --- a/model_user_group.go +++ b/model_user_group.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -40,6 +42,8 @@ type UserGroup struct { Admins []string `json:"admins"` } +type _UserGroup UserGroup + // NewUserGroup instantiates a new UserGroup object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -304,6 +308,51 @@ func (o UserGroup) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *UserGroup) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "description", + "type", + "icon", + "members", + "createdAt", + "updatedAt", + "admins", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserGroup := _UserGroup{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserGroup) + + if err != nil { + return err + } + + *o = UserGroup(varUserGroup) + + return err +} + type NullableUserGroup struct { value *UserGroup isSet bool diff --git a/model_user_group_member.go b/model_user_group_member.go index 1ed3744..58409fd 100644 --- a/model_user_group_member.go +++ b/model_user_group_member.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the UserGroupMember type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type UserGroupMember struct { Role string `json:"role"` } +type _UserGroupMember UserGroupMember + // NewUserGroupMember instantiates a new UserGroupMember object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o UserGroupMember) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *UserGroupMember) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "role", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserGroupMember := _UserGroupMember{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserGroupMember) + + if err != nil { + return err + } + + *o = UserGroupMember(varUserGroupMember) + + return err +} + type NullableUserGroupMember struct { value *UserGroupMember isSet bool diff --git a/model_user_settings.go b/model_user_settings.go index bd351eb..e9f0b0d 100644 --- a/model_user_settings.go +++ b/model_user_settings.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the UserSettings type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type UserSettings struct { NotifyCitation bool `json:"notifyCitation"` } +type _UserSettings UserSettings + // NewUserSettings instantiates a new UserSettings object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o UserSettings) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *UserSettings) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "notifyCitation", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserSettings := _UserSettings{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserSettings) + + if err != nil { + return err + } + + *o = UserSettings(varUserSettings) + + return err +} + type NullableUserSettings struct { value *UserSettings isSet bool diff --git a/model_user_stats.go b/model_user_stats.go index e16dd1f..e5e38a4 100644 --- a/model_user_stats.go +++ b/model_user_stats.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -28,6 +30,8 @@ type UserStats struct { Datetime time.Time `json:"datetime"` } +type _UserStats UserStats + // NewUserStats instantiates a new UserStats object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -136,6 +140,45 @@ func (o UserStats) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *UserStats) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "totalMessageCount", + "stamps", + "datetime", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserStats := _UserStats{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserStats) + + if err != nil { + return err + } + + *o = UserStats(varUserStats) + + return err +} + type NullableUserStats struct { value *UserStats isSet bool diff --git a/model_user_stats_stamp.go b/model_user_stats_stamp.go index 7fc1bf7..cffd51b 100644 --- a/model_user_stats_stamp.go +++ b/model_user_stats_stamp.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the UserStatsStamp type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type UserStatsStamp struct { Total int64 `json:"total"` } +type _UserStatsStamp UserStatsStamp + // NewUserStatsStamp instantiates a new UserStatsStamp object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o UserStatsStamp) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *UserStatsStamp) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "count", + "total", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserStatsStamp := _UserStatsStamp{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserStatsStamp) + + if err != nil { + return err + } + + *o = UserStatsStamp(varUserStatsStamp) + + return err +} + type NullableUserStatsStamp struct { value *UserStatsStamp isSet bool diff --git a/model_user_subscribe_state.go b/model_user_subscribe_state.go index d599459..bb7c6c8 100644 --- a/model_user_subscribe_state.go +++ b/model_user_subscribe_state.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the UserSubscribeState type satisfies the MappedNullable interface at compile time @@ -24,6 +26,8 @@ type UserSubscribeState struct { Level ChannelSubscribeLevel `json:"level"` } +type _UserSubscribeState UserSubscribeState + // NewUserSubscribeState instantiates a new UserSubscribeState object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -106,6 +110,44 @@ func (o UserSubscribeState) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *UserSubscribeState) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "channelId", + "level", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserSubscribeState := _UserSubscribeState{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserSubscribeState) + + if err != nil { + return err + } + + *o = UserSubscribeState(varUserSubscribeState) + + return err +} + type NullableUserSubscribeState struct { value *UserSubscribeState isSet bool diff --git a/model_user_tag.go b/model_user_tag.go index 7d68ae6..8cfa937 100644 --- a/model_user_tag.go +++ b/model_user_tag.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -32,6 +34,8 @@ type UserTag struct { UpdatedAt time.Time `json:"updatedAt"` } +type _UserTag UserTag + // NewUserTag instantiates a new UserTag object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -192,6 +196,47 @@ func (o UserTag) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *UserTag) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "tagId", + "tag", + "isLocked", + "createdAt", + "updatedAt", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserTag := _UserTag{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserTag) + + if err != nil { + return err + } + + *o = UserTag(varUserTag) + + return err +} + type NullableUserTag struct { value *UserTag isSet bool diff --git a/model_version.go b/model_version.go index 88b1172..3733b0b 100644 --- a/model_version.go +++ b/model_version.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the Version type satisfies the MappedNullable interface at compile time @@ -26,6 +28,8 @@ type Version struct { Flags VersionFlags `json:"flags"` } +type _Version Version + // NewVersion instantiates a new Version object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -134,6 +138,45 @@ func (o Version) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *Version) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "revision", + "version", + "flags", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varVersion := _Version{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varVersion) + + if err != nil { + return err + } + + *o = Version(varVersion) + + return err +} + type NullableVersion struct { value *Version isSet bool diff --git a/model_version_flags.go b/model_version_flags.go index c5a74ec..5647609 100644 --- a/model_version_flags.go +++ b/model_version_flags.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the VersionFlags type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type VersionFlags struct { SignUpAllowed bool `json:"signUpAllowed"` } +type _VersionFlags VersionFlags + // NewVersionFlags instantiates a new VersionFlags object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o VersionFlags) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *VersionFlags) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "externalLogin", + "signUpAllowed", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varVersionFlags := _VersionFlags{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varVersionFlags) + + if err != nil { + return err + } + + *o = VersionFlags(varVersionFlags) + + return err +} + type NullableVersionFlags struct { value *VersionFlags isSet bool diff --git a/model_visibility_changed_event.go b/model_visibility_changed_event.go index 80af63b..117c83a 100644 --- a/model_visibility_changed_event.go +++ b/model_visibility_changed_event.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the VisibilityChangedEvent type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type VisibilityChangedEvent struct { Visibility bool `json:"visibility"` } +type _VisibilityChangedEvent VisibilityChangedEvent + // NewVisibilityChangedEvent instantiates a new VisibilityChangedEvent object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o VisibilityChangedEvent) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *VisibilityChangedEvent) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "userId", + "visibility", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varVisibilityChangedEvent := _VisibilityChangedEvent{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varVisibilityChangedEvent) + + if err != nil { + return err + } + + *o = VisibilityChangedEvent(varVisibilityChangedEvent) + + return err +} + type NullableVisibilityChangedEvent struct { value *VisibilityChangedEvent isSet bool diff --git a/model_web_rtc_authenticate_result.go b/model_web_rtc_authenticate_result.go index 1fc2566..8376655 100644 --- a/model_web_rtc_authenticate_result.go +++ b/model_web_rtc_authenticate_result.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the WebRTCAuthenticateResult type satisfies the MappedNullable interface at compile time @@ -29,6 +31,8 @@ type WebRTCAuthenticateResult struct { AuthToken string `json:"authToken"` } +type _WebRTCAuthenticateResult WebRTCAuthenticateResult + // NewWebRTCAuthenticateResult instantiates a new WebRTCAuthenticateResult object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -163,6 +167,46 @@ func (o WebRTCAuthenticateResult) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *WebRTCAuthenticateResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "peerId", + "ttl", + "timestamp", + "authToken", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWebRTCAuthenticateResult := _WebRTCAuthenticateResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWebRTCAuthenticateResult) + + if err != nil { + return err + } + + *o = WebRTCAuthenticateResult(varWebRTCAuthenticateResult) + + return err +} + type NullableWebRTCAuthenticateResult struct { value *WebRTCAuthenticateResult isSet bool diff --git a/model_web_rtc_user_state.go b/model_web_rtc_user_state.go index 2074afe..8b65153 100644 --- a/model_web_rtc_user_state.go +++ b/model_web_rtc_user_state.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" ) // checks if the WebRTCUserState type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type WebRTCUserState struct { Sessions []Session `json:"sessions"` } +type _WebRTCUserState WebRTCUserState + // NewWebRTCUserState instantiates a new WebRTCUserState object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o WebRTCUserState) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *WebRTCUserState) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "userId", + "channelId", + "sessions", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWebRTCUserState := _WebRTCUserState{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWebRTCUserState) + + if err != nil { + return err + } + + *o = WebRTCUserState(varWebRTCUserState) + + return err +} + type NullableWebRTCUserState struct { value *WebRTCUserState isSet bool diff --git a/model_webhook.go b/model_webhook.go index 8fb3187..f629889 100644 --- a/model_webhook.go +++ b/model_webhook.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -40,6 +42,8 @@ type Webhook struct { UpdatedAt time.Time `json:"updatedAt"` } +type _Webhook Webhook + // NewWebhook instantiates a new Webhook object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -304,6 +308,51 @@ func (o Webhook) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *Webhook) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "botUserId", + "displayName", + "description", + "secure", + "channelId", + "ownerId", + "createdAt", + "updatedAt", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWebhook := _Webhook{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWebhook) + + if err != nil { + return err + } + + *o = Webhook(varWebhook) + + return err +} + type NullableWebhook struct { value *Webhook isSet bool diff --git a/utils.go b/utils.go index 3ad5afd..79480ed 100644 --- a/utils.go +++ b/utils.go @@ -11,7 +11,9 @@ API version: 3.0 package traq import ( + "bytes" "encoding/json" + "fmt" "reflect" "time" ) @@ -320,7 +322,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { @@ -345,3 +347,15 @@ func IsNil(i interface{}) bool { type MappedNullable interface { ToMap() (map[string]interface{}, error) } + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +}