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

package opportunities

// 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 opportunities API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
	return &Client{transport: transport, formats: formats}
}

/*
Client for opportunities API
*/
type Client struct {
	transport runtime.ClientTransport
	formats   strfmt.Registry
}

/*
GetCharactersCharacterIDOpportunities gets a character s completed tasks

Return a list of tasks finished by a character

---
Alternate route: `/v1/characters/{character_id}/opportunities/`

Alternate route: `/legacy/characters/{character_id}/opportunities/`

Alternate route: `/dev/characters/{character_id}/opportunities/`

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

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "get_characters_character_id_opportunities",
		Method:             "GET",
		PathPattern:        "/characters/{character_id}/opportunities/",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{""},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &GetCharactersCharacterIDOpportunitiesReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetCharactersCharacterIDOpportunitiesOK), nil

}

/*
GetOpportunitiesGroups gets opportunities groups

Return a list of opportunities groups

---
Alternate route: `/v1/opportunities/groups/`

Alternate route: `/legacy/opportunities/groups/`

Alternate route: `/dev/opportunities/groups/`

---
This route expires daily at 11:05
*/
func (a *Client) GetOpportunitiesGroups(params *GetOpportunitiesGroupsParams) (*GetOpportunitiesGroupsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetOpportunitiesGroupsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "get_opportunities_groups",
		Method:             "GET",
		PathPattern:        "/opportunities/groups/",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{""},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &GetOpportunitiesGroupsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetOpportunitiesGroupsOK), nil

}

/*
GetOpportunitiesGroupsGroupID gets opportunities group

Return information of an opportunities group

---
Alternate route: `/v1/opportunities/groups/{group_id}/`

Alternate route: `/legacy/opportunities/groups/{group_id}/`

Alternate route: `/dev/opportunities/groups/{group_id}/`

---
This route expires daily at 11:05
*/
func (a *Client) GetOpportunitiesGroupsGroupID(params *GetOpportunitiesGroupsGroupIDParams) (*GetOpportunitiesGroupsGroupIDOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetOpportunitiesGroupsGroupIDParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "get_opportunities_groups_group_id",
		Method:             "GET",
		PathPattern:        "/opportunities/groups/{group_id}/",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{""},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &GetOpportunitiesGroupsGroupIDReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetOpportunitiesGroupsGroupIDOK), nil

}

/*
GetOpportunitiesTasks gets opportunities tasks

Return a list of opportunities tasks

---
Alternate route: `/v1/opportunities/tasks/`

Alternate route: `/legacy/opportunities/tasks/`

Alternate route: `/dev/opportunities/tasks/`

---
This route expires daily at 11:05
*/
func (a *Client) GetOpportunitiesTasks(params *GetOpportunitiesTasksParams) (*GetOpportunitiesTasksOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetOpportunitiesTasksParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "get_opportunities_tasks",
		Method:             "GET",
		PathPattern:        "/opportunities/tasks/",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{""},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &GetOpportunitiesTasksReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetOpportunitiesTasksOK), nil

}

/*
GetOpportunitiesTasksTaskID gets opportunities task

Return information of an opportunities task

---
Alternate route: `/v1/opportunities/tasks/{task_id}/`

Alternate route: `/legacy/opportunities/tasks/{task_id}/`

Alternate route: `/dev/opportunities/tasks/{task_id}/`

---
This route expires daily at 11:05
*/
func (a *Client) GetOpportunitiesTasksTaskID(params *GetOpportunitiesTasksTaskIDParams) (*GetOpportunitiesTasksTaskIDOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetOpportunitiesTasksTaskIDParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "get_opportunities_tasks_task_id",
		Method:             "GET",
		PathPattern:        "/opportunities/tasks/{task_id}/",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{""},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &GetOpportunitiesTasksTaskIDReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetOpportunitiesTasksTaskIDOK), nil

}

// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) {
	a.transport = transport
}
