sponsorblockgo

package module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: MIT Imports: 10 Imported by: 0

README

sponsorblockgo

Go Reference

Go client library for the SponsorBlock API

Code is generated using OpenAPI definition file from https://github.com/mchangrh/sb-openapi-source:

$ oapi-codegen -generate types,client -package sponsorblockgo openapi.yaml > sponsorblock.go

Library version will reflect version from OpenAPI definition.

Usage

See example directory

Documentation

Overview

Package sponsorblockgo provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.9.1 DO NOT EDIT.

Index

Constants

View Source
const (
	PrivateAdminUserIDScopes = "privateAdminUserID.Scopes"
	PrivateUserIDScopes      = "privateUserID.Scopes"
)

Variables

This section is empty.

Functions

func NewDeleteLockCategoriesRequest

func NewDeleteLockCategoriesRequest(server string, params *DeleteLockCategoriesParams) (*http.Request, error)

NewDeleteLockCategoriesRequest generates requests for DeleteLockCategories

func NewGetDaysSavedFormattedRequest

func NewGetDaysSavedFormattedRequest(server string) (*http.Request, error)

NewGetDaysSavedFormattedRequest generates requests for GetDaysSavedFormatted

func NewGetIsUserVIPRequest

func NewGetIsUserVIPRequest(server string) (*http.Request, error)

NewGetIsUserVIPRequest generates requests for GetIsUserVIP

func NewGetLockCategoriesByHashRequest

func NewGetLockCategoriesByHashRequest(server string, sha256HashPrefix Sha256HashPrefix) (*http.Request, error)

NewGetLockCategoriesByHashRequest generates requests for GetLockCategoriesByHash

func NewGetLockCategoriesRequest

func NewGetLockCategoriesRequest(server string, params *GetLockCategoriesParams) (*http.Request, error)

NewGetLockCategoriesRequest generates requests for GetLockCategories

func NewGetLockReasonRequest

func NewGetLockReasonRequest(server string, params *GetLockReasonParams) (*http.Request, error)

NewGetLockReasonRequest generates requests for GetLockReason

func NewGetSearchSegmentsRequest

func NewGetSearchSegmentsRequest(server string, params *GetSearchSegmentsParams) (*http.Request, error)

NewGetSearchSegmentsRequest generates requests for GetSearchSegments

func NewGetSegmentInfoRequest

func NewGetSegmentInfoRequest(server string, params *GetSegmentInfoParams) (*http.Request, error)

NewGetSegmentInfoRequest generates requests for GetSegmentInfo

func NewGetSkipSegmentsByHashRequest

func NewGetSkipSegmentsByHashRequest(server string, sha256HashPrefix Sha256HashPrefix, params *GetSkipSegmentsByHashParams) (*http.Request, error)

NewGetSkipSegmentsByHashRequest generates requests for GetSkipSegmentsByHash

func NewGetStatusParamRequest

func NewGetStatusParamRequest(server string, value string) (*http.Request, error)

NewGetStatusParamRequest generates requests for GetStatusParam

func NewGetStatusRequest

func NewGetStatusRequest(server string) (*http.Request, error)

NewGetStatusRequest generates requests for GetStatus

func NewGetTimeSavedForUserRequest

func NewGetTimeSavedForUserRequest(server string) (*http.Request, error)

NewGetTimeSavedForUserRequest generates requests for GetTimeSavedForUser

func NewGetTopUsersRequest

func NewGetTopUsersRequest(server string, params *GetTopUsersParams) (*http.Request, error)

NewGetTopUsersRequest generates requests for GetTopUsers

func NewGetTotalStatsRequest

func NewGetTotalStatsRequest(server string, params *GetTotalStatsParams) (*http.Request, error)

NewGetTotalStatsRequest generates requests for GetTotalStats

func NewGetUserIDRequest

func NewGetUserIDRequest(server string, params *GetUserIDParams) (*http.Request, error)

NewGetUserIDRequest generates requests for GetUserID

func NewGetUserInfoRequest

func NewGetUserInfoRequest(server string, params *GetUserInfoParams) (*http.Request, error)

NewGetUserInfoRequest generates requests for GetUserInfo

func NewGetUserStatsRequest

func NewGetUserStatsRequest(server string, params *GetUserStatsParams) (*http.Request, error)

NewGetUserStatsRequest generates requests for GetUserStats

func NewGetUsernameRequest

func NewGetUsernameRequest(server string) (*http.Request, error)

NewGetUsernameRequest generates requests for GetUsername

func NewGetViewsForUserRequest

func NewGetViewsForUserRequest(server string) (*http.Request, error)

NewGetViewsForUserRequest generates requests for GetViewsForUser

func NewGetskipsegmentsRequest

func NewGetskipsegmentsRequest(server string, params *GetskipsegmentsParams) (*http.Request, error)

NewGetskipsegmentsRequest generates requests for Getskipsegments

func NewPostClearCacheRequest

func NewPostClearCacheRequest(server string, params *PostClearCacheParams) (*http.Request, error)

NewPostClearCacheRequest generates requests for PostClearCache

func NewPostLockCategoriesRequest

func NewPostLockCategoriesRequest(server string, params *PostLockCategoriesParams) (*http.Request, error)

NewPostLockCategoriesRequest generates requests for PostLockCategories

func NewPostPurgeAllSegmentsRequest

func NewPostPurgeAllSegmentsRequest(server string, params *PostPurgeAllSegmentsParams) (*http.Request, error)

NewPostPurgeAllSegmentsRequest generates requests for PostPurgeAllSegments

func NewPostShadowBanUserRequest

func NewPostShadowBanUserRequest(server string, params *PostShadowBanUserParams) (*http.Request, error)

NewPostShadowBanUserRequest generates requests for PostShadowBanUser

func NewPostSkipSegmentsRequest

func NewPostSkipSegmentsRequest(server string, params *PostSkipSegmentsParams, body PostSkipSegmentsJSONRequestBody) (*http.Request, error)

NewPostSkipSegmentsRequest calls the generic PostSkipSegments builder with application/json body

func NewPostSkipSegmentsRequestWithBody

func NewPostSkipSegmentsRequestWithBody(server string, params *PostSkipSegmentsParams, contentType string, body io.Reader) (*http.Request, error)

NewPostSkipSegmentsRequestWithBody generates requests for PostSkipSegments with any type of body

func NewPostViewedVideoSponsorTimeRequest

func NewPostViewedVideoSponsorTimeRequest(server string, params *PostViewedVideoSponsorTimeParams) (*http.Request, error)

NewPostViewedVideoSponsorTimeRequest generates requests for PostViewedVideoSponsorTime

func NewPostVoteOnSponsorTimeRequest

func NewPostVoteOnSponsorTimeRequest(server string, params *PostVoteOnSponsorTimeParams) (*http.Request, error)

NewPostVoteOnSponsorTimeRequest generates requests for PostVoteOnSponsorTime

func NewPostWarnUserRequest

func NewPostWarnUserRequest(server string, body PostWarnUserJSONRequestBody) (*http.Request, error)

NewPostWarnUserRequest calls the generic PostWarnUser builder with application/json body

func NewPostWarnUserRequestWithBody

func NewPostWarnUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostWarnUserRequestWithBody generates requests for PostWarnUser with any type of body

func NewPostadduserasvipRequest

func NewPostadduserasvipRequest(server string, params *PostadduserasvipParams) (*http.Request, error)

NewPostadduserasvipRequest generates requests for Postadduserasvip

func NewSetUsernameRequest

func NewSetUsernameRequest(server string, params *SetUsernameParams) (*http.Request, error)

NewSetUsernameRequest generates requests for SetUsername

Types

type ActionType added in v1.0.5

type ActionType string

possible action types

const (
	ActionTypeMute ActionType = "mute"

	ActionTypeSkip ActionType = "skip"
)

Defines values for ActionType.

type Category added in v1.0.5

type Category string

Segment Category

const (
	CategoryInteraction Category = "interaction"

	CategoryIntro Category = "intro"

	CategoryMusicOfftopic Category = "music_offtopic"

	CategoryOutro Category = "outro"

	CategoryPoiHighlight Category = "poi_highlight"

	CategoryPreview Category = "preview"

	CategorySelfpromo Category = "selfpromo"

	CategorySponsor Category = "sponsor"
)

Defines values for Category.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) DeleteLockCategories

