2948 lines
110 KiB
Go
2948 lines
110 KiB
Go
|
// Code generated by go-swagger; DO NOT EDIT.
|
||
|
|
||
|
package user
|
||
|
|
||
|
// This file was generated by the swagger tool.
|
||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/go-openapi/runtime"
|
||
|
httptransport "github.com/go-openapi/runtime/client"
|
||
|
"github.com/go-openapi/strfmt"
|
||
|
)
|
||
|
|
||
|
// New creates a new user API client.
|
||
|
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||
|
return &Client{transport: transport, formats: formats}
|
||
|
}
|
||
|
|
||
|
// New creates a new user API client with basic auth credentials.
|
||
|
// It takes the following parameters:
|
||
|
// - host: http host (github.com).
|
||
|
// - basePath: any base path for the API client ("/v1", "/v3").
|
||
|
// - scheme: http scheme ("http", "https").
|
||
|
// - user: user for basic authentication header.
|
||
|
// - password: password for basic authentication header.
|
||
|
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService {
|
||
|
transport := httptransport.New(host, basePath, []string{scheme})
|
||
|
transport.DefaultAuthentication = httptransport.BasicAuth(user, password)
|
||
|
return &Client{transport: transport, formats: strfmt.Default}
|
||
|
}
|
||
|
|
||
|
// New creates a new user API client with a bearer token for authentication.
|
||
|
// It takes the following parameters:
|
||
|
// - host: http host (github.com).
|
||
|
// - basePath: any base path for the API client ("/v1", "/v3").
|
||
|
// - scheme: http scheme ("http", "https").
|
||
|
// - bearerToken: bearer token for Bearer authentication header.
|
||
|
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService {
|
||
|
transport := httptransport.New(host, basePath, []string{scheme})
|
||
|
transport.DefaultAuthentication = httptransport.BearerToken(bearerToken)
|
||
|
return &Client{transport: transport, formats: strfmt.Default}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
Client for user API
|
||
|
*/
|
||
|
type Client struct {
|
||
|
transport runtime.ClientTransport
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ClientOption may be used to customize the behavior of Client methods.
|
||
|
type ClientOption func(*runtime.ClientOperation)
|
||
|
|
||
|
// This client is generated with a few options you might find useful for your swagger spec.
|
||
|
//
|
||
|
// Feel free to add you own set of options.
|
||
|
|
||
|
// WithContentType allows the client to force the Content-Type header
|
||
|
// to negotiate a specific Consumer from the server.
|
||
|
//
|
||
|
// You may use this option to set arbitrary extensions to your MIME media type.
|
||
|
func WithContentType(mime string) ClientOption {
|
||
|
return func(r *runtime.ClientOperation) {
|
||
|
r.ConsumesMediaTypes = []string{mime}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// WithContentTypeApplicationJSON sets the Content-Type header to "application/json".
|
||
|
func WithContentTypeApplicationJSON(r *runtime.ClientOperation) {
|
||
|
r.ConsumesMediaTypes = []string{"application/json"}
|
||
|
}
|
||
|
|
||
|
// WithContentTypeTextPlain sets the Content-Type header to "text/plain".
|
||
|
func WithContentTypeTextPlain(r *runtime.ClientOperation) {
|
||
|
r.ConsumesMediaTypes = []string{"text/plain"}
|
||
|
}
|
||
|
|
||
|
// WithAccept allows the client to force the Accept header
|
||
|
// to negotiate a specific Producer from the server.
|
||
|
//
|
||
|
// You may use this option to set arbitrary extensions to your MIME media type.
|
||
|
func WithAccept(mime string) ClientOption {
|
||
|
return func(r *runtime.ClientOperation) {
|
||
|
r.ProducesMediaTypes = []string{mime}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// WithAcceptApplicationJSON sets the Accept header to "application/json".
|
||
|
func WithAcceptApplicationJSON(r *runtime.ClientOperation) {
|
||
|
r.ProducesMediaTypes = []string{"application/json"}
|
||
|
}
|
||
|
|
||
|
// WithAcceptTextHTML sets the Accept header to "text/html".
|
||
|
func WithAcceptTextHTML(r *runtime.ClientOperation) {
|
||
|
r.ProducesMediaTypes = []string{"text/html"}
|
||
|
}
|
||
|
|
||
|
// WithAcceptTextPlain sets the Accept header to "text/plain".
|
||
|
func WithAcceptTextPlain(r *runtime.ClientOperation) {
|
||
|
r.ProducesMediaTypes = []string{"text/plain"}
|
||
|
}
|
||
|
|
||
|
// ClientService is the interface for Client methods
|
||
|
type ClientService interface {
|
||
|
CreateUserVariable(params *CreateUserVariableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateUserVariableCreated, *CreateUserVariableNoContent, error)
|
||
|
|
||
|
DeleteUserSecret(params *DeleteUserSecretParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUserSecretNoContent, error)
|
||
|
|
||
|
DeleteUserVariable(params *DeleteUserVariableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUserVariableCreated, *DeleteUserVariableNoContent, error)
|
||
|
|
||
|
GetUserSettings(params *GetUserSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserSettingsOK, error)
|
||
|
|
||
|
GetUserVariable(params *GetUserVariableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserVariableOK, error)
|
||
|
|
||
|
GetUserVariablesList(params *GetUserVariablesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserVariablesListOK, error)
|
||
|
|
||
|
GetVerificationToken(params *GetVerificationTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVerificationTokenOK, error)
|
||
|
|
||
|
UpdateUserSecret(params *UpdateUserSecretParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserSecretCreated, *UpdateUserSecretNoContent, error)
|
||
|
|
||
|
UpdateUserSettings(params *UpdateUserSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserSettingsOK, error)
|
||
|
|
||
|
UpdateUserVariable(params *UpdateUserVariableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserVariableCreated, *UpdateUserVariableNoContent, error)
|
||
|
|
||
|
UserAddEmail(params *UserAddEmailParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserAddEmailCreated, error)
|
||
|
|
||
|
UserBlockUser(params *UserBlockUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserBlockUserNoContent, error)
|
||
|
|
||
|
UserCheckFollowing(params *UserCheckFollowingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCheckFollowingNoContent, error)
|
||
|
|
||
|
UserCheckUserBlock(params *UserCheckUserBlockParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCheckUserBlockNoContent, error)
|
||
|
|
||
|
UserCreateHook(params *UserCreateHookParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCreateHookCreated, error)
|
||
|
|
||
|
UserCreateOAuth2Application(params *UserCreateOAuth2ApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCreateOAuth2ApplicationCreated, error)
|
||
|
|
||
|
UserCreateToken(params *UserCreateTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCreateTokenCreated, error)
|
||
|
|
||
|
UserCurrentCheckFollowing(params *UserCurrentCheckFollowingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentCheckFollowingNoContent, error)
|
||
|
|
||
|
UserCurrentCheckStarring(params *UserCurrentCheckStarringParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentCheckStarringNoContent, error)
|
||
|
|
||
|
UserCurrentDeleteFollow(params *UserCurrentDeleteFollowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentDeleteFollowNoContent, error)
|
||
|
|
||
|
UserCurrentDeleteGPGKey(params *UserCurrentDeleteGPGKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentDeleteGPGKeyNoContent, error)
|
||
|
|
||
|
UserCurrentDeleteKey(params *UserCurrentDeleteKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentDeleteKeyNoContent, error)
|
||
|
|
||
|
UserCurrentDeleteStar(params *UserCurrentDeleteStarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentDeleteStarNoContent, error)
|
||
|
|
||
|
UserCurrentGetGPGKey(params *UserCurrentGetGPGKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentGetGPGKeyOK, error)
|
||
|
|
||
|
UserCurrentGetKey(params *UserCurrentGetKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentGetKeyOK, error)
|
||
|
|
||
|
UserCurrentListFollowers(params *UserCurrentListFollowersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentListFollowersOK, error)
|
||
|
|
||
|
UserCurrentListFollowing(params *UserCurrentListFollowingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentListFollowingOK, error)
|
||
|
|
||
|
UserCurrentListGPGKeys(params *UserCurrentListGPGKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentListGPGKeysOK, error)
|
||
|
|
||
|
UserCurrentListKeys(params *UserCurrentListKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentListKeysOK, error)
|
||
|
|
||
|
UserCurrentListRepos(params *UserCurrentListReposParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentListReposOK, error)
|
||
|
|
||
|
UserCurrentListStarred(params *UserCurrentListStarredParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentListStarredOK, error)
|
||
|
|
||
|
UserCurrentListSubscriptions(params *UserCurrentListSubscriptionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentListSubscriptionsOK, error)
|
||
|
|
||
|
UserCurrentPostGPGKey(params *UserCurrentPostGPGKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentPostGPGKeyCreated, error)
|
||
|
|
||
|
UserCurrentPostKey(params *UserCurrentPostKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentPostKeyCreated, error)
|
||
|
|
||
|
UserCurrentPutFollow(params *UserCurrentPutFollowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentPutFollowNoContent, error)
|
||
|
|
||
|
UserCurrentPutStar(params *UserCurrentPutStarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentPutStarNoContent, error)
|
||
|
|
||
|
UserCurrentTrackedTimes(params *UserCurrentTrackedTimesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentTrackedTimesOK, error)
|
||
|
|
||
|
UserDeleteAccessToken(params *UserDeleteAccessTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserDeleteAccessTokenNoContent, error)
|
||
|
|
||
|
UserDeleteAvatar(params *UserDeleteAvatarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserDeleteAvatarNoContent, error)
|
||
|
|
||
|
UserDeleteEmail(params *UserDeleteEmailParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserDeleteEmailNoContent, error)
|
||
|
|
||
|
UserDeleteHook(params *UserDeleteHookParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserDeleteHookNoContent, error)
|
||
|
|
||
|
UserDeleteOAuth2Application(params *UserDeleteOAuth2ApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserDeleteOAuth2ApplicationNoContent, error)
|
||
|
|
||
|
UserEditHook(params *UserEditHookParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserEditHookOK, error)
|
||
|
|
||
|
UserGet(params *UserGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetOK, error)
|
||
|
|
||
|
UserGetCurrent(params *UserGetCurrentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetCurrentOK, error)
|
||
|
|
||
|
UserGetHeatmapData(params *UserGetHeatmapDataParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetHeatmapDataOK, error)
|
||
|
|
||
|
UserGetHook(params *UserGetHookParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetHookOK, error)
|
||
|
|
||
|
UserGetOAuth2Application(params *UserGetOAuth2ApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetOAuth2ApplicationOK, error)
|
||
|
|
||
|
UserGetOauth2Application(params *UserGetOauth2ApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetOauth2ApplicationOK, error)
|
||
|
|
||
|
UserGetRunnerRegistrationToken(params *UserGetRunnerRegistrationTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetRunnerRegistrationTokenOK, error)
|
||
|
|
||
|
UserGetStopWatches(params *UserGetStopWatchesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetStopWatchesOK, error)
|
||
|
|
||
|
UserGetTokens(params *UserGetTokensParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetTokensOK, error)
|
||
|
|
||
|
UserListActivityFeeds(params *UserListActivityFeedsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListActivityFeedsOK, error)
|
||
|
|
||
|
UserListBlocks(params *UserListBlocksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListBlocksOK, error)
|
||
|
|
||
|
UserListEmails(params *UserListEmailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListEmailsOK, error)
|
||
|
|
||
|
UserListFollowers(params *UserListFollowersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListFollowersOK, error)
|
||
|
|
||
|
UserListFollowing(params *UserListFollowingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListFollowingOK, error)
|
||
|
|
||
|
UserListGPGKeys(params *UserListGPGKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListGPGKeysOK, error)
|
||
|
|
||
|
UserListHooks(params *UserListHooksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListHooksOK, error)
|
||
|
|
||
|
UserListKeys(params *UserListKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListKeysOK, error)
|
||
|
|
||
|
UserListRepos(params *UserListReposParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListReposOK, error)
|
||
|
|
||
|
UserListStarred(params *UserListStarredParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListStarredOK, error)
|
||
|
|
||
|
UserListSubscriptions(params *UserListSubscriptionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListSubscriptionsOK, error)
|
||
|
|
||
|
UserListTeams(params *UserListTeamsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListTeamsOK, error)
|
||
|
|
||
|
UserSearch(params *UserSearchParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserSearchOK, error)
|
||
|
|
||
|
UserUnblockUser(params *UserUnblockUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserUnblockUserNoContent, error)
|
||
|
|
||
|
UserUpdateAvatar(params *UserUpdateAvatarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserUpdateAvatarNoContent, error)
|
||
|
|
||
|
UserUpdateOAuth2Application(params *UserUpdateOAuth2ApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserUpdateOAuth2ApplicationOK, error)
|
||
|
|
||
|
UserVerifyGPGKey(params *UserVerifyGPGKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserVerifyGPGKeyCreated, error)
|
||
|
|
||
|
SetTransport(transport runtime.ClientTransport)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
CreateUserVariable creates a user level variable
|
||
|
*/
|
||
|
func (a *Client) CreateUserVariable(params *CreateUserVariableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateUserVariableCreated, *CreateUserVariableNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewCreateUserVariableParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "createUserVariable",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/user/actions/variables/{variablename}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &CreateUserVariableReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, nil, err
|
||
|
}
|
||
|
switch value := result.(type) {
|
||
|
case *CreateUserVariableCreated:
|
||
|
return value, nil, nil
|
||
|
case *CreateUserVariableNoContent:
|
||
|
return nil, value, nil
|
||
|
}
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for user: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
DeleteUserSecret deletes a secret in a user scope
|
||
|
*/
|
||
|
func (a *Client) DeleteUserSecret(params *DeleteUserSecretParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUserSecretNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewDeleteUserSecretParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "deleteUserSecret",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/user/actions/secrets/{secretname}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &DeleteUserSecretReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*DeleteUserSecretNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for deleteUserSecret: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
DeleteUserVariable deletes a user level variable which is created by current doer
|
||
|
*/
|
||
|
func (a *Client) DeleteUserVariable(params *DeleteUserVariableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteUserVariableCreated, *DeleteUserVariableNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewDeleteUserVariableParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "deleteUserVariable",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/user/actions/variables/{variablename}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &DeleteUserVariableReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, nil, err
|
||
|
}
|
||
|
switch value := result.(type) {
|
||
|
case *DeleteUserVariableCreated:
|
||
|
return value, nil, nil
|
||
|
case *DeleteUserVariableNoContent:
|
||
|
return nil, value, nil
|
||
|
}
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for user: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetUserSettings gets user settings
|
||
|
*/
|
||
|
func (a *Client) GetUserSettings(params *GetUserSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserSettingsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewGetUserSettingsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "getUserSettings",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/settings",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &GetUserSettingsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*GetUserSettingsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for getUserSettings: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetUserVariable gets a user level variable which is created by current doer
|
||
|
*/
|
||
|
func (a *Client) GetUserVariable(params *GetUserVariableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserVariableOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewGetUserVariableParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "getUserVariable",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/actions/variables/{variablename}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &GetUserVariableReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*GetUserVariableOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for getUserVariable: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetUserVariablesList gets the user level list of variables which is created by current doer
|
||
|
*/
|
||
|
func (a *Client) GetUserVariablesList(params *GetUserVariablesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUserVariablesListOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewGetUserVariablesListParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "getUserVariablesList",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/actions/variables",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &GetUserVariablesListReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*GetUserVariablesListOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for getUserVariablesList: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetVerificationToken gets a token to verify
|
||
|
*/
|
||
|
func (a *Client) GetVerificationToken(params *GetVerificationTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVerificationTokenOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewGetVerificationTokenParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "getVerificationToken",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/gpg_key_token",
|
||
|
ProducesMediaTypes: []string{"text/plain"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &GetVerificationTokenReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*GetVerificationTokenOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for getVerificationToken: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UpdateUserSecret creates or update a secret value in a user scope
|
||
|
*/
|
||
|
func (a *Client) UpdateUserSecret(params *UpdateUserSecretParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserSecretCreated, *UpdateUserSecretNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUpdateUserSecretParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "updateUserSecret",
|
||
|
Method: "PUT",
|
||
|
PathPattern: "/user/actions/secrets/{secretname}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UpdateUserSecretReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, nil, err
|
||
|
}
|
||
|
switch value := result.(type) {
|
||
|
case *UpdateUserSecretCreated:
|
||
|
return value, nil, nil
|
||
|
case *UpdateUserSecretNoContent:
|
||
|
return nil, value, nil
|
||
|
}
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for user: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UpdateUserSettings updates user settings
|
||
|
*/
|
||
|
func (a *Client) UpdateUserSettings(params *UpdateUserSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserSettingsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUpdateUserSettingsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "updateUserSettings",
|
||
|
Method: "PATCH",
|
||
|
PathPattern: "/user/settings",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UpdateUserSettingsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UpdateUserSettingsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for updateUserSettings: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UpdateUserVariable updates a user level variable which is created by current doer
|
||
|
*/
|
||
|
func (a *Client) UpdateUserVariable(params *UpdateUserVariableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateUserVariableCreated, *UpdateUserVariableNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUpdateUserVariableParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "updateUserVariable",
|
||
|
Method: "PUT",
|
||
|
PathPattern: "/user/actions/variables/{variablename}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UpdateUserVariableReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, nil, err
|
||
|
}
|
||
|
switch value := result.(type) {
|
||
|
case *UpdateUserVariableCreated:
|
||
|
return value, nil, nil
|
||
|
case *UpdateUserVariableNoContent:
|
||
|
return nil, value, nil
|
||
|
}
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for user: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserAddEmail adds email addresses
|
||
|
*/
|
||
|
func (a *Client) UserAddEmail(params *UserAddEmailParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserAddEmailCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserAddEmailParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userAddEmail",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/user/emails",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserAddEmailReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserAddEmailCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userAddEmail: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserBlockUser blocks a user
|
||
|
*/
|
||
|
func (a *Client) UserBlockUser(params *UserBlockUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserBlockUserNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserBlockUserParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userBlockUser",
|
||
|
Method: "PUT",
|
||
|
PathPattern: "/user/blocks/{username}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserBlockUserReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserBlockUserNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userBlockUser: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCheckFollowing checks if one user is following another user
|
||
|
*/
|
||
|
func (a *Client) UserCheckFollowing(params *UserCheckFollowingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCheckFollowingNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCheckFollowingParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCheckFollowing",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/users/{username}/following/{target}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCheckFollowingReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCheckFollowingNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCheckFollowing: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCheckUserBlock checks if a user is blocked by the authenticated user
|
||
|
*/
|
||
|
func (a *Client) UserCheckUserBlock(params *UserCheckUserBlockParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCheckUserBlockNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCheckUserBlockParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCheckUserBlock",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/blocks/{username}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCheckUserBlockReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCheckUserBlockNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCheckUserBlock: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCreateHook creates a hook
|
||
|
*/
|
||
|
func (a *Client) UserCreateHook(params *UserCreateHookParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCreateHookCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCreateHookParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCreateHook",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/user/hooks",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCreateHookReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCreateHookCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCreateHook: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCreateOAuth2Application creates a new o auth2 application
|
||
|
*/
|
||
|
func (a *Client) UserCreateOAuth2Application(params *UserCreateOAuth2ApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCreateOAuth2ApplicationCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCreateOAuth2ApplicationParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCreateOAuth2Application",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/user/applications/oauth2",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCreateOAuth2ApplicationReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCreateOAuth2ApplicationCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCreateOAuth2Application: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCreateToken creates an access token
|
||
|
*/
|
||
|
func (a *Client) UserCreateToken(params *UserCreateTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCreateTokenCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCreateTokenParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCreateToken",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/users/{username}/tokens",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCreateTokenReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCreateTokenCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCreateToken: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentCheckFollowing checks whether a user is followed by the authenticated user
|
||
|
*/
|
||
|
func (a *Client) UserCurrentCheckFollowing(params *UserCurrentCheckFollowingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentCheckFollowingNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentCheckFollowingParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentCheckFollowing",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/following/{username}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentCheckFollowingReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentCheckFollowingNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentCheckFollowing: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentCheckStarring whethers the authenticated is starring the repo
|
||
|
*/
|
||
|
func (a *Client) UserCurrentCheckStarring(params *UserCurrentCheckStarringParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentCheckStarringNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentCheckStarringParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentCheckStarring",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/starred/{owner}/{repo}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentCheckStarringReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentCheckStarringNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentCheckStarring: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentDeleteFollow unfollows a user
|
||
|
*/
|
||
|
func (a *Client) UserCurrentDeleteFollow(params *UserCurrentDeleteFollowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentDeleteFollowNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentDeleteFollowParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentDeleteFollow",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/user/following/{username}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentDeleteFollowReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentDeleteFollowNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentDeleteFollow: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentDeleteGPGKey removes a g p g key
|
||
|
*/
|
||
|
func (a *Client) UserCurrentDeleteGPGKey(params *UserCurrentDeleteGPGKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentDeleteGPGKeyNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentDeleteGPGKeyParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentDeleteGPGKey",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/user/gpg_keys/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentDeleteGPGKeyReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentDeleteGPGKeyNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentDeleteGPGKey: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentDeleteKey deletes a public key
|
||
|
*/
|
||
|
func (a *Client) UserCurrentDeleteKey(params *UserCurrentDeleteKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentDeleteKeyNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentDeleteKeyParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentDeleteKey",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/user/keys/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentDeleteKeyReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentDeleteKeyNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentDeleteKey: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentDeleteStar unstars the given repo
|
||
|
*/
|
||
|
func (a *Client) UserCurrentDeleteStar(params *UserCurrentDeleteStarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentDeleteStarNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentDeleteStarParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentDeleteStar",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/user/starred/{owner}/{repo}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentDeleteStarReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentDeleteStarNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentDeleteStar: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentGetGPGKey gets a g p g key
|
||
|
*/
|
||
|
func (a *Client) UserCurrentGetGPGKey(params *UserCurrentGetGPGKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentGetGPGKeyOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentGetGPGKeyParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentGetGPGKey",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/gpg_keys/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentGetGPGKeyReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentGetGPGKeyOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentGetGPGKey: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentGetKey gets a public key
|
||
|
*/
|
||
|
func (a *Client) UserCurrentGetKey(params *UserCurrentGetKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentGetKeyOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentGetKeyParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentGetKey",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/keys/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentGetKeyReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentGetKeyOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentGetKey: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentListFollowers lists the authenticated user s followers
|
||
|
*/
|
||
|
func (a *Client) UserCurrentListFollowers(params *UserCurrentListFollowersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentListFollowersOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentListFollowersParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentListFollowers",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/followers",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentListFollowersReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentListFollowersOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentListFollowers: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentListFollowing lists the users that the authenticated user is following
|
||
|
*/
|
||
|
func (a *Client) UserCurrentListFollowing(params *UserCurrentListFollowingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentListFollowingOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentListFollowingParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentListFollowing",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/following",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentListFollowingReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentListFollowingOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentListFollowing: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentListGPGKeys lists the authenticated user s g p g keys
|
||
|
*/
|
||
|
func (a *Client) UserCurrentListGPGKeys(params *UserCurrentListGPGKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentListGPGKeysOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentListGPGKeysParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentListGPGKeys",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/gpg_keys",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentListGPGKeysReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentListGPGKeysOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentListGPGKeys: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentListKeys lists the authenticated user s public keys
|
||
|
*/
|
||
|
func (a *Client) UserCurrentListKeys(params *UserCurrentListKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentListKeysOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentListKeysParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentListKeys",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/keys",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentListKeysReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentListKeysOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentListKeys: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentListRepos lists the repos that the authenticated user owns
|
||
|
*/
|
||
|
func (a *Client) UserCurrentListRepos(params *UserCurrentListReposParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentListReposOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentListReposParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentListRepos",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/repos",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentListReposReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentListReposOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentListRepos: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentListStarred thes repos that the authenticated user has starred
|
||
|
*/
|
||
|
func (a *Client) UserCurrentListStarred(params *UserCurrentListStarredParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentListStarredOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentListStarredParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentListStarred",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/starred",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentListStarredReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentListStarredOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentListStarred: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentListSubscriptions lists repositories watched by the authenticated user
|
||
|
*/
|
||
|
func (a *Client) UserCurrentListSubscriptions(params *UserCurrentListSubscriptionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentListSubscriptionsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentListSubscriptionsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentListSubscriptions",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/subscriptions",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentListSubscriptionsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentListSubscriptionsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentListSubscriptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentPostGPGKey creates a g p g key
|
||
|
*/
|
||
|
func (a *Client) UserCurrentPostGPGKey(params *UserCurrentPostGPGKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentPostGPGKeyCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentPostGPGKeyParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentPostGPGKey",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/user/gpg_keys",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentPostGPGKeyReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentPostGPGKeyCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentPostGPGKey: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentPostKey creates a public key
|
||
|
*/
|
||
|
func (a *Client) UserCurrentPostKey(params *UserCurrentPostKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentPostKeyCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentPostKeyParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentPostKey",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/user/keys",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentPostKeyReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentPostKeyCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentPostKey: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentPutFollow follows a user
|
||
|
*/
|
||
|
func (a *Client) UserCurrentPutFollow(params *UserCurrentPutFollowParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentPutFollowNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentPutFollowParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentPutFollow",
|
||
|
Method: "PUT",
|
||
|
PathPattern: "/user/following/{username}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentPutFollowReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentPutFollowNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentPutFollow: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentPutStar stars the given repo
|
||
|
*/
|
||
|
func (a *Client) UserCurrentPutStar(params *UserCurrentPutStarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentPutStarNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentPutStarParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentPutStar",
|
||
|
Method: "PUT",
|
||
|
PathPattern: "/user/starred/{owner}/{repo}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentPutStarReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentPutStarNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentPutStar: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserCurrentTrackedTimes lists the current user s tracked times
|
||
|
*/
|
||
|
func (a *Client) UserCurrentTrackedTimes(params *UserCurrentTrackedTimesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserCurrentTrackedTimesOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserCurrentTrackedTimesParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userCurrentTrackedTimes",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/times",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserCurrentTrackedTimesReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserCurrentTrackedTimesOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userCurrentTrackedTimes: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserDeleteAccessToken deletes an access token
|
||
|
*/
|
||
|
func (a *Client) UserDeleteAccessToken(params *UserDeleteAccessTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserDeleteAccessTokenNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserDeleteAccessTokenParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userDeleteAccessToken",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/users/{username}/tokens/{token}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserDeleteAccessTokenReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserDeleteAccessTokenNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userDeleteAccessToken: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserDeleteAvatar deletes avatar
|
||
|
*/
|
||
|
func (a *Client) UserDeleteAvatar(params *UserDeleteAvatarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserDeleteAvatarNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserDeleteAvatarParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userDeleteAvatar",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/user/avatar",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserDeleteAvatarReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserDeleteAvatarNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userDeleteAvatar: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserDeleteEmail deletes email addresses
|
||
|
*/
|
||
|
func (a *Client) UserDeleteEmail(params *UserDeleteEmailParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserDeleteEmailNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserDeleteEmailParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userDeleteEmail",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/user/emails",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserDeleteEmailReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserDeleteEmailNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userDeleteEmail: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserDeleteHook deletes a hook
|
||
|
*/
|
||
|
func (a *Client) UserDeleteHook(params *UserDeleteHookParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserDeleteHookNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserDeleteHookParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userDeleteHook",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/user/hooks/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserDeleteHookReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserDeleteHookNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userDeleteHook: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserDeleteOAuth2Application deletes an o auth2 application
|
||
|
*/
|
||
|
func (a *Client) UserDeleteOAuth2Application(params *UserDeleteOAuth2ApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserDeleteOAuth2ApplicationNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserDeleteOAuth2ApplicationParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userDeleteOAuth2Application",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/user/applications/oauth2/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserDeleteOAuth2ApplicationReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserDeleteOAuth2ApplicationNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userDeleteOAuth2Application: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserEditHook updates a hook
|
||
|
*/
|
||
|
func (a *Client) UserEditHook(params *UserEditHookParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserEditHookOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserEditHookParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userEditHook",
|
||
|
Method: "PATCH",
|
||
|
PathPattern: "/user/hooks/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserEditHookReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserEditHookOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userEditHook: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserGet gets a user
|
||
|
*/
|
||
|
func (a *Client) UserGet(params *UserGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserGetParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userGet",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/users/{username}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserGetReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserGetOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userGet: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserGetCurrent gets the authenticated user
|
||
|
*/
|
||
|
func (a *Client) UserGetCurrent(params *UserGetCurrentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetCurrentOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserGetCurrentParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userGetCurrent",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserGetCurrentReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserGetCurrentOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userGetCurrent: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserGetHeatmapData gets a user s heatmap
|
||
|
*/
|
||
|
func (a *Client) UserGetHeatmapData(params *UserGetHeatmapDataParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetHeatmapDataOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserGetHeatmapDataParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userGetHeatmapData",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/users/{username}/heatmap",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserGetHeatmapDataReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserGetHeatmapDataOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userGetHeatmapData: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserGetHook gets a hook
|
||
|
*/
|
||
|
func (a *Client) UserGetHook(params *UserGetHookParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetHookOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserGetHookParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userGetHook",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/hooks/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserGetHookReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserGetHookOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userGetHook: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserGetOAuth2Application gets an o auth2 application
|
||
|
*/
|
||
|
func (a *Client) UserGetOAuth2Application(params *UserGetOAuth2ApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetOAuth2ApplicationOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserGetOAuth2ApplicationParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userGetOAuth2Application",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/applications/oauth2/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserGetOAuth2ApplicationReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserGetOAuth2ApplicationOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userGetOAuth2Application: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserGetOauth2Application lists the authenticated user s oauth2 applications
|
||
|
*/
|
||
|
func (a *Client) UserGetOauth2Application(params *UserGetOauth2ApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetOauth2ApplicationOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserGetOauth2ApplicationParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userGetOauth2Application",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/applications/oauth2",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserGetOauth2ApplicationReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserGetOauth2ApplicationOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userGetOauth2Application: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserGetRunnerRegistrationToken gets an user s actions runner registration token
|
||
|
*/
|
||
|
func (a *Client) UserGetRunnerRegistrationToken(params *UserGetRunnerRegistrationTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetRunnerRegistrationTokenOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserGetRunnerRegistrationTokenParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userGetRunnerRegistrationToken",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/actions/runners/registration-token",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserGetRunnerRegistrationTokenReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserGetRunnerRegistrationTokenOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userGetRunnerRegistrationToken: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserGetStopWatches gets list of all existing stopwatches
|
||
|
*/
|
||
|
func (a *Client) UserGetStopWatches(params *UserGetStopWatchesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetStopWatchesOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserGetStopWatchesParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userGetStopWatches",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/stopwatches",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserGetStopWatchesReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserGetStopWatchesOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userGetStopWatches: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserGetTokens lists the authenticated user s access tokens
|
||
|
*/
|
||
|
func (a *Client) UserGetTokens(params *UserGetTokensParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserGetTokensOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserGetTokensParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userGetTokens",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/users/{username}/tokens",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserGetTokensReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserGetTokensOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userGetTokens: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserListActivityFeeds lists a user s activity feeds
|
||
|
*/
|
||
|
func (a *Client) UserListActivityFeeds(params *UserListActivityFeedsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListActivityFeedsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserListActivityFeedsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userListActivityFeeds",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/users/{username}/activities/feeds",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserListActivityFeedsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserListActivityFeedsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userListActivityFeeds: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserListBlocks lists users blocked by the authenticated user
|
||
|
*/
|
||
|
func (a *Client) UserListBlocks(params *UserListBlocksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListBlocksOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserListBlocksParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userListBlocks",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/blocks",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserListBlocksReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserListBlocksOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userListBlocks: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserListEmails lists the authenticated user s email addresses
|
||
|
*/
|
||
|
func (a *Client) UserListEmails(params *UserListEmailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListEmailsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserListEmailsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userListEmails",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/emails",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserListEmailsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserListEmailsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userListEmails: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserListFollowers lists the given user s followers
|
||
|
*/
|
||
|
func (a *Client) UserListFollowers(params *UserListFollowersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListFollowersOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserListFollowersParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userListFollowers",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/users/{username}/followers",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserListFollowersReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserListFollowersOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userListFollowers: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserListFollowing lists the users that the given user is following
|
||
|
*/
|
||
|
func (a *Client) UserListFollowing(params *UserListFollowingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListFollowingOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserListFollowingParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userListFollowing",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/users/{username}/following",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserListFollowingReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserListFollowingOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userListFollowing: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserListGPGKeys lists the given user s g p g keys
|
||
|
*/
|
||
|
func (a *Client) UserListGPGKeys(params *UserListGPGKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListGPGKeysOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserListGPGKeysParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userListGPGKeys",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/users/{username}/gpg_keys",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserListGPGKeysReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserListGPGKeysOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userListGPGKeys: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserListHooks lists the authenticated user s webhooks
|
||
|
*/
|
||
|
func (a *Client) UserListHooks(params *UserListHooksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListHooksOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserListHooksParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userListHooks",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/hooks",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserListHooksReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserListHooksOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userListHooks: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserListKeys lists the given user s public keys
|
||
|
*/
|
||
|
func (a *Client) UserListKeys(params *UserListKeysParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListKeysOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserListKeysParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userListKeys",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/users/{username}/keys",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserListKeysReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserListKeysOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userListKeys: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserListRepos lists the repos owned by the given user
|
||
|
*/
|
||
|
func (a *Client) UserListRepos(params *UserListReposParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListReposOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserListReposParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userListRepos",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/users/{username}/repos",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserListReposReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserListReposOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userListRepos: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserListStarred thes repos that the given user has starred
|
||
|
*/
|
||
|
func (a *Client) UserListStarred(params *UserListStarredParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListStarredOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserListStarredParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userListStarred",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/users/{username}/starred",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserListStarredReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserListStarredOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userListStarred: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserListSubscriptions lists the repositories watched by a user
|
||
|
*/
|
||
|
func (a *Client) UserListSubscriptions(params *UserListSubscriptionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListSubscriptionsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserListSubscriptionsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userListSubscriptions",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/users/{username}/subscriptions",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserListSubscriptionsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserListSubscriptionsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userListSubscriptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserListTeams lists all the teams a user belongs to
|
||
|
*/
|
||
|
func (a *Client) UserListTeams(params *UserListTeamsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserListTeamsOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserListTeamsParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userListTeams",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/user/teams",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserListTeamsReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserListTeamsOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userListTeams: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserSearch searches for users
|
||
|
*/
|
||
|
func (a *Client) UserSearch(params *UserSearchParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserSearchOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserSearchParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userSearch",
|
||
|
Method: "GET",
|
||
|
PathPattern: "/users/search",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserSearchReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserSearchOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userSearch: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserUnblockUser unblocks a user
|
||
|
*/
|
||
|
func (a *Client) UserUnblockUser(params *UserUnblockUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserUnblockUserNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserUnblockUserParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userUnblockUser",
|
||
|
Method: "DELETE",
|
||
|
PathPattern: "/user/blocks/{username}",
|
||
|
ProducesMediaTypes: []string{"application/json", "text/html"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserUnblockUserReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserUnblockUserNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userUnblockUser: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserUpdateAvatar updates avatar
|
||
|
*/
|
||
|
func (a *Client) UserUpdateAvatar(params *UserUpdateAvatarParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserUpdateAvatarNoContent, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserUpdateAvatarParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userUpdateAvatar",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/user/avatar",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserUpdateAvatarReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserUpdateAvatarNoContent)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userUpdateAvatar: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserUpdateOAuth2Application updates an o auth2 application this includes regenerating the client secret
|
||
|
*/
|
||
|
func (a *Client) UserUpdateOAuth2Application(params *UserUpdateOAuth2ApplicationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserUpdateOAuth2ApplicationOK, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserUpdateOAuth2ApplicationParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userUpdateOAuth2Application",
|
||
|
Method: "PATCH",
|
||
|
PathPattern: "/user/applications/oauth2/{id}",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json", "text/plain"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserUpdateOAuth2ApplicationReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserUpdateOAuth2ApplicationOK)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userUpdateOAuth2Application: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UserVerifyGPGKey verifies a g p g key
|
||
|
*/
|
||
|
func (a *Client) UserVerifyGPGKey(params *UserVerifyGPGKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UserVerifyGPGKeyCreated, error) {
|
||
|
// TODO: Validate the params before sending
|
||
|
if params == nil {
|
||
|
params = NewUserVerifyGPGKeyParams()
|
||
|
}
|
||
|
op := &runtime.ClientOperation{
|
||
|
ID: "userVerifyGPGKey",
|
||
|
Method: "POST",
|
||
|
PathPattern: "/user/gpg_key_verify",
|
||
|
ProducesMediaTypes: []string{"application/json"},
|
||
|
ConsumesMediaTypes: []string{"application/json"},
|
||
|
Schemes: []string{"http", "https"},
|
||
|
Params: params,
|
||
|
Reader: &UserVerifyGPGKeyReader{formats: a.formats},
|
||
|
AuthInfo: authInfo,
|
||
|
Context: params.Context,
|
||
|
Client: params.HTTPClient,
|
||
|
}
|
||
|
for _, opt := range opts {
|
||
|
opt(op)
|
||
|
}
|
||
|
|
||
|
result, err := a.transport.Submit(op)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
success, ok := result.(*UserVerifyGPGKeyCreated)
|
||
|
if ok {
|
||
|
return success, nil
|
||
|
}
|
||
|
// unexpected success response
|
||
|
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||
|
msg := fmt.Sprintf("unexpected success response for userVerifyGPGKey: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||
|
panic(msg)
|
||
|
}
|
||
|
|
||
|
// SetTransport changes the transport on the client
|
||
|
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||
|
a.transport = transport
|
||
|
}
|