236 lines
6.6 KiB
Go
236 lines
6.6 KiB
Go
package character
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"github.com/go-openapi/runtime"
|
|
|
|
strfmt "github.com/go-openapi/strfmt"
|
|
)
|
|
|
|
// New creates a new character API client.
|
|
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
|
|
return &Client{transport: transport, formats: formats}
|
|
}
|
|
|
|
/*
|
|
Client for character API
|
|
*/
|
|
type Client struct {
|
|
transport runtime.ClientTransport
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
/*
|
|
GetCharactersCharacterID gets character s public information
|
|
|
|
Public information about a character
|
|
|
|
---
|
|
|
|
Alternate route: `/v4/characters/{character_id}/`
|
|
|
|
Alternate route: `/dev/characters/{character_id}/`
|
|
|
|
|
|
---
|
|
|
|
This route is cached for up to 3600 seconds
|
|
*/
|
|
func (a *Client) GetCharactersCharacterID(params *GetCharactersCharacterIDParams) (*GetCharactersCharacterIDOK, error) {
|
|
// TODO: Validate the params before sending
|
|
if params == nil {
|
|
params = NewGetCharactersCharacterIDParams()
|
|
}
|
|
|
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
ID: "get_characters_character_id",
|
|
Method: "GET",
|
|
PathPattern: "/characters/{character_id}/",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{""},
|
|
Schemes: []string{"https"},
|
|
Params: params,
|
|
Reader: &GetCharactersCharacterIDReader{formats: a.formats},
|
|
Context: params.Context,
|
|
Client: params.HTTPClient,
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return result.(*GetCharactersCharacterIDOK), nil
|
|
|
|
}
|
|
|
|
/*
|
|
GetCharactersCharacterIDCorporationhistory gets corporation history
|
|
|
|
Get a list of all the corporations a character has been a member of
|
|
|
|
---
|
|
|
|
Alternate route: `/v1/characters/{character_id}/corporationhistory/`
|
|
|
|
Alternate route: `/legacy/characters/{character_id}/corporationhistory/`
|
|
|
|
Alternate route: `/dev/characters/{character_id}/corporationhistory/`
|
|
|
|
|
|
---
|
|
|
|
This route is cached for up to 3600 seconds
|
|
*/
|
|
func (a *Client) GetCharactersCharacterIDCorporationhistory(params *GetCharactersCharacterIDCorporationhistoryParams) (*GetCharactersCharacterIDCorporationhistoryOK, error) {
|
|
// TODO: Validate the params before sending
|
|
if params == nil {
|
|
params = NewGetCharactersCharacterIDCorporationhistoryParams()
|
|
}
|
|
|
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
ID: "get_characters_character_id_corporationhistory",
|
|
Method: "GET",
|
|
PathPattern: "/characters/{character_id}/corporationhistory/",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{""},
|
|
Schemes: []string{"https"},
|
|
Params: params,
|
|
Reader: &GetCharactersCharacterIDCorporationhistoryReader{formats: a.formats},
|
|
Context: params.Context,
|
|
Client: params.HTTPClient,
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return result.(*GetCharactersCharacterIDCorporationhistoryOK), nil
|
|
|
|
}
|
|
|
|
/*
|
|
GetCharactersCharacterIDPortrait gets character portraits
|
|
|
|
Get portrait urls for a character
|
|
|
|
---
|
|
|
|
Alternate route: `/v2/characters/{character_id}/portrait/`
|
|
|
|
Alternate route: `/dev/characters/{character_id}/portrait/`
|
|
|
|
|
|
---
|
|
|
|
This route is cached for up to 3600 seconds
|
|
*/
|
|
func (a *Client) GetCharactersCharacterIDPortrait(params *GetCharactersCharacterIDPortraitParams) (*GetCharactersCharacterIDPortraitOK, error) {
|
|
// TODO: Validate the params before sending
|
|
if params == nil {
|
|
params = NewGetCharactersCharacterIDPortraitParams()
|
|
}
|
|
|
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
ID: "get_characters_character_id_portrait",
|
|
Method: "GET",
|
|
PathPattern: "/characters/{character_id}/portrait/",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{""},
|
|
Schemes: []string{"https"},
|
|
Params: params,
|
|
Reader: &GetCharactersCharacterIDPortraitReader{formats: a.formats},
|
|
Context: params.Context,
|
|
Client: params.HTTPClient,
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return result.(*GetCharactersCharacterIDPortraitOK), nil
|
|
|
|
}
|
|
|
|
/*
|
|
GetCharactersNames gets character names
|
|
|
|
Resolve a set of character IDs to character names
|
|
|
|
---
|
|
|
|
Alternate route: `/v1/characters/names/`
|
|
|
|
Alternate route: `/legacy/characters/names/`
|
|
|
|
Alternate route: `/dev/characters/names/`
|
|
|
|
|
|
---
|
|
|
|
This route is cached for up to 3600 seconds
|
|
*/
|
|
func (a *Client) GetCharactersNames(params *GetCharactersNamesParams) (*GetCharactersNamesOK, error) {
|
|
// TODO: Validate the params before sending
|
|
if params == nil {
|
|
params = NewGetCharactersNamesParams()
|
|
}
|
|
|
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
ID: "get_characters_names",
|
|
Method: "GET",
|
|
PathPattern: "/characters/names/",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{""},
|
|
Schemes: []string{"https"},
|
|
Params: params,
|
|
Reader: &GetCharactersNamesReader{formats: a.formats},
|
|
Context: params.Context,
|
|
Client: params.HTTPClient,
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return result.(*GetCharactersNamesOK), nil
|
|
|
|
}
|
|
|
|
/*
|
|
PostCharactersCharacterIDCspa calculates a c s p a charge cost
|
|
|
|
Takes a source character ID in the url and a set of target character ID's in the body, returns a CSPA charge cost
|
|
|
|
---
|
|
|
|
Alternate route: `/v3/characters/{character_id}/cspa/`
|
|
|
|
Alternate route: `/legacy/characters/{character_id}/cspa/`
|
|
|
|
Alternate route: `/dev/characters/{character_id}/cspa/`
|
|
|
|
*/
|
|
func (a *Client) PostCharactersCharacterIDCspa(params *PostCharactersCharacterIDCspaParams, authInfo runtime.ClientAuthInfoWriter) (*PostCharactersCharacterIDCspaCreated, error) {
|
|
// TODO: Validate the params before sending
|
|
if params == nil {
|
|
params = NewPostCharactersCharacterIDCspaParams()
|
|
}
|
|
|
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
ID: "post_characters_character_id_cspa",
|
|
Method: "POST",
|
|
PathPattern: "/characters/{character_id}/cspa/",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{""},
|
|
Schemes: []string{"https"},
|
|
Params: params,
|
|
Reader: &PostCharactersCharacterIDCspaReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Context: params.Context,
|
|
Client: params.HTTPClient,
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return result.(*PostCharactersCharacterIDCspaCreated), nil
|
|
|
|
}
|
|
|
|
// SetTransport changes the transport on the client
|
|
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
|
a.transport = transport
|
|
}
|