package location // 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 location API client. func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { return &Client{transport: transport, formats: formats} } /* Client for location API */ type Client struct { transport runtime.ClientTransport formats strfmt.Registry } /* GetCharactersCharacterIDLocation gets character location Information about the characters current location. Returns the current solar system id, and also the current station or structure ID if applicable. --- Alternate route: `/v1/characters/{character_id}/location/` Alternate route: `/legacy/characters/{character_id}/location/` Alternate route: `/dev/characters/{character_id}/location/` --- This route is cached for up to 5 seconds */ func (a *Client) GetCharactersCharacterIDLocation(params *GetCharactersCharacterIDLocationParams, authInfo runtime.ClientAuthInfoWriter) (*GetCharactersCharacterIDLocationOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetCharactersCharacterIDLocationParams() } result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "get_characters_character_id_location", Method: "GET", PathPattern: "/characters/{character_id}/location/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{""}, Schemes: []string{"https"}, Params: params, Reader: &GetCharactersCharacterIDLocationReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, }) if err != nil { return nil, err } return result.(*GetCharactersCharacterIDLocationOK), nil } /* GetCharactersCharacterIDShip gets current ship Get the current ship type, name and id --- Alternate route: `/v1/characters/{character_id}/ship/` Alternate route: `/legacy/characters/{character_id}/ship/` Alternate route: `/dev/characters/{character_id}/ship/` --- This route is cached for up to 5 seconds */ func (a *Client) GetCharactersCharacterIDShip(params *GetCharactersCharacterIDShipParams, authInfo runtime.ClientAuthInfoWriter) (*GetCharactersCharacterIDShipOK, error) { // TODO: Validate the params before sending if params == nil { params = NewGetCharactersCharacterIDShipParams() } result, err := a.transport.Submit(&runtime.ClientOperation{ ID: "get_characters_character_id_ship", Method: "GET", PathPattern: "/characters/{character_id}/ship/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{""}, Schemes: []string{"https"}, Params: params, Reader: &GetCharactersCharacterIDShipReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, }) if err != nil { return nil, err } return result.(*GetCharactersCharacterIDShipOK), nil } // SetTransport changes the transport on the client func (a *Client) SetTransport(transport runtime.ClientTransport) { a.transport = transport }