// Code generated by go-swagger; DO NOT EDIT.

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 gets character 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

}

/*
GetCorporationsCorporationIDKillmailsRecent gets corporation kills and losses

Get a list of corporation's recent kills and losses

---
Alternate route: `/v1/corporations/{corporation_id}/killmails/recent/`

Alternate route: `/legacy/corporations/{corporation_id}/killmails/recent/`

Alternate route: `/dev/corporations/{corporation_id}/killmails/recent/`

---
This route is cached for up to 3600 seconds
*/
func (a *Client) GetCorporationsCorporationIDKillmailsRecent(params *GetCorporationsCorporationIDKillmailsRecentParams, authInfo runtime.ClientAuthInfoWriter) (*GetCorporationsCorporationIDKillmailsRecentOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetCorporationsCorporationIDKillmailsRecentParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "get_corporations_corporation_id_killmails_recent",
		Method:             "GET",
		PathPattern:        "/corporations/{corporation_id}/killmails/recent/",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{""},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &GetCorporationsCorporationIDKillmailsRecentReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetCorporationsCorporationIDKillmailsRecentOK), 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
}
