Models¶
Pydantic models for GoPro cloud media search and download responses.
Search¶
gopro_api.api.models.GoProMediaSearchParams
¶
Bases: BaseModel
Query body for GET /media/search.
List fields are serialized to comma-separated strings in the query string. Defaults match typical Quik / cloud library expectations.
Attributes:
| Name | Type | Description |
|---|---|---|
processing_states |
List[str]
|
Allowed processing states filter. |
fields |
List[str]
|
Columns to request for each media row. |
type |
List[str]
|
Media type filter. |
captured_range |
CapturedRange
|
Capture time window. |
page |
int
|
1-based page index. |
per_page |
int
|
Page size. |
gopro_api.api.models.CapturedRange
¶
Bases: BaseModel
Inclusive capture date window used in search queries.
Serialized to a single captured_range query string with fixed
T00:00:00.000Z suffixes, as required by the cloud API.
Attributes:
| Name | Type | Description |
|---|---|---|
start |
datetime
|
Range start (date portion used in the wire format). |
end |
datetime
|
Range end (date portion used in the wire format). |
gopro_api.api.models.GoProMediaSearchResponse
¶
Bases: BaseModel
Top-level JSON body from GET /media/search.
Attributes:
| Name | Type | Description |
|---|---|---|
embedded |
GoProMediaSearchEmbedded
|
Media rows and errors (alias |
pages |
GoProMediaSearchPages
|
Pagination (alias |
gopro_api.api.models.GoProMediaSearchEmbedded
¶
Bases: BaseModel
_embedded block for a search response (_embedded in JSON).
Attributes:
| Name | Type | Description |
|---|---|---|
media |
List[GoProMediaSearchItem]
|
Result rows for the current page. |
errors |
List[Any]
|
Non-fatal API warnings or error objects. |
gopro_api.api.models.GoProMediaSearchPages
¶
Bases: BaseModel
Pagination metadata (_pages in JSON).
Attributes:
| Name | Type | Description |
|---|---|---|
current_page |
int
|
Active 1-based page. |
per_page |
int
|
Requested page size. |
total_items |
int
|
Total rows matching the query. |
total_pages |
int
|
Total pages available. |
gopro_api.api.models.GoProMediaSearchItem
¶
Bases: BaseModel
One media row from GET /media/search.
Unknown JSON keys are retained via extra="allow" for forward compatibility.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Cloud media identifier (used with |
type |
Optional[str]
|
Media kind (video, photo, burst, etc.). |
captured_at |
Optional[datetime]
|
Capture timestamp when provided. |
filename |
Optional[str]
|
Primary filename when provided. |
file_extension |
Optional[str]
|
Extension without dot when provided. |
file_size |
Optional[int]
|
Size in bytes when provided. |
item_count |
Optional[int]
|
Parts in a burst/set when provided. |
width |
Optional[int]
|
Pixel width when provided. |
height |
Optional[int]
|
Pixel height when provided. |
gopro_user_id |
str
|
Owning user id from the API. |
source_gumi |
str
|
Source identifier from the API. |
source_mgumi |
Optional[str]
|
Optional secondary source id. |
Download¶
gopro_api.api.models.GoProMediaDownloadResponse
¶
Bases: BaseModel
Top-level JSON body from GET /media/{id}/download.
Attributes:
| Name | Type | Description |
|---|---|---|
filename |
str
|
Primary media filename from the API. |
embedded |
GoProMediaDownloadEmbedded
|
Nested files, variations, and sidecars (alias |
gopro_api.api.models.GoProMediaDownloadEmbedded
¶
Bases: BaseModel
Payload nested under _embedded for download metadata.
Attributes:
| Name | Type | Description |
|---|---|---|
files |
List[GoProMediaDownloadFile]
|
Non-video / multi-part files. |
variations |
List[GoProMediaDownloadVariation]
|
Video renditions. |
sprites |
List[Any]
|
Sprite sheet metadata (structure varies). |
sidecar_files |
List[GoProMediaDownloadSidecarFile]
|
Additional downloadable bundles. |
gopro_api.api.models.GoProMediaDownloadVariation
¶
Bases: BaseModel
Video rendition (resolution / quality) with a CDN URL.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
HTTPS URL for this rendition. |
head |
str
|
API-specific head token. |
width |
int
|
Pixel width. |
height |
int
|
Pixel height. |
label |
str
|
Human-readable label from the API. |
type |
str
|
Rendition type string from the API. |
quality |
str
|
Quality bucket from the API. |
available |
bool
|
Whether the rendition is listed as fetchable. |
gopro_api.api.models.GoProMediaDownloadFile
¶
Bases: BaseModel
Non-video or burst member file with a CDN URL.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
HTTPS URL for this part. |
head |
str
|
API-specific head token. |
camera_position |
str
|
Camera slot label from the API. |
item_number |
int
|
Part index within the set. |
width |
int
|
Pixel width. |
height |
int
|
Pixel height. |
orientation |
int
|
EXIF-style orientation integer. |
available |
bool
|
Whether the asset is listed as fetchable. |
gopro_api.api.models.GoProMediaDownloadSidecarFile
¶
Bases: BaseModel
Auxiliary asset such as a ZIP sidecar.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str
|
HTTPS URL when available. |
head |
str
|
API-specific head token. |
label |
str
|
Display label. |
type |
str
|
Asset type string from the API. |
fps |
int
|
Frames per second when applicable. |
available |
bool
|
Whether the asset is listed as fetchable. |
Auth¶
gopro_api.api.models.GoProAuthStatus
¶
Bases: BaseModel
Result of verifying GP_ACCESS_TOKEN against the GoPro cloud API.
Attributes:
| Name | Type | Description |
|---|---|---|
token_configured |
bool
|
Whether a non-empty access token is available. |
token_source |
str | None
|
Where the token came from ( |
authenticated |
bool | None
|
|
http_status |
int | None
|
HTTP status from the verification request, if one was made. |
message |
str
|
Human-readable summary suitable for CLI or logs. |