api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package api provides types for the outtake HTTP API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthStatusResponse

type AuthStatusResponse struct {
	Authenticated bool   `json:"authenticated"`
	UserID        int    `json:"userId,omitempty"`
	Username      string `json:"username,omitempty"`
}

AuthStatusResponse represents the authentication status response.

type ClipRequest

type ClipRequest struct {
	Name          string  `json:"name"`
	MediaID       string  `json:"mediaId"       validate:"required"`
	MediaTitle    string  `json:"mediaTitle"    validate:"required"`
	MediaType     string  `json:"mediaType"`
	StartTime     float64 `json:"startTime"     validate:"gte=0"`
	Duration      float64 `json:"duration"      validate:"gt=0,lte=600"`
	Quality       string  `json:"quality"`
	ClipType      string  `json:"clipType"      validate:"oneof=clip video gif screenshot"`
	Width         int     `json:"width"`
	FPS           int     `json:"fps"`
	AudioIndex    int     `json:"audioIndex"`
	CropBlackBars bool    `json:"cropBlackBars"`
	WebSafeColor  *bool   `json:"webSafeColor"`
}

ClipRequest represents a request to create a clip.

type ClipResponse

type ClipResponse struct {
	ID            string    `json:"id"`
	Name          string    `json:"name,omitempty"`
	MediaID       string    `json:"mediaId"`
	MediaTitle    string    `json:"mediaTitle"`
	MediaType     string    `json:"mediaType"`
	ClipType      string    `json:"clipType"`
	Status        string    `json:"status"`
	Progress      int       `json:"progress"`
	InputPath     string    `json:"inputPath"`
	OutputPath    string    `json:"outputPath,omitempty"`
	Error         string    `json:"error,omitempty"`
	CreatedAt     time.Time `json:"createdAt"`
	UpdatedAt     time.Time `json:"updatedAt"`
	AudioIndex    int       `json:"audioIndex"`
	CropBlackBars bool      `json:"cropBlackBars"`
	WebSafeColor  bool      `json:"webSafeColor"`
}

ClipResponse represents the response for a clip job.

type ErrorResponse

type ErrorResponse struct {
	Error   string `json:"error"`
	Message string `json:"message"`
}

ErrorResponse represents an error response.

type MediaItemResponse

type MediaItemResponse struct {
	ID           string  `json:"id"`
	Title        string  `json:"title"`
	Type         string  `json:"type"`
	Duration     float64 `json:"duration,omitempty"`
	ThumbPath    string  `json:"thumbPath,omitempty"`
	LibraryTitle string  `json:"libraryTitle,omitempty"`
	Year         int     `json:"year,omitempty"`
	Season       int     `json:"season,omitempty"`
	Episode      int     `json:"episode,omitempty"`
	ShowTitle    string  `json:"showTitle,omitempty"`
}

MediaItemResponse represents a media item in API responses.

type MediaListResponse

type MediaListResponse struct {
	Items []MediaItemResponse `json:"items"`
	Total int                 `json:"total"`
}

MediaListResponse represents a paginated list of media items.

type SessionResponse

type SessionResponse struct {
	ID         string  `json:"id"`
	MediaID    string  `json:"mediaId,omitempty"`
	Title      string  `json:"title"`
	Duration   float64 `json:"duration"`
	ViewOffset float64 `json:"viewOffset,omitempty"`
}

SessionResponse represents a session in API responses.

Jump to

Keyboard shortcuts

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