115 lines
3.3 KiB
Go
115 lines
3.3 KiB
Go
package killmails
|
|
|
|
// 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 killmails API client.
|
|
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
|
|
return &Client{transport: transport, formats: formats}
|
|
}
|
|
|
|
/*
|
|
Client for killmails API
|
|
*/
|
|
type Client struct {
|
|
transport runtime.ClientTransport
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
/*
|
|
GetCharactersCharacterIDKillmailsRecent lists kills and losses
|
|
|
|
Return a list of character's recent kills and losses
|
|
|
|
---
|
|
|
|
Alternate route: `/v1/characters/{character_id}/killmails/recent/`
|
|
|
|
Alternate route: `/legacy/characters/{character_id}/killmails/recent/`
|
|
|
|
Alternate route: `/dev/characters/{character_id}/killmails/recent/`
|
|
|
|
|
|
---
|
|
|
|
This route is cached for up to 120 seconds
|
|
*/
|
|
func (a *Client) GetCharactersCharacterIDKillmailsRecent(params *GetCharactersCharacterIDKillmailsRecentParams, authInfo runtime.ClientAuthInfoWriter) (*GetCharactersCharacterIDKillmailsRecentOK, error) {
|
|
// TODO: Validate the params before sending
|
|
if params == nil {
|
|
params = NewGetCharactersCharacterIDKillmailsRecentParams()
|
|
}
|
|
|
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
ID: "get_characters_character_id_killmails_recent",
|
|
Method: "GET",
|
|
PathPattern: "/characters/{character_id}/killmails/recent/",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{""},
|
|
Schemes: []string{"https"},
|
|
Params: params,
|
|
Reader: &GetCharactersCharacterIDKillmailsRecentReader{formats: a.formats},
|
|
AuthInfo: authInfo,
|
|
Context: params.Context,
|
|
Client: params.HTTPClient,
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return result.(*GetCharactersCharacterIDKillmailsRecentOK), nil
|
|
|
|
}
|
|
|
|
/*
|
|
GetKillmailsKillmailIDKillmailHash gets a single killmail
|
|
|
|
Return a single killmail from its ID and hash
|
|
|
|
---
|
|
|
|
Alternate route: `/v1/killmails/{killmail_id}/{killmail_hash}/`
|
|
|
|
Alternate route: `/legacy/killmails/{killmail_id}/{killmail_hash}/`
|
|
|
|
Alternate route: `/dev/killmails/{killmail_id}/{killmail_hash}/`
|
|
|
|
|
|
---
|
|
|
|
This route is cached for up to 3600 seconds
|
|
*/
|
|
func (a *Client) GetKillmailsKillmailIDKillmailHash(params *GetKillmailsKillmailIDKillmailHashParams) (*GetKillmailsKillmailIDKillmailHashOK, error) {
|
|
// TODO: Validate the params before sending
|
|
if params == nil {
|
|
params = NewGetKillmailsKillmailIDKillmailHashParams()
|
|
}
|
|
|
|
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
ID: "get_killmails_killmail_id_killmail_hash",
|
|
Method: "GET",
|
|
PathPattern: "/killmails/{killmail_id}/{killmail_hash}/",
|
|
ProducesMediaTypes: []string{"application/json"},
|
|
ConsumesMediaTypes: []string{""},
|
|
Schemes: []string{"https"},
|
|
Params: params,
|
|
Reader: &GetKillmailsKillmailIDKillmailHashReader{formats: a.formats},
|
|
Context: params.Context,
|
|
Client: params.HTTPClient,
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return result.(*GetKillmailsKillmailIDKillmailHashOK), nil
|
|
|
|
}
|
|
|
|
// SetTransport changes the transport on the client
|
|
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
|
a.transport = transport
|
|
}
|