func (c *Client) DeleteLockCategories(ctx context.Context, params *DeleteLockCategoriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetDaysSavedFormatted

func (c *Client) GetDaysSavedFormatted(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetIsUserVIP

func (c *Client) GetIsUserVIP(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetLockCategories

func (c *Client) GetLockCategories(ctx context.Context, params *GetLockCategoriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetLockCategoriesByHash

func (c *Client) GetLockCategoriesByHash(ctx context.Context, sha256HashPrefix Sha256HashPrefix, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetLockReason

func (c *Client) GetLockReason(ctx context.Context, params *GetLockReasonParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetSearchSegments

func (c *Client) GetSearchSegments(ctx context.Context, params *GetSearchSegmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetSegmentInfo

func (c *Client) GetSegmentInfo(ctx context.Context, params *GetSegmentInfoParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetSkipSegmentsByHash

func (c *Client) GetSkipSegmentsByHash(ctx context.Context, sha256HashPrefix Sha256HashPrefix, params *GetSkipSegmentsByHashParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetStatus

func (c *Client) GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetStatusParam

func (c *Client) GetStatusParam(ctx context.Context, value string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTimeSavedForUser

func (c *Client) GetTimeSavedForUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTopUsers

func (c *Client) GetTopUsers(ctx context.Context, params *GetTopUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTotalStats

func (c *Client) GetTotalStats(ctx context.Context, params *GetTotalStatsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetUserID

func (c *Client) GetUserID(ctx context.Context, params *GetUserIDParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetUserInfo

func (c *Client) GetUserInfo(ctx context.Context, params *GetUserInfoParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetUserStats

func (c *Client) GetUserStats(ctx context.Context, params *GetUserStatsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetUsername

func (c *Client) GetUsername(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetViewsForUser

func (c *Client) GetViewsForUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Getskipsegments

func (c *Client) Getskipsegments(ctx context.Context, params *GetskipsegmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostClearCache

func (c *Client) PostClearCache(ctx context.Context, params *PostClearCacheParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostLockCategories

func (c *Client) PostLockCategories(ctx context.Context, params *PostLockCategoriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostPurgeAllSegments

func (c *Client) PostPurgeAllSegments(ctx context.Context, params *PostPurgeAllSegmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostShadowBanUser

func (c *Client) PostShadowBanUser(ctx context.Context, params *PostShadowBanUserParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostSkipSegments

func (c *Client) PostSkipSegments(ctx context.Context, params *PostSkipSegmentsParams, body PostSkipSegmentsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostSkipSegmentsWithBody

func (c *Client) PostSkipSegmentsWithBody(ctx context.Context, params *PostSkipSegmentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostViewedVideoSponsorTime

func (c *Client) PostViewedVideoSponsorTime(ctx context.Context, params *PostViewedVideoSponsorTimeParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostVoteOnSponsorTime

func (c *Client) PostVoteOnSponsorTime(ctx context.Context, params *PostVoteOnSponsorTimeParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostWarnUser

func (c *Client) PostWarnUser(ctx context.Context, body PostWarnUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostWarnUserWithBody

func (c *Client) PostWarnUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Postadduserasvip

func (c *Client) Postadduserasvip(ctx context.Context, params *PostadduserasvipParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetUsername

func (c *Client) SetUsername(ctx context.Context, params *SetUsernameParams, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// Postadduserasvip request
	Postadduserasvip(ctx context.Context, params *PostadduserasvipParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostClearCache request
	PostClearCache(ctx context.Context, params *PostClearCacheParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetDaysSavedFormatted request
	GetDaysSavedFormatted(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTimeSavedForUser request
	GetTimeSavedForUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTopUsers request
	GetTopUsers(ctx context.Context, params *GetTopUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTotalStats request
	GetTotalStats(ctx context.Context, params *GetTotalStatsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetUsername request
	GetUsername(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetViewsForUser request
	GetViewsForUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetIsUserVIP request
	GetIsUserVIP(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteLockCategories request
	DeleteLockCategories(ctx context.Context, params *DeleteLockCategoriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetLockCategories request
	GetLockCategories(ctx context.Context, params *GetLockCategoriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostLockCategories request
	PostLockCategories(ctx context.Context, params *PostLockCategoriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetLockCategoriesByHash request
	GetLockCategoriesByHash(ctx context.Context, sha256HashPrefix Sha256HashPrefix, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetLockReason request
	GetLockReason(ctx context.Context, params *GetLockReasonParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostPurgeAllSegments request
	PostPurgeAllSegments(ctx context.Context, params *PostPurgeAllSegmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSearchSegments request
	GetSearchSegments(ctx context.Context, params *GetSearchSegmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSegmentInfo request
	GetSegmentInfo(ctx context.Context, params *GetSegmentInfoParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetUsername request
	SetUsername(ctx context.Context, params *SetUsernameParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostShadowBanUser request
	PostShadowBanUser(ctx context.Context, params *PostShadowBanUserParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Getskipsegments request
	Getskipsegments(ctx context.Context, params *GetskipsegmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostSkipSegments request with any body
	PostSkipSegmentsWithBody(ctx context.Context, params *PostSkipSegmentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostSkipSegments(ctx context.Context, params *PostSkipSegmentsParams, body PostSkipSegmentsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSkipSegmentsByHash request
	GetSkipSegmentsByHash(ctx context.Context, sha256HashPrefix Sha256HashPrefix, params *GetSkipSegmentsByHashParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetStatus request
	GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetStatusParam request
	GetStatusParam(ctx context.Context, value string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetUserID request
	GetUserID(ctx context.Context, params *GetUserIDParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetUserInfo request
	GetUserInfo(ctx context.Context, params *GetUserInfoParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetUserStats request
	GetUserStats(ctx context.Context, params *GetUserStatsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostViewedVideoSponsorTime request
	PostViewedVideoSponsorTime(ctx context.Context, params *PostViewedVideoSponsorTimeParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostVoteOnSponsorTime request
	PostVoteOnSponsorTime(ctx context.Context, params *PostVoteOnSponsorTimeParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostWarnUser request with any body
	PostWarnUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostWarnUser(ctx context.Context, body PostWarnUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) DeleteLockCategoriesWithResponse

func (c *ClientWithResponses) DeleteLockCategoriesWithResponse(ctx context.Context, params *DeleteLockCategoriesParams, reqEditors ...RequestEditorFn) (*DeleteLockCategoriesResponse, error)

DeleteLockCategoriesWithResponse request returning *DeleteLockCategoriesResponse

func (*ClientWithResponses) GetDaysSavedFormattedWithResponse

func (c *ClientWithResponses) GetDaysSavedFormattedWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDaysSavedFormattedResponse, error)

GetDaysSavedFormattedWithResponse request returning *GetDaysSavedFormattedResponse

func (*ClientWithResponses) GetIsUserVIPWithResponse

func (c *ClientWithResponses) GetIsUserVIPWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetIsUserVIPResponse, error)

GetIsUserVIPWithResponse request returning *GetIsUserVIPResponse

func (*ClientWithResponses) GetLockCategoriesByHashWithResponse

func (c *ClientWithResponses) GetLockCategoriesByHashWithResponse(ctx context.Context, sha256HashPrefix Sha256HashPrefix, reqEditors ...RequestEditorFn) (*GetLockCategoriesByHashResponse, error)

GetLockCategoriesByHashWithResponse request returning *GetLockCategoriesByHashResponse

func (*ClientWithResponses) GetLockCategoriesWithResponse

func (c *ClientWithResponses) GetLockCategoriesWithResponse(ctx context.Context, params *GetLockCategoriesParams, reqEditors ...RequestEditorFn) (*GetLockCategoriesResponse, error)

GetLockCategoriesWithResponse request returning *GetLockCategoriesResponse

func (*ClientWithResponses) GetLockReasonWithResponse

func (c *ClientWithResponses) GetLockReasonWithResponse(ctx context.Context, params *GetLockReasonParams, reqEditors ...RequestEditorFn) (*GetLockReasonResponse, error)

GetLockReasonWithResponse request returning *GetLockReasonResponse

func (*ClientWithResponses) GetSearchSegmentsWithResponse

func (c *ClientWithResponses) GetSearchSegmentsWithResponse(ctx context.Context, params *GetSearchSegmentsParams, reqEditors ...RequestEditorFn) (*GetSearchSegmentsResponse, error)

GetSearchSegmentsWithResponse request returning *GetSearchSegmentsResponse

func (*ClientWithResponses) GetSegmentInfoWithResponse

func (c *ClientWithResponses) GetSegmentInfoWithResponse(ctx context.Context, params *GetSegmentInfoParams, reqEditors ...RequestEditorFn) (*GetSegmentInfoResponse, error)

GetSegmentInfoWithResponse request returning *GetSegmentInfoResponse

func (*ClientWithResponses) GetSkipSegmentsByHashWithResponse

func (c *ClientWithResponses) GetSkipSegmentsByHashWithResponse(ctx context.Context, sha256HashPrefix Sha256HashPrefix, params *GetSkipSegmentsByHashParams, reqEditors ...RequestEditorFn) (*GetSkipSegmentsByHashResponse, error)

GetSkipSegmentsByHashWithResponse request returning *GetSkipSegmentsByHashResponse

func (*ClientWithResponses) GetStatusParamWithResponse

func (c *ClientWithResponses) GetStatusParamWithResponse(ctx context.Context, value string, reqEditors ...RequestEditorFn) (*GetStatusParamResponse, error)

GetStatusParamWithResponse request returning *GetStatusParamResponse

func (*ClientWithResponses) GetStatusWithResponse

func (c *ClientWithResponses) GetStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)

GetStatusWithResponse request returning *GetStatusResponse

func (*ClientWithResponses) GetTimeSavedForUserWithResponse

func (c *ClientWithResponses) GetTimeSavedForUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTimeSavedForUserResponse, error)

GetTimeSavedForUserWithResponse request returning *GetTimeSavedForUserResponse

func (*ClientWithResponses) GetTopUsersWithResponse

func (c *ClientWithResponses) GetTopUsersWithResponse(ctx context.Context, params *GetTopUsersParams, reqEditors ...RequestEditorFn) (*GetTopUsersResponse, error)

GetTopUsersWithResponse request returning *GetTopUsersResponse

func (*ClientWithResponses) GetTotalStatsWithResponse

func (c *ClientWithResponses) GetTotalStatsWithResponse(ctx context.Context, params *GetTotalStatsParams, reqEditors ...RequestEditorFn) (*GetTotalStatsResponse, error)

GetTotalStatsWithResponse request returning *GetTotalStatsResponse

func (*ClientWithResponses) GetUserIDWithResponse

func (c *ClientWithResponses) GetUserIDWithResponse(ctx context.Context, params *GetUserIDParams, reqEditors ...RequestEditorFn) (*GetUserIDResponse, error)

GetUserIDWithResponse request returning *GetUserIDResponse

func (*ClientWithResponses) GetUserInfoWithResponse

func (c *ClientWithResponses) GetUserInfoWithResponse(ctx context.Context, params *GetUserInfoParams, reqEditors ...RequestEditorFn) (*GetUserInfoResponse, error)

GetUserInfoWithResponse request returning *GetUserInfoResponse

func (*ClientWithResponses) GetUserStatsWithResponse

func (c *ClientWithResponses) GetUserStatsWithResponse(ctx context.Context, params *GetUserStatsParams, reqEditors ...RequestEditorFn) (*GetUserStatsResponse, error)

GetUserStatsWithResponse request returning *GetUserStatsResponse

func (*ClientWithResponses) GetUsernameWithResponse

func (c *ClientWithResponses) GetUsernameWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUsernameResponse, error)

GetUsernameWithResponse request returning *GetUsernameResponse

func (*ClientWithResponses) GetViewsForUserWithResponse

func (c *ClientWithResponses) GetViewsForUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetViewsForUserResponse, error)

GetViewsForUserWithResponse request returning *GetViewsForUserResponse

func (*ClientWithResponses) GetskipsegmentsWithResponse

func (c *ClientWithResponses) GetskipsegmentsWithResponse(ctx context.Context, params *GetskipsegmentsParams, reqEditors ...RequestEditorFn) (*GetskipsegmentsResponse, error)

GetskipsegmentsWithResponse request returning *GetskipsegmentsResponse

func (*ClientWithResponses) PostClearCacheWithResponse

func (c *ClientWithResponses) PostClearCacheWithResponse(ctx context.Context, params *PostClearCacheParams, reqEditors ...RequestEditorFn) (*PostClearCacheResponse, error)

PostClearCacheWithResponse request returning *PostClearCacheResponse

func (*ClientWithResponses) PostLockCategoriesWithResponse

func (c *ClientWithResponses) PostLockCategoriesWithResponse(ctx context.Context, params *PostLockCategoriesParams, reqEditors ...RequestEditorFn) (*PostLockCategoriesResponse, error)

PostLockCategoriesWithResponse request returning *PostLockCategoriesResponse

func (*ClientWithResponses) PostPurgeAllSegmentsWithResponse

func (c *ClientWithResponses) PostPurgeAllSegmentsWithResponse(ctx context.Context, params *PostPurgeAllSegmentsParams, reqEditors ...RequestEditorFn) (*PostPurgeAllSegmentsResponse, error)

PostPurgeAllSegmentsWithResponse request returning *PostPurgeAllSegmentsResponse

func (*ClientWithResponses) PostShadowBanUserWithResponse

func (c *ClientWithResponses) PostShadowBanUserWithResponse(ctx context.Context, params *PostShadowBanUserParams, reqEditors ...RequestEditorFn) (*PostShadowBanUserResponse, error)

PostShadowBanUserWithResponse request returning *PostShadowBanUserResponse

func (*ClientWithResponses) PostSkipSegmentsWithBodyWithResponse

func (c *ClientWithResponses) PostSkipSegmentsWithBodyWithResponse(ctx context.Context, params *PostSkipSegmentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostSkipSegmentsResponse, error)

PostSkipSegmentsWithBodyWithResponse request with arbitrary body returning *PostSkipSegmentsResponse

func (*ClientWithResponses) PostSkipSegmentsWithResponse

func (c *ClientWithResponses) PostSkipSegmentsWithResponse(ctx context.Context, params *PostSkipSegmentsParams, body PostSkipSegmentsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostSkipSegmentsResponse, error)

func (*ClientWithResponses) PostViewedVideoSponsorTimeWithResponse

func (c *ClientWithResponses) PostViewedVideoSponsorTimeWithResponse(ctx context.Context, params *PostViewedVideoSponsorTimeParams, reqEditors ...RequestEditorFn) (*PostViewedVideoSponsorTimeResponse, error)

PostViewedVideoSponsorTimeWithResponse request returning *PostViewedVideoSponsorTimeResponse

func (*ClientWithResponses) PostVoteOnSponsorTimeWithResponse

func (c *ClientWithResponses) PostVoteOnSponsorTimeWithResponse(ctx context.Context, params *PostVoteOnSponsorTimeParams, reqEditors ...RequestEditorFn) (*PostVoteOnSponsorTimeResponse, error)

PostVoteOnSponsorTimeWithResponse request returning *PostVoteOnSponsorTimeResponse

func (*ClientWithResponses) PostWarnUserWithBodyWithResponse

func (c *ClientWithResponses) PostWarnUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostWarnUserResponse, error)

PostWarnUserWithBodyWithResponse request with arbitrary body returning *PostWarnUserResponse

func (*ClientWithResponses) PostWarnUserWithResponse

func (c *ClientWithResponses) PostWarnUserWithResponse(ctx context.Context, body PostWarnUserJSONRequestBody, reqEditors ...RequestEditorFn) (*PostWarnUserResponse, error)

func (*ClientWithResponses) PostadduserasvipWithResponse

func (c *ClientWithResponses) PostadduserasvipWithResponse(ctx context.Context, params *PostadduserasvipParams, reqEditors ...RequestEditorFn) (*PostadduserasvipResponse, error)

PostadduserasvipWithResponse request returning *PostadduserasvipResponse

func (*ClientWithResponses) SetUsernameWithResponse

func (c *ClientWithResponses) SetUsernameWithResponse(ctx context.Context, params *SetUsernameParams, reqEditors ...RequestEditorFn) (*SetUsernameResponse, error)

SetUsernameWithResponse request returning *SetUsernameResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// Postadduserasvip request
	PostadduserasvipWithResponse(ctx context.Context, params *PostadduserasvipParams, reqEditors ...RequestEditorFn) (*PostadduserasvipResponse, error)

	// PostClearCache request
	PostClearCacheWithResponse(ctx context.Context, params *PostClearCacheParams, reqEditors ...RequestEditorFn) (*PostClearCacheResponse, error)

	// GetDaysSavedFormatted request
	GetDaysSavedFormattedWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDaysSavedFormattedResponse, error)

	// GetTimeSavedForUser request
	GetTimeSavedForUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTimeSavedForUserResponse, error)

	// GetTopUsers request
	GetTopUsersWithResponse(ctx context.Context, params *GetTopUsersParams, reqEditors ...RequestEditorFn) (*GetTopUsersResponse, error)

	// GetTotalStats request
	GetTotalStatsWithResponse(ctx context.Context, params *GetTotalStatsParams, reqEditors ...RequestEditorFn) (*GetTotalStatsResponse, error)

	// GetUsername request
	GetUsernameWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUsernameResponse, error)

	// GetViewsForUser request
	GetViewsForUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetViewsForUserResponse, error)

	// GetIsUserVIP request
	GetIsUserVIPWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetIsUserVIPResponse, error)

	// DeleteLockCategories request
	DeleteLockCategoriesWithResponse(ctx context.Context, params *DeleteLockCategoriesParams, reqEditors ...RequestEditorFn) (*DeleteLockCategoriesResponse, error)

	// GetLockCategories request
	GetLockCategoriesWithResponse(ctx context.Context, params *GetLockCategoriesParams, reqEditors ...RequestEditorFn) (*GetLockCategoriesResponse, error)

	// PostLockCategories request
	PostLockCategoriesWithResponse(ctx context.Context, params *PostLockCategoriesParams, reqEditors ...RequestEditorFn) (*PostLockCategoriesResponse, error)

	// GetLockCategoriesByHash request
	GetLockCategoriesByHashWithResponse(ctx context.Context, sha256HashPrefix Sha256HashPrefix, reqEditors ...RequestEditorFn) (*GetLockCategoriesByHashResponse, error)

	// GetLockReason request
	GetLockReasonWithResponse(ctx context.Context, params *GetLockReasonParams, reqEditors ...RequestEditorFn) (*GetLockReasonResponse, error)

	// PostPurgeAllSegments request
	PostPurgeAllSegmentsWithResponse(ctx context.Context, params *PostPurgeAllSegmentsParams, reqEditors ...RequestEditorFn) (*PostPurgeAllSegmentsResponse, error)

	// GetSearchSegments request
	GetSearchSegmentsWithResponse(ctx context.Context, params *GetSearchSegmentsParams, reqEditors ...RequestEditorFn) (*GetSearchSegmentsResponse, error)

	// GetSegmentInfo request
	GetSegmentInfoWithResponse(ctx context.Context, params *GetSegmentInfoParams, reqEditors ...RequestEditorFn) (*GetSegmentInfoResponse, error)

	// SetUsername request
	SetUsernameWithResponse(ctx context.Context, params *SetUsernameParams, reqEditors ...RequestEditorFn) (*SetUsernameResponse, error)

	// PostShadowBanUser request
	PostShadowBanUserWithResponse(ctx context.Context, params *PostShadowBanUserParams, reqEditors ...RequestEditorFn) (*PostShadowBanUserResponse, error)

	// Getskipsegments request
	GetskipsegmentsWithResponse(ctx context.Context, params *GetskipsegmentsParams, reqEditors ...RequestEditorFn) (*GetskipsegmentsResponse, error)

	// PostSkipSegments request with any body
	PostSkipSegmentsWithBodyWithResponse(ctx context.Context, params *PostSkipSegmentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostSkipSegmentsResponse, error)

	PostSkipSegmentsWithResponse(ctx context.Context, params *PostSkipSegmentsParams, body PostSkipSegmentsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostSkipSegmentsResponse, error)

	// GetSkipSegmentsByHash request
	GetSkipSegmentsByHashWithResponse(ctx context.Context, sha256HashPrefix Sha256HashPrefix, params *GetSkipSegmentsByHashParams, reqEditors ...RequestEditorFn) (*GetSkipSegmentsByHashResponse, error)

	// GetStatus request
	GetStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)

	// GetStatusParam request
	GetStatusParamWithResponse(ctx context.Context, value string, reqEditors ...RequestEditorFn) (*GetStatusParamResponse, error)

	// GetUserID request
	GetUserIDWithResponse(ctx context.Context, params *GetUserIDParams, reqEditors ...RequestEditorFn) (*GetUserIDResponse, error)

	// GetUserInfo request
	GetUserInfoWithResponse(ctx context.Context, params *GetUserInfoParams, reqEditors ...RequestEditorFn) (*GetUserInfoResponse, error)

	// GetUserStats request
	GetUserStatsWithResponse(ctx context.Context, params *GetUserStatsParams, reqEditors ...RequestEditorFn) (*GetUserStatsResponse, error)

	// PostViewedVideoSponsorTime request
	PostViewedVideoSponsorTimeWithResponse(ctx context.Context, params *PostViewedVideoSponsorTimeParams, reqEditors ...RequestEditorFn) (*PostViewedVideoSponsorTimeResponse, error)

	// PostVoteOnSponsorTime request
	PostVoteOnSponsorTimeWithResponse(ctx context.Context, params *PostVoteOnSponsorTimeParams, reqEditors ...RequestEditorFn) (*PostVoteOnSponsorTimeResponse, error)

	// PostWarnUser request with any body
	PostWarnUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostWarnUserResponse, error)

	PostWarnUserWithResponse(ctx context.Context, body PostWarnUserJSONRequestBody, reqEditors ...RequestEditorFn) (*PostWarnUserResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type DbSegment added in v1.0.5

type DbSegment struct {
	UUID *SegmentUUID `json:"UUID,omitempty"`

	// possible action types
	ActionType *ActionType `json:"actionType,omitempty"`

	// Segment Category
	Category *Category `json:"category,omitempty"`

	// end time of segment
	EndTime *float32 `json:"endTime,omitempty"`

	// Full hash of videoID
	HashedVideoID *VideoIDHash `json:"hashedVideoID,omitempty"`

	// If segment is hidden
	Hidden *DbSegmentHidden `json:"hidden,omitempty"`

	// Number of incorrect votes
	IncorrectVotes *int `json:"incorrectVotes,omitempty"`

	// If segment is locked
	Locked *DbSegmentLocked `json:"locked,omitempty"`

	// Reputation of submitter at time of submission
	Reputation *float32 `json:"reputation,omitempty"`

	// Supported services
	Service *Services `json:"service,omitempty"`

	// If submitter is shadowbanned
	ShadowHidden *DbSegmentShadowHidden `json:"shadowHidden,omitempty"`

	// start time of segment
	StartTime *float32 `json:"startTime,omitempty"`

	// Time of submission (epoch ms)
	TimeSubmitted *int `json:"timeSubmitted,omitempty"`

	// userAgent of submitter
	UserAgent *string `json:"userAgent,omitempty"`

	// Public userID (private userID hashed 5000 times)
	UserID *PublicUserID `json:"userID,omitempty"`

	// Duration of video at time of submission.
	VideoDuration *VideoDuration `json:"videoDuration,omitempty"`

	// ID of video
	VideoID *VideoID `json:"videoID,omitempty"`

	// Number of reported views on segment
	Views *int `json:"views,omitempty"`

	// votes on segment
	Votes *int `json:"votes,omitempty"`
}

Segment as-is in DB

type DbSegmentHidden added in v1.0.5

type DbSegmentHidden int

If segment is hidden

const (
	DbSegmentHiddenN0 DbSegmentHidden = 0

	DbSegmentHiddenN1 DbSegmentHidden = 1
)

Defines values for DbSegmentHidden.

type DbSegmentLocked added in v1.0.5

type DbSegmentLocked int

If segment is locked

const (
	DbSegmentLockedN0 DbSegmentLocked = 0

	DbSegmentLockedN1 DbSegmentLocked = 1
)

Defines values for DbSegmentLocked.

type DbSegmentShadowHidden added in v1.0.5

type DbSegmentShadowHidden int

If submitter is shadowbanned

const (
	DbSegmentShadowHiddenN0 DbSegmentShadowHidden = 0

	DbSegmentShadowHiddenN1 DbSegmentShadowHidden = 1
)

Defines values for DbSegmentShadowHidden.

type DeleteLockCategoriesParams added in v1.0.5

type DeleteLockCategoriesParams struct {
	// ID of video
	VideoID RequiredVideoID `json:"videoID"`

	// Array of categories - See https://wiki.sponsor.ajay.app/w/Types#Category
	Category Category `json:"category"`
}

DeleteLockCategoriesParams defines parameters for DeleteLockCategories.

type DeleteLockCategoriesParamsCategory added in v1.0.5

type DeleteLockCategoriesParamsCategory string

DeleteLockCategoriesParamsCategory defines parameters for DeleteLockCategories.

type DeleteLockCategoriesResponse

type DeleteLockCategoriesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *struct {
		Message *string `json:"message,omitempty"`
	}
	JSON403 *struct {
		Message *string `json:"message,omitempty"`
	}
}

func ParseDeleteLockCategoriesResponse

func ParseDeleteLockCategoriesResponse(rsp *http.Response) (*DeleteLockCategoriesResponse, error)

ParseDeleteLockCategoriesResponse parses an HTTP response from a DeleteLockCategoriesWithResponse call

func (DeleteLockCategoriesResponse) Status

Status returns HTTPResponse.Status

func (DeleteLockCategoriesResponse) StatusCode

func (r DeleteLockCategoriesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetDaysSavedFormattedResponse

type GetDaysSavedFormattedResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Days saved (2 decimal places)
		DaysSaved *float32 `json:"daysSaved,omitempty"`
	}
}

func ParseGetDaysSavedFormattedResponse

func ParseGetDaysSavedFormattedResponse(rsp *http.Response) (*GetDaysSavedFormattedResponse, error)

ParseGetDaysSavedFormattedResponse parses an HTTP response from a GetDaysSavedFormattedWithResponse call

func (GetDaysSavedFormattedResponse) Status

Status returns HTTPResponse.Status

func (GetDaysSavedFormattedResponse) StatusCode

func (r GetDaysSavedFormattedResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetIsUserVIPResponse

type GetIsUserVIPResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Public userID (private userID hashed 5000 times)
		HashedUserID *PublicUserID `json:"hashedUserID,omitempty"`

		// if user is VIP
		Vip *bool `json:"vip,omitempty"`
	}
}

func ParseGetIsUserVIPResponse

func ParseGetIsUserVIPResponse(rsp *http.Response) (*GetIsUserVIPResponse, error)

ParseGetIsUserVIPResponse parses an HTTP response from a GetIsUserVIPWithResponse call

func (GetIsUserVIPResponse) Status

func (r GetIsUserVIPResponse) Status() string

Status returns HTTPResponse.Status

func (GetIsUserVIPResponse) StatusCode

func (r GetIsUserVIPResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetLockCategoriesByHashResponse

type GetLockCategoriesByHashResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]struct {
		Categories []Category `json:"categories"`

		// Full hash of videoID
		Hash VideoIDHash `json:"hash"`

		// VIP specified lock reason
		Reason LockReason `json:"reason"`

		// ID of video
		VideoID VideoID `json:"videoID"`
	}
	JSON400 *InvalidParameter
}

func ParseGetLockCategoriesByHashResponse

func ParseGetLockCategoriesByHashResponse(rsp *http.Response) (*GetLockCategoriesByHashResponse, error)

ParseGetLockCategoriesByHashResponse parses an HTTP response from a GetLockCategoriesByHashWithResponse call

func (GetLockCategoriesByHashResponse) Status

Status returns HTTPResponse.Status

func (GetLockCategoriesByHashResponse) StatusCode

func (r GetLockCategoriesByHashResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetLockCategoriesParams added in v1.0.5

type GetLockCategoriesParams struct {
	// ID of video
	VideoID RequiredVideoID `json:"videoID"`
}

GetLockCategoriesParams defines parameters for GetLockCategories.

type GetLockCategoriesResponse

type GetLockCategoriesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *VideoLock
}

func ParseGetLockCategoriesResponse

func ParseGetLockCategoriesResponse(rsp *http.Response) (*GetLockCategoriesResponse, error)

ParseGetLockCategoriesResponse parses an HTTP response from a GetLockCategoriesWithResponse call

func (GetLockCategoriesResponse) Status

func (r GetLockCategoriesResponse) Status() string

Status returns HTTPResponse.Status

func (GetLockCategoriesResponse) StatusCode

func (r GetLockCategoriesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetLockReasonParams added in v1.0.5

type GetLockReasonParams struct {
	// ID of video
	VideoID RequiredVideoID `json:"videoID"`

	// categories to get reasons for
	Category *GetLockReasonParamsCategory `json:"category,omitempty"`
}

GetLockReasonParams defines parameters for GetLockReason.

type GetLockReasonParamsCategory added in v1.0.5

type GetLockReasonParamsCategory []interface{}

GetLockReasonParamsCategory defines parameters for GetLockReason.

type GetLockReasonResponse

type GetLockReasonResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]LockReason
}

func ParseGetLockReasonResponse

func ParseGetLockReasonResponse(rsp *http.Response) (*GetLockReasonResponse, error)

ParseGetLockReasonResponse parses an HTTP response from a GetLockReasonWithResponse call

func (GetLockReasonResponse) Status

func (r GetLockReasonResponse) Status() string

Status returns HTTPResponse.Status

func (GetLockReasonResponse) StatusCode

func (r GetLockReasonResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSearchSegmentsParams added in v1.0.5

type GetSearchSegmentsParams struct {
	// ID of video
	VideoID RequiredVideoID `json:"videoID"`

	// Array of categories - See https://wiki.sponsor.ajay.app/w/Types#Category
	Category Category `json:"category"`

	// multiple action types - Options are skip, mute
	ActionType ActionType `json:"actionType"`

	// Service to target - See https://wiki.sponsor.ajay.app/w/Types#Service
	Service GetSearchSegmentsParamsService `json:"service"`

	// Page to start from (0 indexed)
	Page *int `json:"page,omitempty"`

	// Lower vote threshold
	MinVotes *int `json:"minVotes,omitempty"`

	// Upper vote threshold
	MaxVotes *int `json:"maxVotes,omitempty"`

	// Lower view threshold
	MinViews *int `json:"minViews,omitempty"`

	// Upper view threshold
	MaxViews *int `json:"maxViews,omitempty"`

	// Show locked segments
	Locked *bool `json:"locked,omitempty"`

	// Show hidden segments
	Hidden *bool `json:"hidden,omitempty"`

	// Show ignored segments
	Ignored *bool `json:"ignored,omitempty"`
}

GetSearchSegmentsParams defines parameters for GetSearchSegments.

type GetSearchSegmentsParamsActionType added in v1.0.5

type GetSearchSegmentsParamsActionType string

GetSearchSegmentsParamsActionType defines parameters for GetSearchSegments.

type GetSearchSegmentsParamsCategory added in v1.0.5

type GetSearchSegmentsParamsCategory string

GetSearchSegmentsParamsCategory defines parameters for GetSearchSegments.

type GetSearchSegmentsParamsService added in v1.0.5

type GetSearchSegmentsParamsService string

GetSearchSegmentsParamsService defines parameters for GetSearchSegments.

type GetSearchSegmentsResponse

type GetSearchSegmentsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Page Number
		Page *int `json:"page,omitempty"`

		// Total segments matching query
		SegmentCount *int             `json:"segmentCount,omitempty"`
		Segments     *[]SearchSegment `json:"segments,omitempty"`
	}
	JSON400 *struct {
		// Parameter does not match format requirements (Bad JSON or not an arrya)
		Reason *InvalidParameter `json:"reason,omitempty"`
	}
}

func ParseGetSearchSegmentsResponse

func ParseGetSearchSegmentsResponse(rsp *http.Response) (*GetSearchSegmentsResponse, error)

ParseGetSearchSegmentsResponse parses an HTTP response from a GetSearchSegmentsWithResponse call

func (GetSearchSegmentsResponse) Status

func (r GetSearchSegmentsResponse) Status() string

Status returns HTTPResponse.Status

func (GetSearchSegmentsResponse) StatusCode

func (r GetSearchSegmentsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSegmentInfoParams added in v1.0.5

type GetSegmentInfoParams struct {
	// Target segment UUID
	UUID *string `json:"UUID,omitempty"`

	// Array of UUID
	UUIDs *[]string `json:"UUIDs,omitempty"`
}

GetSegmentInfoParams defines parameters for GetSegmentInfo.

type GetSegmentInfoResponse

type GetSegmentInfoResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]DbSegment
	JSON400      *struct {
		// reason for failiure
		Message *string `json:"message,omitempty"`
	}
}

func ParseGetSegmentInfoResponse

func ParseGetSegmentInfoResponse(rsp *http.Response) (*GetSegmentInfoResponse, error)

ParseGetSegmentInfoResponse parses an HTTP response from a GetSegmentInfoWithResponse call

func (GetSegmentInfoResponse) Status

func (r GetSegmentInfoResponse) Status() string

Status returns HTTPResponse.Status

func (GetSegmentInfoResponse) StatusCode

func (r GetSegmentInfoResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSkipSegmentsByHashParams added in v1.0.5

type GetSkipSegmentsByHashParams struct {
	// Array of categories - See https://wiki.sponsor.ajay.app/w/Types#Category
	Category Category `json:"category"`

	// Segment UUIDs to get regardless of votes
	RequiredSegment *RequiredSegment `json:"requiredSegment,omitempty"`

	// multiple action types - Options are skip, mute
	ActionType ActionType `json:"actionType"`

	// Service to target - See https://wiki.sponsor.ajay.app/w/Types#Service
	Service GetSkipSegmentsByHashParamsService `json:"service"`
}

GetSkipSegmentsByHashParams defines parameters for GetSkipSegmentsByHash.

type GetSkipSegmentsByHashParamsActionType added in v1.0.5

type GetSkipSegmentsByHashParamsActionType string

GetSkipSegmentsByHashParamsActionType defines parameters for GetSkipSegmentsByHash.

type GetSkipSegmentsByHashParamsCategory added in v1.0.5

type GetSkipSegmentsByHashParamsCategory string

GetSkipSegmentsByHashParamsCategory defines parameters for GetSkipSegmentsByHash.

type GetSkipSegmentsByHashParamsService added in v1.0.5

type GetSkipSegmentsByHashParamsService string

GetSkipSegmentsByHashParamsService defines parameters for GetSkipSegmentsByHash.

type GetSkipSegmentsByHashResponse

type GetSkipSegmentsByHashResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]HashSkipSegment
	JSON400      *InvalidParameter
}

func ParseGetSkipSegmentsByHashResponse

func ParseGetSkipSegmentsByHashResponse(rsp *http.Response) (*GetSkipSegmentsByHashResponse, error)

ParseGetSkipSegmentsByHashResponse parses an HTTP response from a GetSkipSegmentsByHashWithResponse call

func (GetSkipSegmentsByHashResponse) Status

Status returns HTTPResponse.Status

func (GetSkipSegmentsByHashResponse) StatusCode

func (r GetSkipSegmentsByHashResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetStatusParamResponse

type GetStatusParamResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *StatusResponse
}

func ParseGetStatusParamResponse

func ParseGetStatusParamResponse(rsp *http.Response) (*GetStatusParamResponse, error)

ParseGetStatusParamResponse parses an HTTP response from a GetStatusParamWithResponse call

func (GetStatusParamResponse) Status

func (r GetStatusParamResponse) Status() string

Status returns HTTPResponse.Status

func (GetStatusParamResponse) StatusCode

func (r GetStatusParamResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetStatusResponse

type GetStatusResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *StatusResponse
}

func ParseGetStatusResponse

func ParseGetStatusResponse(rsp *http.Response) (*GetStatusResponse, error)

ParseGetStatusResponse parses an HTTP response from a GetStatusWithResponse call

func (GetStatusResponse) Status

func (r GetStatusResponse) Status() string

Status returns HTTPResponse.Status

func (GetStatusResponse) StatusCode

func (r GetStatusResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTimeSavedForUserResponse

type GetTimeSavedForUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// time saved in minutes
		TimeSaved *float32 `json:"timeSaved,omitempty"`
	}
}

func ParseGetTimeSavedForUserResponse

func ParseGetTimeSavedForUserResponse(rsp *http.Response) (*GetTimeSavedForUserResponse, error)

ParseGetTimeSavedForUserResponse parses an HTTP response from a GetTimeSavedForUserWithResponse call

func (GetTimeSavedForUserResponse) Status

Status returns HTTPResponse.Status

func (GetTimeSavedForUserResponse) StatusCode

func (r GetTimeSavedForUserResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTopUsersParams added in v1.0.5

type GetTopUsersParams struct {
	// 0 for by minutes saved, 1 for by view count, 2 for by total submissions
	SortType GetTopUsersParamsSortType `json:"sortType"`
}

GetTopUsersParams defines parameters for GetTopUsers.

type GetTopUsersParamsSortType added in v1.0.5

type GetTopUsersParamsSortType int

GetTopUsersParamsSortType defines parameters for GetTopUsers.

type GetTopUsersResponse

type GetTopUsersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		MinutesSaved     *[]float32 `json:"minutesSaved,omitempty"`
		TotalSubmissions *[]int     `json:"totalSubmissions,omitempty"`
		UserNames        *[]string  `json:"userNames,omitempty"`
		ViewCounts       *[]int     `json:"viewCounts,omitempty"`
	}
}

func ParseGetTopUsersResponse

func ParseGetTopUsersResponse(rsp *http.Response) (*GetTopUsersResponse, error)

ParseGetTopUsersResponse parses an HTTP response from a GetTopUsersWithResponse call

func (GetTopUsersResponse) Status

func (r GetTopUsersResponse) Status() string

Status returns HTTPResponse.Status

func (GetTopUsersResponse) StatusCode

func (r GetTopUsersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTotalStatsParams added in v1.0.5

type GetTotalStatsParams struct {
	// Include contributing users
	CountContributingUsers *bool `json:"countContributingUsers,omitempty"`
}

GetTotalStatsParams defines parameters for GetTotalStats.

type GetTotalStatsResponse

type GetTotalStatsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Sum of public install stats
		ActiveUsers *int `json:"activeUsers,omitempty"`

		// 48-hour active API users https://github.com/ajayyy/PrivacyUserCount
		ApiUsers *int `json:"apiUsers,omitempty"`

		// Total number of minutes saved
		MinutesSaved *float32 `json:"minutesSaved,omitempty"`

		// Number of total submissions
		TotalSubmissions *int         `json:"totalSubmissions,omitempty"`
		UserCount        *interface{} `json:"userCount,omitempty"`

		// Total reported segment views
		ViewCount *int `json:"viewCount,omitempty"`
	}
}

func ParseGetTotalStatsResponse

func ParseGetTotalStatsResponse(rsp *http.Response) (*GetTotalStatsResponse, error)

ParseGetTotalStatsResponse parses an HTTP response from a GetTotalStatsWithResponse call

func (GetTotalStatsResponse) Status

func (r GetTotalStatsResponse) Status() string

Status returns HTTPResponse.Status

func (GetTotalStatsResponse) StatusCode

func (r GetTotalStatsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUserIDParams added in v1.0.5

type GetUserIDParams struct {
	// Search string for username. Case sensitive. Minimum for non-exact is 3 characters, maximum is 64 characters
	Username string `json:"username"`

	// Searches for exact username with no wildcard
	Exact *bool `json:"exact,omitempty"`
}

GetUserIDParams defines parameters for GetUserID.

type GetUserIDResponse

type GetUserIDResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]struct {
		// Public userID (private userID hashed 5000 times)
		UserID   *PublicUserID `json:"userID,omitempty"`
		UserName *string       `json:"userName,omitempty"`
	}
}

func ParseGetUserIDResponse

func ParseGetUserIDResponse(rsp *http.Response) (*GetUserIDResponse, error)

ParseGetUserIDResponse parses an HTTP response from a GetUserIDWithResponse call

func (GetUserIDResponse) Status

func (r GetUserIDResponse) Status() string

Status returns HTTPResponse.Status

func (GetUserIDResponse) StatusCode

func (r GetUserIDResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUserInfoParams added in v1.0.5

type GetUserInfoParams struct {
	// public userID of user to lookup
	PublicUserID *string `json:"publicUserID,omitempty"`

	// Private userID
	UserID *string `json:"userID,omitempty"`

	// Values to get from userInfo
	Value *GetUserInfoParamsValue `json:"value,omitempty"`
}

GetUserInfoParams defines parameters for GetUserInfo.

type GetUserInfoParamsValue added in v1.0.5

type GetUserInfoParamsValue []string

GetUserInfoParamsValue defines parameters for GetUserInfo.

type GetUserInfoResponse

type GetUserInfoResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Total number of ignored/ hidden segments
		IgnoredSegmentCount *int `json:"ignoredSegmentCount,omitempty"`

		// Total number of views on ignored/ hidden segments
		IgnoredViewCount *int         `json:"ignoredViewCount,omitempty"`
		LastSegmentID    *SegmentUUID `json:"lastSegmentID,omitempty"`

		// minutes saved
		MinutesSaved *float32 `json:"minutesSaved,omitempty"`

		// Reputation value
		Reputation *float32 `json:"reputation,omitempty"`

		// Total number of segments excluding ignored/ hidden segments
		SegmentCount *int `json:"segmentCount,omitempty"`

		// Public userID (private userID hashed 5000 times)
		UserID *PublicUserID `json:"userID,omitempty"`

		// public userID if not set
		UserName *interface{} `json:"userName,omitempty"`

		// Total number of views ecluding views on ignored/ hidden segments
		ViewCount *int `json:"viewCount,omitempty"`

		// VIP status
		Vip *bool `json:"vip,omitempty"`

		// currently enabled warnings
		Warnings *int `json:"warnings,omitempty"`
	}
	JSON400 *InvalidParameter
}

func ParseGetUserInfoResponse

func ParseGetUserInfoResponse(rsp *http.Response) (*GetUserInfoResponse, error)

ParseGetUserInfoResponse parses an HTTP response from a GetUserInfoWithResponse call

func (GetUserInfoResponse) Status

func (r GetUserInfoResponse) Status() string

Status returns HTTPResponse.Status

func (GetUserInfoResponse) StatusCode

func (r GetUserInfoResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUserStatsParams added in v1.0.5

type GetUserStatsParams struct {
	// Public userID of target
	UserID PublicUserID `json:"userID"`

	// display category stats
	FetchCategoryStats *bool `json:"fetchCategoryStats,omitempty"`

	// display type stats
	FetchActionTypeStats *string `json:"fetchActionTypeStats,omitempty"`
}

GetUserStatsParams defines parameters for GetUserStats.

type GetUserStatsResponse

type GetUserStatsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *UserStats
}

func ParseGetUserStatsResponse

func ParseGetUserStatsResponse(rsp *http.Response) (*GetUserStatsResponse, error)

ParseGetUserStatsResponse parses an HTTP response from a GetUserStatsWithResponse call

func (GetUserStatsResponse) Status

func (r GetUserStatsResponse) Status() string

Status returns HTTPResponse.Status

func (GetUserStatsResponse) StatusCode

func (r GetUserStatsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUsernameResponse

type GetUsernameResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// public userID if not username set
		UserName *interface{} `json:"userName,omitempty"`
	}
}

func ParseGetUsernameResponse

func ParseGetUsernameResponse(rsp *http.Response) (*GetUsernameResponse, error)

ParseGetUsernameResponse parses an HTTP response from a GetUsernameWithResponse call

func (GetUsernameResponse) Status

func (r GetUsernameResponse) Status() string

Status returns HTTPResponse.Status

func (GetUsernameResponse) StatusCode

func (r GetUsernameResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetViewsForUserResponse

type GetViewsForUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		ViewCount *int `json:"viewCount,omitempty"`
	}
}

func ParseGetViewsForUserResponse

func ParseGetViewsForUserResponse(rsp *http.Response) (*GetViewsForUserResponse, error)

ParseGetViewsForUserResponse parses an HTTP response from a GetViewsForUserWithResponse call

func (GetViewsForUserResponse) Status

func (r GetViewsForUserResponse) Status() string

Status returns HTTPResponse.Status

func (GetViewsForUserResponse) StatusCode

func (r GetViewsForUserResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetskipsegmentsParams added in v1.0.5

type GetskipsegmentsParams struct {
	// ID of video
	VideoID RequiredVideoID `json:"videoID"`

	// Array of categories - See https://wiki.sponsor.ajay.app/w/Types#Category
	Category Category `json:"category"`

	// multiple action types - Options are skip, mute
	ActionType ActionType `json:"actionType"`

	// Segment UUIDs to get regardless of votes
	RequiredSegment *RequiredSegment `json:"requiredSegment,omitempty"`

	// Service to target - See https://wiki.sponsor.ajay.app/w/Types#Service
	Service GetskipsegmentsParamsService `json:"service"`
}

GetskipsegmentsParams defines parameters for Getskipsegments.

type GetskipsegmentsParamsActionType added in v1.0.5

type GetskipsegmentsParamsActionType string

GetskipsegmentsParamsActionType defines parameters for Getskipsegments.

type GetskipsegmentsParamsCategory added in v1.0.5

type GetskipsegmentsParamsCategory string

GetskipsegmentsParamsCategory defines parameters for Getskipsegments.

type GetskipsegmentsParamsService added in v1.0.5

type GetskipsegmentsParamsService string

GetskipsegmentsParamsService defines parameters for Getskipsegments.

type GetskipsegmentsResponse

type GetskipsegmentsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]SkipSegment
	JSON400      *struct {
		// Parameter does not match format requirements (Bad JSON or not an arrya)
		Message *InvalidParameter `json:"message,omitempty"`
	}
}

func ParseGetskipsegmentsResponse

func ParseGetskipsegmentsResponse(rsp *http.Response) (*GetskipsegmentsResponse, error)

ParseGetskipsegmentsResponse parses an HTTP response from a GetskipsegmentsWithResponse call

func (GetskipsegmentsResponse) Status

func (r GetskipsegmentsResponse) Status() string

Status returns HTTPResponse.Status

func (GetskipsegmentsResponse) StatusCode

func (r GetskipsegmentsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HashSkipSegment added in v1.0.5

type HashSkipSegment []struct {
	// Full hash of videoID
	Hash     *VideoIDHash `json:"hash,omitempty"`
	Segments *SkipSegment `json:"segments,omitempty"`

	// ID of video
	VideoID *VideoID `json:"videoID,omitempty"`
}

Privacy preserving skip segments

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type InvalidParameter added in v1.0.5

type InvalidParameter string

Parameter does not match format requirements (Bad JSON or not an arrya)

type LockReason added in v1.0.5

type LockReason struct {
	// Segment Category
	Category *Category `json:"category,omitempty"`

	// Status of lockStatusk of category
	Locked *LockReasonLocked `json:"locked,omitempty"`

	// VIP specified lock reason
	Reason *string `json:"reason"`

	// Public userID (private userID hashed 5000 times)
	UserID *PublicUserID `json:"userID,omitempty"`

	// Username of locking VIP
	UserName *string `json:"userName"`
}

VIP specified lock reason

type LockReasonLocked added in v1.0.5

type LockReasonLocked int

Status of lockStatusk of category

const (
	LockReasonLockedN0 LockReasonLocked = 0

	LockReasonLockedN1 LockReasonLocked = 1
)

Defines values for LockReasonLocked.

type N403VIP added in v1.0.5

type N403VIP struct {
	Message *string `json:"message,omitempty"`
}

403 Error when non-VIP users access VIP endpoints

type PostClearCacheParams added in v1.0.5

type PostClearCacheParams struct {
	// ID of video
	VideoID RequiredVideoID `json:"videoID"`

	// Service to target - See https://wiki.sponsor.ajay.app/w/Types#Service
	Service PostClearCacheParamsService `json:"service"`
}

PostClearCacheParams defines parameters for PostClearCache.

type PostClearCacheParamsService added in v1.0.5

type PostClearCacheParamsService string

PostClearCacheParamsService defines parameters for PostClearCache.

type PostClearCacheResponse

type PostClearCacheResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *InvalidParameter
	JSON403      *N403VIP
}

func ParsePostClearCacheResponse

func ParsePostClearCacheResponse(rsp *http.Response) (*PostClearCacheResponse, error)

ParsePostClearCacheResponse parses an HTTP response from a PostClearCacheWithResponse call

func (PostClearCacheResponse) Status

func (r PostClearCacheResponse) Status() string

Status returns HTTPResponse.Status

func (PostClearCacheResponse) StatusCode

func (r PostClearCacheResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostLockCategoriesParams added in v1.0.5

type PostLockCategoriesParams struct {
	// ID of video
	VideoID RequiredVideoID `json:"videoID"`

	// Array of categories - See https://wiki.sponsor.ajay.app/w/Types#Category
	Category Category `json:"category"`

	// Lock reason
	Reason *string `json:"reason,omitempty"`
}

PostLockCategoriesParams defines parameters for PostLockCategories.

type PostLockCategoriesParamsCategory added in v1.0.5

type PostLockCategoriesParamsCategory string

PostLockCategoriesParamsCategory defines parameters for PostLockCategories.

type PostLockCategoriesResponse

type PostLockCategoriesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *InvalidParameter
	JSON403      *N403VIP
}

func ParsePostLockCategoriesResponse

func ParsePostLockCategoriesResponse(rsp *http.Response) (*PostLockCategoriesResponse, error)

ParsePostLockCategoriesResponse parses an HTTP response from a PostLockCategoriesWithResponse call

func (PostLockCategoriesResponse) Status

Status returns HTTPResponse.Status

func (PostLockCategoriesResponse) StatusCode

func (r PostLockCategoriesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostPurgeAllSegmentsParams added in v1.0.5

type PostPurgeAllSegmentsParams struct {
	// ID of video
	VideoID RequiredVideoID `json:"videoID"`

	// Service to target - See https://wiki.sponsor.ajay.app/w/Types#Service
	Service PostPurgeAllSegmentsParamsService `json:"service"`
}

PostPurgeAllSegmentsParams defines parameters for PostPurgeAllSegments.

type PostPurgeAllSegmentsParamsService added in v1.0.5

type PostPurgeAllSegmentsParamsService string

PostPurgeAllSegmentsParamsService defines parameters for PostPurgeAllSegments.

type PostPurgeAllSegmentsResponse

type PostPurgeAllSegmentsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *InvalidParameter
	JSON403      *N403VIP
}

func ParsePostPurgeAllSegmentsResponse

func ParsePostPurgeAllSegmentsResponse(rsp *http.Response) (*PostPurgeAllSegmentsResponse, error)

ParsePostPurgeAllSegmentsResponse parses an HTTP response from a PostPurgeAllSegmentsWithResponse call

func (PostPurgeAllSegmentsResponse) Status

Status returns HTTPResponse.Status

func (PostPurgeAllSegmentsResponse) StatusCode

func (r PostPurgeAllSegmentsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostShadowBanUserParams added in v1.0.5

type PostShadowBanUserParams struct {
	// Public userID of target
	UserID PublicUserID `json:"userID"`

	// Enable or disable ban
	Enabled *bool `json:"enabled,omitempty"`

	// Should all previous submissions be banned as well
	UnHideOldSubmittions *bool `json:"unHideOldSubmittions,omitempty"`
}

PostShadowBanUserParams defines parameters for PostShadowBanUser.

type PostShadowBanUserResponse

type PostShadowBanUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePostShadowBanUserResponse

func ParsePostShadowBanUserResponse(rsp *http.Response) (*PostShadowBanUserResponse, error)

ParsePostShadowBanUserResponse parses an HTTP response from a PostShadowBanUserWithResponse call

func (PostShadowBanUserResponse) Status

func (r PostShadowBanUserResponse) Status() string

Status returns HTTPResponse.Status

func (PostShadowBanUserResponse) StatusCode

func (r PostShadowBanUserResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostSkipSegmentsJSONBody added in v1.0.5

type PostSkipSegmentsJSONBody struct {
	Segments []SubmitSegment `json:"segments"`

	// Supported services
	Service   *Services `json:"service,omitempty"`
	UserAgent string    `json:"userAgent"`

	// Duration of video, will attempt to retrieve from YT API if missing. Used to determine when a submission is out of date
	VideoDuration *float32 `json:"videoDuration,omitempty"`

	// ID of video
	VideoID string `json:"videoID"`
}

PostSkipSegmentsJSONBody defines parameters for PostSkipSegments.

type PostSkipSegmentsJSONRequestBody added in v1.0.5

type PostSkipSegmentsJSONRequestBody PostSkipSegmentsJSONBody

PostSkipSegmentsJSONRequestBody defines body for PostSkipSegments for application/json ContentType.

type PostSkipSegmentsParams added in v1.0.5

type PostSkipSegmentsParams struct {
	// ID of video
	VideoID RequiredVideoID `json:"videoID"`

	// user agent of submitter
	UserAgent string `json:"userAgent"`

	// Service to target - See https://wiki.sponsor.ajay.app/w/Types#Service
	Service PostSkipSegmentsParamsService `json:"service"`

	// duration of video, will attempt to retrieve from YT API if missing. Used to determine when a submission is out of date
	VideoDuration *float32 `json:"videoDuration,omitempty"`

	// Action type
	ActionType PostSkipSegmentsParamsActionType `json:"actionType"`

	// Segment Category - See https://wiki.sponsor.ajay.app/w/Types#Category
	Category PostSkipSegmentsParamsCategory `json:"category"`

	// Start time of segment
	StartTime float32 `json:"startTime"`

	// End time of segment
	EndTime float32 `json:"endTime"`
}

PostSkipSegmentsParams defines parameters for PostSkipSegments.

type PostSkipSegmentsParamsActionType added in v1.0.5

type PostSkipSegmentsParamsActionType string

PostSkipSegmentsParamsActionType defines parameters for PostSkipSegments.

type PostSkipSegmentsParamsCategory added in v1.0.5

type PostSkipSegmentsParamsCategory string

PostSkipSegmentsParamsCategory defines parameters for PostSkipSegments.

type PostSkipSegmentsParamsService added in v1.0.5

type PostSkipSegmentsParamsService string

PostSkipSegmentsParamsService defines parameters for PostSkipSegments.

type PostSkipSegmentsResponse

type PostSkipSegmentsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		UUID *SegmentUUID `json:"UUID,omitempty"`

		// Segment Category
		Category *Category `json:"category,omitempty"`

		// Start and end time in seconds
		Segment *[]int `json:"segment,omitempty"`
	}
	JSON400 *struct {
		ErrorMessage *interface{} `json:"errorMessage,omitempty"`
	}
	JSON409 *struct {
		// Segment already submitted before
		ErrorMessage *string `json:"errorMessage,omitempty"`
	}
}

func ParsePostSkipSegmentsResponse

func ParsePostSkipSegmentsResponse(rsp *http.Response) (*PostSkipSegmentsResponse, error)

ParsePostSkipSegmentsResponse parses an HTTP response from a PostSkipSegmentsWithResponse call

func (PostSkipSegmentsResponse) Status

func (r PostSkipSegmentsResponse) Status() string

Status returns HTTPResponse.Status

func (PostSkipSegmentsResponse) StatusCode

func (r PostSkipSegmentsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostViewedVideoSponsorTimeParams added in v1.0.5

type PostViewedVideoSponsorTimeParams struct {
	// UUID of target segment
	UUID UUID `json:"UUID"`
}

PostViewedVideoSponsorTimeParams defines parameters for PostViewedVideoSponsorTime.

type PostViewedVideoSponsorTimeResponse

type PostViewedVideoSponsorTimeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *struct {
		Message *string `json:"message,omitempty"`
	}
	JSON403 *struct {
		Message *interface{} `json:"message,omitempty"`
	}
	JSON500 *struct {
		Error *string `json:"error,omitempty"`
	}
}

func ParsePostViewedVideoSponsorTimeResponse

func ParsePostViewedVideoSponsorTimeResponse(rsp *http.Response) (*PostViewedVideoSponsorTimeResponse, error)

ParsePostViewedVideoSponsorTimeResponse parses an HTTP response from a PostViewedVideoSponsorTimeWithResponse call

func (PostViewedVideoSponsorTimeResponse) Status

Status returns HTTPResponse.Status

func (PostViewedVideoSponsorTimeResponse) StatusCode

func (r PostViewedVideoSponsorTimeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostVoteOnSponsorTimeParams added in v1.0.5

type PostVoteOnSponsorTimeParams struct {
	// UUID of target segment
	UUID UUID `json:"UUID"`

	// Vote type - 0 for downvote, 1 for upvote, 20 to undo vote
	Type *PostVoteOnSponsorTimeParamsType `json:"type,omitempty"`

	// Array of categories - See https://wiki.sponsor.ajay.app/w/Types#Category
	Category Category `json:"category"`
}

PostVoteOnSponsorTimeParams defines parameters for PostVoteOnSponsorTime.

type PostVoteOnSponsorTimeParamsCategory added in v1.0.5

type PostVoteOnSponsorTimeParamsCategory string

PostVoteOnSponsorTimeParamsCategory defines parameters for PostVoteOnSponsorTime.

type PostVoteOnSponsorTimeParamsType added in v1.0.5

type PostVoteOnSponsorTimeParamsType int

PostVoteOnSponsorTimeParamsType defines parameters for PostVoteOnSponsorTime.

type PostVoteOnSponsorTimeResponse

type PostVoteOnSponsorTimeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePostVoteOnSponsorTimeResponse

func ParsePostVoteOnSponsorTimeResponse(rsp *http.Response) (*PostVoteOnSponsorTimeResponse, error)

ParsePostVoteOnSponsorTimeResponse parses an HTTP response from a PostVoteOnSponsorTimeWithResponse call

func (PostVoteOnSponsorTimeResponse) Status

Status returns HTTPResponse.Status

func (PostVoteOnSponsorTimeResponse) StatusCode

func (r PostVoteOnSponsorTimeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostWarnUserJSONBody added in v1.0.5

type PostWarnUserJSONBody struct {
	// If warning should be enabled or disabled
	Enabled *bool `json:"enabled,omitempty"`

	// private userID when not used in query parameter
	IssuerUserID *PrivateUserID `json:"issuerUserID,omitempty"`

	// Warning reason to display to user
	Reason *string `json:"reason,omitempty"`

	// Public userID (private userID hashed 5000 times)
	UserID *PublicUserID `json:"userID,omitempty"`
}

PostWarnUserJSONBody defines parameters for PostWarnUser.

type PostWarnUserJSONRequestBody added in v1.0.5

type PostWarnUserJSONRequestBody PostWarnUserJSONBody

PostWarnUserJSONRequestBody defines body for PostWarnUser for application/json ContentType.

type PostWarnUserResponse

type PostWarnUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Message *string `json:"message,omitempty"`
	}
	JSON400 *InvalidParameter
	JSON403 *N403VIP
}

func ParsePostWarnUserResponse

func ParsePostWarnUserResponse(rsp *http.Response) (*PostWarnUserResponse, error)

ParsePostWarnUserResponse parses an HTTP response from a PostWarnUserWithResponse call

func (PostWarnUserResponse) Status

func (r PostWarnUserResponse) Status() string

Status returns HTTPResponse.Status

func (PostWarnUserResponse) StatusCode

func (r PostWarnUserResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostadduserasvipParams added in v1.0.5

type PostadduserasvipParams struct {
	// Public userID of user to add to VIP list
	UserID string `json:"userID"`

	// enable or disable user
	Enabled *bool `json:"enabled,omitempty"`
}

PostadduserasvipParams defines parameters for Postadduserasvip.

type PostadduserasvipResponse

type PostadduserasvipResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePostadduserasvipResponse

func ParsePostadduserasvipResponse(rsp *http.Response) (*PostadduserasvipResponse, error)

ParsePostadduserasvipResponse parses an HTTP response from a PostadduserasvipWithResponse call

func (PostadduserasvipResponse) Status

func (r PostadduserasvipResponse) Status() string

Status returns HTTPResponse.Status

func (PostadduserasvipResponse) StatusCode

func (r PostadduserasvipResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PrivateUserID added in v1.0.5

type PrivateUserID string

private userID when not used in query parameter

type PublicUserID added in v1.0.5

type PublicUserID string

Public userID (private userID hashed 5000 times)

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RequiredSegment added in v1.0.5

type RequiredSegment []string

RequiredSegment defines model for requiredSegment.

type RequiredVideoID added in v1.0.5

type RequiredVideoID string

RequiredVideoID defines model for requiredVideoID.

type SearchSegment added in v1.0.5

type SearchSegment struct {
	UUID *SegmentUUID `json:"UUID,omitempty"`

	// possible action types
	ActionType *ActionType `json:"actionType,omitempty"`

	// Segment Category
	Category *Category `json:"category,omitempty"`

	// end time of segment
	EndTime *float32 `json:"endTime,omitempty"`

	// If segment is hidden
	Hidden *bool `json:"hidden,omitempty"`

	// If segment is locked
	Locked *bool `json:"locked,omitempty"`

	// If submitter is shadowbanned
	Shadowhidden *bool `json:"shadowhidden,omitempty"`

	// start time of segment
	StartTime *float32 `json:"startTime,omitempty"`

	// Time submitted (ms epoch)
	TimeSubmitted *int `json:"timeSubmitted,omitempty"`

	// Reported views on segment
	Views *int `json:"views,omitempty"`

	// votes on segment
	Votes *string `json:"votes,omitempty"`
}

Single search segment

type SegmentUUID added in v1.0.5

type SegmentUUID string

SegmentUUID defines model for segmentUUID.

type Service added in v1.0.5

type Service string

Service defines model for service.

const (
	YouTube Service = "YouTube"
)

Defines values for Service.

type Services added in v1.0.5

type Services string

Supported services

const (
	ServicesYouTube Services = "YouTube"
)

Defines values for Services.

type SetUsernameParams added in v1.0.5

type SetUsernameParams struct {
	// New Username
	Username string `json:"username"`
}

SetUsernameParams defines parameters for SetUsername.

type SetUsernameResponse

type SetUsernameResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseSetUsernameResponse

func ParseSetUsernameResponse(rsp *http.Response) (*SetUsernameResponse, error)

ParseSetUsernameResponse parses an HTTP response from a SetUsernameWithResponse call

func (SetUsernameResponse) Status

func (r SetUsernameResponse) Status() string

Status returns HTTPResponse.Status

func (SetUsernameResponse) StatusCode

func (r SetUsernameResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Sha256HashPrefix added in v1.0.5

type Sha256HashPrefix string

Sha256HashPrefix defines model for sha256HashPrefix.

type SkipSegment added in v1.0.5

type SkipSegment struct {
	UUID *SegmentUUID `json:"UUID,omitempty"`

	// possible action types
	ActionType *ActionType `json:"actionType,omitempty"`

	// Segment Category
	Category *Category `json:"category,omitempty"`

	// Unused
	Description *string `json:"description"`

	// If segment is locked
	Locked *SkipSegmentLocked `json:"locked,omitempty"`

	// start and end time in seconds
	Segment *[]float32 `json:"segment,omitempty"`

	// Public userID (private userID hashed 5000 times)
	UserID *PublicUserID `json:"userID,omitempty"`

	// Duration of video at time of submission.
	VideoDuration *VideoDuration `json:"videoDuration,omitempty"`

	// Votes on segment on the segment
	Votes *float32 `json:"votes,omitempty"`
}

SkipSegment defines model for skipSegment.

type SkipSegmentLocked added in v1.0.5

type SkipSegmentLocked int

If segment is locked

const (
	SkipSegmentLockedN0 SkipSegmentLocked = 0

	SkipSegmentLockedN1 SkipSegmentLocked = 1
)

Defines values for SkipSegmentLocked.

type StatusResponse added in v1.0.5

type StatusResponse struct {
	Commit *interface{} `json:"commit,omitempty"`

	// Current database version
	Db *int `json:"db,omitempty"`

	// ms between startTime and sending response
	ProcessTime *int `json:"processTime,omitempty"`

	// Unix (ms) time that request was recieved
	StartTime *int `json:"startTime,omitempty"`

	// Uptime in seconds
	Uptime *int `json:"uptime,omitempty"`
}

StatusResponse defines model for statusResponse.

type SubmitActionType added in v1.0.5

type SubmitActionType string

SubmitActionType defines model for submitActionType.

const (
	Mute SubmitActionType = "mute"

	Skip SubmitActionType = "skip"
)

Defines values for SubmitActionType.

type SubmitCategory added in v1.0.5

type SubmitCategory string

SubmitCategory defines model for submitCategory.

const (
	Filler SubmitCategory = "filler"

	Interaction SubmitCategory = "interaction"

	Intro SubmitCategory = "intro"

	MusicOfftopic SubmitCategory = "music_offtopic"

	Outro SubmitCategory = "outro"

	PoiHighlight SubmitCategory = "poi_highlight"

	Preview SubmitCategory = "preview"

	Selfpromo SubmitCategory = "selfpromo"

)

Defines values for SubmitCategory.

type SubmitSegment added in v1.0.5

type SubmitSegment struct {
	// possible action types
	ActionType *ActionType `json:"actionType,omitempty"`

	// Segment Category
	Category Category `json:"category"`

	// start and end time in seconds
	Segment []float32 `json:"segment"`
}

Object of segment to submit

type UUID added in v1.0.5

type UUID string

UUID defines model for UUID.

type UserStats added in v1.0.5

type UserStats struct {
	ActionTypeCount *interface{} `json:"actionTypeCount,omitempty"`
	CategoryCount   *interface{} `json:"categoryCount,omitempty"`
	MinutesSaved    *int         `json:"minutesSaved,omitempty"`
	SegmentCount    *int         `json:"segmentCount,omitempty"`

	// Public userID (private userID hashed 5000 times)
	UserID *PublicUserID `json:"userID,omitempty"`

	// user name
	UserName *string `json:"userName,omitempty"`
}

Response from userStats

type VideoDuration added in v1.0.5

type VideoDuration float32

Duration of video at time of submission.

type VideoID added in v1.0.5

type VideoID string

ID of video

type VideoIDHash added in v1.0.5

type VideoIDHash string

Full hash of videoID

type VideoLock added in v1.0.5

type VideoLock struct {
	Categories *[]Category `json:"categories,omitempty"`

	// Specified reason for lock
	Reason *string `json:"reason,omitempty"`

	// Supported services
	Service *Services `json:"service,omitempty"`
}

VideoLock defines model for videoLock.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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