segment_efforts

package
v0.0.0-...-c7fed22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for segment efforts API

func (*Client) GetEffortsBySegmentID

func (a *Client) GetEffortsBySegmentID(params *GetEffortsBySegmentIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEffortsBySegmentIDOK, error)

GetEffortsBySegmentID lists segment efforts

Returns a set of the authenticated athlete's segment efforts for a given segment. Requires subscription.

func (*Client) GetSegmentEffortByID

func (a *Client) GetSegmentEffortByID(params *GetSegmentEffortByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSegmentEffortByIDOK, error)

GetSegmentEffortByID gets segment effort

Returns a segment effort from an activity that is owned by the authenticated athlete. Requires subscription.

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	GetEffortsBySegmentID(params *GetEffortsBySegmentIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEffortsBySegmentIDOK, error)

	GetSegmentEffortByID(params *GetSegmentEffortByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSegmentEffortByIDOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new segment efforts API client.

type GetEffortsBySegmentIDDefault

type GetEffortsBySegmentIDDefault struct {
	Payload *models.Fault
	// contains filtered or unexported fields
}

GetEffortsBySegmentIDDefault describes a response with status code -1, with default header values.

Unexpected error.

func NewGetEffortsBySegmentIDDefault

func NewGetEffortsBySegmentIDDefault(code int) *GetEffortsBySegmentIDDefault

NewGetEffortsBySegmentIDDefault creates a GetEffortsBySegmentIDDefault with default headers values

func (*GetEffortsBySegmentIDDefault) Code

Code gets the status code for the get efforts by segment Id default response

func (*GetEffortsBySegmentIDDefault) Error

func (*GetEffortsBySegmentIDDefault) GetPayload

func (o *GetEffortsBySegmentIDDefault) GetPayload() *models.Fault

func (*GetEffortsBySegmentIDDefault) IsClientError

func (o *GetEffortsBySegmentIDDefault) IsClientError() bool

IsClientError returns true when this get efforts by segment Id default response has a 4xx status code

func (*GetEffortsBySegmentIDDefault) IsCode

func (o *GetEffortsBySegmentIDDefault) IsCode(code int) bool

IsCode returns true when this get efforts by segment Id default response a status code equal to that given

func (*GetEffortsBySegmentIDDefault) IsRedirect

func (o *GetEffortsBySegmentIDDefault) IsRedirect() bool

IsRedirect returns true when this get efforts by segment Id default response has a 3xx status code

func (*GetEffortsBySegmentIDDefault) IsServerError

func (o *GetEffortsBySegmentIDDefault) IsServerError() bool

IsServerError returns true when this get efforts by segment Id default response has a 5xx status code

func (*GetEffortsBySegmentIDDefault) IsSuccess

func (o *GetEffortsBySegmentIDDefault) IsSuccess() bool

IsSuccess returns true when this get efforts by segment Id default response has a 2xx status code

func (*GetEffortsBySegmentIDDefault) String

type GetEffortsBySegmentIDOK

type GetEffortsBySegmentIDOK struct {
	Payload []*models.DetailedSegmentEffort
}

GetEffortsBySegmentIDOK describes a response with status code 200, with default header values.

List of segment efforts.

func NewGetEffortsBySegmentIDOK

func NewGetEffortsBySegmentIDOK() *GetEffortsBySegmentIDOK

NewGetEffortsBySegmentIDOK creates a GetEffortsBySegmentIDOK with default headers values

func (*GetEffortsBySegmentIDOK) Code

func (o *GetEffortsBySegmentIDOK) Code() int

Code gets the status code for the get efforts by segment Id o k response

func (*GetEffortsBySegmentIDOK) Error

func (o *GetEffortsBySegmentIDOK) Error() string

func (*GetEffortsBySegmentIDOK) GetPayload

func (*GetEffortsBySegmentIDOK) IsClientError

func (o *GetEffortsBySegmentIDOK) IsClientError() bool

IsClientError returns true when this get efforts by segment Id o k response has a 4xx status code

func (*GetEffortsBySegmentIDOK) IsCode

func (o *GetEffortsBySegmentIDOK) IsCode(code int) bool

IsCode returns true when this get efforts by segment Id o k response a status code equal to that given

func (*GetEffortsBySegmentIDOK) IsRedirect

func (o *GetEffortsBySegmentIDOK) IsRedirect() bool

IsRedirect returns true when this get efforts by segment Id o k response has a 3xx status code

func (*GetEffortsBySegmentIDOK) IsServerError

func (o *GetEffortsBySegmentIDOK) IsServerError() bool

IsServerError returns true when this get efforts by segment Id o k response has a 5xx status code

func (*GetEffortsBySegmentIDOK) IsSuccess

func (o *GetEffortsBySegmentIDOK) IsSuccess() bool

IsSuccess returns true when this get efforts by segment Id o k response has a 2xx status code

func (*GetEffortsBySegmentIDOK) String

func (o *GetEffortsBySegmentIDOK) String() string

type GetEffortsBySegmentIDParams

type GetEffortsBySegmentIDParams struct {
	/* EndDateLocal.

	   ISO 8601 formatted date time.

	   Format: date-time
	*/
	EndDateLocal *strfmt.DateTime

	/* PerPage.

	   Number of items per page. Defaults to 30.

	   Default: 30
	*/
	PerPage *int64

	/* SegmentID.

	   The identifier of the segment.
	*/
	SegmentID int64

	/* StartDateLocal.

	   ISO 8601 formatted date time.

	   Format: date-time
	*/
	StartDateLocal *strfmt.DateTime

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetEffortsBySegmentIDParams contains all the parameters to send to the API endpoint

for the get efforts by segment Id operation.

Typically these are written to a http.Request.

func NewGetEffortsBySegmentIDParams

func NewGetEffortsBySegmentIDParams() *GetEffortsBySegmentIDParams

NewGetEffortsBySegmentIDParams creates a new GetEffortsBySegmentIDParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewGetEffortsBySegmentIDParamsWithContext

func NewGetEffortsBySegmentIDParamsWithContext(ctx context.Context) *GetEffortsBySegmentIDParams

NewGetEffortsBySegmentIDParamsWithContext creates a new GetEffortsBySegmentIDParams object with the ability to set a context for a request.

func NewGetEffortsBySegmentIDParamsWithHTTPClient

func NewGetEffortsBySegmentIDParamsWithHTTPClient(client *http.Client) *GetEffortsBySegmentIDParams

NewGetEffortsBySegmentIDParamsWithHTTPClient creates a new GetEffortsBySegmentIDParams object with the ability to set a custom HTTPClient for a request.

func NewGetEffortsBySegmentIDParamsWithTimeout

func NewGetEffortsBySegmentIDParamsWithTimeout(timeout time.Duration) *GetEffortsBySegmentIDParams

NewGetEffortsBySegmentIDParamsWithTimeout creates a new GetEffortsBySegmentIDParams object with the ability to set a timeout on a request.

func (*GetEffortsBySegmentIDParams) SetContext

func (o *GetEffortsBySegmentIDParams) SetContext(ctx context.Context)

SetContext adds the context to the get efforts by segment Id params

func (*GetEffortsBySegmentIDParams) SetDefaults

func (o *GetEffortsBySegmentIDParams) SetDefaults()

SetDefaults hydrates default values in the get efforts by segment Id params (not the query body).

All values with no default are reset to their zero value.

func (*GetEffortsBySegmentIDParams) SetEndDateLocal

func (o *GetEffortsBySegmentIDParams) SetEndDateLocal(endDateLocal *strfmt.DateTime)

SetEndDateLocal adds the endDateLocal to the get efforts by segment Id params

func (*GetEffortsBySegmentIDParams) SetHTTPClient

func (o *GetEffortsBySegmentIDParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get efforts by segment Id params

func (*GetEffortsBySegmentIDParams) SetPerPage

func (o *GetEffortsBySegmentIDParams) SetPerPage(perPage *int64)

SetPerPage adds the perPage to the get efforts by segment Id params

func (*GetEffortsBySegmentIDParams) SetSegmentID

func (o *GetEffortsBySegmentIDParams) SetSegmentID(segmentID int64)

SetSegmentID adds the segmentId to the get efforts by segment Id params

func (*GetEffortsBySegmentIDParams) SetStartDateLocal

func (o *GetEffortsBySegmentIDParams) SetStartDateLocal(startDateLocal *strfmt.DateTime)

SetStartDateLocal adds the startDateLocal to the get efforts by segment Id params

func (*GetEffortsBySegmentIDParams) SetTimeout

func (o *GetEffortsBySegmentIDParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get efforts by segment Id params

func (*GetEffortsBySegmentIDParams) WithContext

WithContext adds the context to the get efforts by segment Id params

func (*GetEffortsBySegmentIDParams) WithDefaults

WithDefaults hydrates default values in the get efforts by segment Id params (not the query body).

All values with no default are reset to their zero value.

func (*GetEffortsBySegmentIDParams) WithEndDateLocal

func (o *GetEffortsBySegmentIDParams) WithEndDateLocal(endDateLocal *strfmt.DateTime) *GetEffortsBySegmentIDParams

WithEndDateLocal adds the endDateLocal to the get efforts by segment Id params

func (*GetEffortsBySegmentIDParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the get efforts by segment Id params

func (*GetEffortsBySegmentIDParams) WithPerPage

WithPerPage adds the perPage to the get efforts by segment Id params

func (*GetEffortsBySegmentIDParams) WithSegmentID

func (o *GetEffortsBySegmentIDParams) WithSegmentID(segmentID int64) *GetEffortsBySegmentIDParams

WithSegmentID adds the segmentID to the get efforts by segment Id params

func (*GetEffortsBySegmentIDParams) WithStartDateLocal

func (o *GetEffortsBySegmentIDParams) WithStartDateLocal(startDateLocal *strfmt.DateTime) *GetEffortsBySegmentIDParams

WithStartDateLocal adds the startDateLocal to the get efforts by segment Id params

func (*GetEffortsBySegmentIDParams) WithTimeout

WithTimeout adds the timeout to the get efforts by segment Id params

func (*GetEffortsBySegmentIDParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type GetEffortsBySegmentIDReader

type GetEffortsBySegmentIDReader struct {
	// contains filtered or unexported fields
}

GetEffortsBySegmentIDReader is a Reader for the GetEffortsBySegmentID structure.

func (*GetEffortsBySegmentIDReader) ReadResponse

func (o *GetEffortsBySegmentIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type GetSegmentEffortByIDDefault

type GetSegmentEffortByIDDefault struct {
	Payload *models.Fault
	// contains filtered or unexported fields
}

GetSegmentEffortByIDDefault describes a response with status code -1, with default header values.

Unexpected error.

func NewGetSegmentEffortByIDDefault

func NewGetSegmentEffortByIDDefault(code int) *GetSegmentEffortByIDDefault

NewGetSegmentEffortByIDDefault creates a GetSegmentEffortByIDDefault with default headers values

func (*GetSegmentEffortByIDDefault) Code

func (o *GetSegmentEffortByIDDefault) Code() int

Code gets the status code for the get segment effort by Id default response

func (*GetSegmentEffortByIDDefault) Error

func (*GetSegmentEffortByIDDefault) GetPayload

func (o *GetSegmentEffortByIDDefault) GetPayload() *models.Fault

func (*GetSegmentEffortByIDDefault) IsClientError

func (o *GetSegmentEffortByIDDefault) IsClientError() bool

IsClientError returns true when this get segment effort by Id default response has a 4xx status code

func (*GetSegmentEffortByIDDefault) IsCode

func (o *GetSegmentEffortByIDDefault) IsCode(code int) bool

IsCode returns true when this get segment effort by Id default response a status code equal to that given

func (*GetSegmentEffortByIDDefault) IsRedirect

func (o *GetSegmentEffortByIDDefault) IsRedirect() bool

IsRedirect returns true when this get segment effort by Id default response has a 3xx status code

func (*GetSegmentEffortByIDDefault) IsServerError

func (o *GetSegmentEffortByIDDefault) IsServerError() bool

IsServerError returns true when this get segment effort by Id default response has a 5xx status code

func (*GetSegmentEffortByIDDefault) IsSuccess

func (o *GetSegmentEffortByIDDefault) IsSuccess() bool

IsSuccess returns true when this get segment effort by Id default response has a 2xx status code

func (*GetSegmentEffortByIDDefault) String

func (o *GetSegmentEffortByIDDefault) String() string

type GetSegmentEffortByIDOK

type GetSegmentEffortByIDOK struct {
	Payload *GetSegmentEffortByIDOKBody
}

GetSegmentEffortByIDOK describes a response with status code 200, with default header values.

Representation of a segment effort.

func NewGetSegmentEffortByIDOK

func NewGetSegmentEffortByIDOK() *GetSegmentEffortByIDOK

NewGetSegmentEffortByIDOK creates a GetSegmentEffortByIDOK with default headers values

func (*GetSegmentEffortByIDOK) Code

func (o *GetSegmentEffortByIDOK) Code() int

Code gets the status code for the get segment effort by Id o k response

func (*GetSegmentEffortByIDOK) Error

func (o *GetSegmentEffortByIDOK) Error() string

func (*GetSegmentEffortByIDOK) GetPayload

func (*GetSegmentEffortByIDOK) IsClientError

func (o *GetSegmentEffortByIDOK) IsClientError() bool

IsClientError returns true when this get segment effort by Id o k response has a 4xx status code

func (*GetSegmentEffortByIDOK) IsCode

func (o *GetSegmentEffortByIDOK) IsCode(code int) bool

IsCode returns true when this get segment effort by Id o k response a status code equal to that given

func (*GetSegmentEffortByIDOK) IsRedirect

func (o *GetSegmentEffortByIDOK) IsRedirect() bool

IsRedirect returns true when this get segment effort by Id o k response has a 3xx status code

func (*GetSegmentEffortByIDOK) IsServerError

func (o *GetSegmentEffortByIDOK) IsServerError() bool

IsServerError returns true when this get segment effort by Id o k response has a 5xx status code

func (*GetSegmentEffortByIDOK) IsSuccess

func (o *GetSegmentEffortByIDOK) IsSuccess() bool

IsSuccess returns true when this get segment effort by Id o k response has a 2xx status code

func (*GetSegmentEffortByIDOK) String

func (o *GetSegmentEffortByIDOK) String() string

type GetSegmentEffortByIDOKBody

type GetSegmentEffortByIDOKBody struct {
	models.SummarySegmentEffort

	models.HeartRateDetails

	// activity
	Activity *models.MetaActivity `json:"activity,omitempty"`

	// athlete
	Athlete *models.MetaAthlete `json:"athlete,omitempty"`

	// The effort's average cadence
	AverageCadence float32 `json:"average_cadence,omitempty"`

	// The average wattage of this effort
	AverageWatts float32 `json:"average_watts,omitempty"`

	// For riding efforts, whether the wattage was reported by a dedicated recording device
	DeviceWatts bool `json:"device_watts,omitempty"`

	// The end index of this effort in its activity's stream
	EndIndex int64 `json:"end_index,omitempty"`

	// Whether this effort should be hidden when viewed within an activity
	Hidden bool `json:"hidden,omitempty"`

	// The rank of the effort on the global leaderboard if it belongs in the top 10 at the time of upload
	// Maximum: 10
	// Minimum: 1
	KomRank int64 `json:"kom_rank,omitempty"`

	// The effort's moving time
	MovingTime int64 `json:"moving_time,omitempty"`

	// The name of the segment on which this effort was performed
	Name string `json:"name,omitempty"`

	// The rank of the effort on the athlete's leaderboard if it belongs in the top 3 at the time of upload
	// Maximum: 3
	// Minimum: 1
	PrRank int64 `json:"pr_rank,omitempty"`

	// segment
	Segment *models.SummarySegment `json:"segment,omitempty"`

	// The start index of this effort in its activity's stream
	StartIndex int64 `json:"start_index,omitempty"`
}

GetSegmentEffortByIDOKBody get segment effort by ID o k body swagger:model GetSegmentEffortByIDOKBody

func (*GetSegmentEffortByIDOKBody) ContextValidate

func (o *GetSegmentEffortByIDOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get segment effort by ID o k body based on the context it is used

func (*GetSegmentEffortByIDOKBody) MarshalBinary

func (o *GetSegmentEffortByIDOKBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (GetSegmentEffortByIDOKBody) MarshalJSON

func (o GetSegmentEffortByIDOKBody) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object to a JSON structure

func (*GetSegmentEffortByIDOKBody) UnmarshalBinary

func (o *GetSegmentEffortByIDOKBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetSegmentEffortByIDOKBody) UnmarshalJSON

func (o *GetSegmentEffortByIDOKBody) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object from a JSON structure

func (*GetSegmentEffortByIDOKBody) Validate

func (o *GetSegmentEffortByIDOKBody) Validate(formats strfmt.Registry) error

Validate validates this get segment effort by ID o k body

type GetSegmentEffortByIDParams

type GetSegmentEffortByIDParams struct {
	/* ID.

	   The identifier of the segment effort.

	   Format: int64
	*/
	ID int64

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetSegmentEffortByIDParams contains all the parameters to send to the API endpoint

for the get segment effort by Id operation.

Typically these are written to a http.Request.

func NewGetSegmentEffortByIDParams

func NewGetSegmentEffortByIDParams() *GetSegmentEffortByIDParams

NewGetSegmentEffortByIDParams creates a new GetSegmentEffortByIDParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewGetSegmentEffortByIDParamsWithContext

func NewGetSegmentEffortByIDParamsWithContext(ctx context.Context) *GetSegmentEffortByIDParams

NewGetSegmentEffortByIDParamsWithContext creates a new GetSegmentEffortByIDParams object with the ability to set a context for a request.

func NewGetSegmentEffortByIDParamsWithHTTPClient

func NewGetSegmentEffortByIDParamsWithHTTPClient(client *http.Client) *GetSegmentEffortByIDParams

NewGetSegmentEffortByIDParamsWithHTTPClient creates a new GetSegmentEffortByIDParams object with the ability to set a custom HTTPClient for a request.

func NewGetSegmentEffortByIDParamsWithTimeout

func NewGetSegmentEffortByIDParamsWithTimeout(timeout time.Duration) *GetSegmentEffortByIDParams

NewGetSegmentEffortByIDParamsWithTimeout creates a new GetSegmentEffortByIDParams object with the ability to set a timeout on a request.

func (*GetSegmentEffortByIDParams) SetContext

func (o *GetSegmentEffortByIDParams) SetContext(ctx context.Context)

SetContext adds the context to the get segment effort by Id params

func (*GetSegmentEffortByIDParams) SetDefaults

func (o *GetSegmentEffortByIDParams) SetDefaults()

SetDefaults hydrates default values in the get segment effort by Id params (not the query body).

All values with no default are reset to their zero value.

func (*GetSegmentEffortByIDParams) SetHTTPClient

func (o *GetSegmentEffortByIDParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get segment effort by Id params

func (*GetSegmentEffortByIDParams) SetID

func (o *GetSegmentEffortByIDParams) SetID(id int64)

SetID adds the id to the get segment effort by Id params

func (*GetSegmentEffortByIDParams) SetTimeout

func (o *GetSegmentEffortByIDParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get segment effort by Id params

func (*GetSegmentEffortByIDParams) WithContext

WithContext adds the context to the get segment effort by Id params

func (*GetSegmentEffortByIDParams) WithDefaults

WithDefaults hydrates default values in the get segment effort by Id params (not the query body).

All values with no default are reset to their zero value.

func (*GetSegmentEffortByIDParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the get segment effort by Id params

func (*GetSegmentEffortByIDParams) WithID

WithID adds the id to the get segment effort by Id params

func (*GetSegmentEffortByIDParams) WithTimeout

WithTimeout adds the timeout to the get segment effort by Id params

func (*GetSegmentEffortByIDParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type GetSegmentEffortByIDReader

type GetSegmentEffortByIDReader struct {
	// contains filtered or unexported fields
}

GetSegmentEffortByIDReader is a Reader for the GetSegmentEffortByID structure.

func (*GetSegmentEffortByIDReader) ReadResponse

func (o *GetSegmentEffortByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL