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. |
Source code in gopro_api/api/models.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
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). |
Source code in gopro_api/api/models.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | |
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 |
Source code in gopro_api/api/models.py
174 175 176 177 178 179 180 181 182 183 184 185 | |
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. |
Source code in gopro_api/api/models.py
144 145 146 147 148 149 150 151 152 153 154 155 | |
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. |
Source code in gopro_api/api/models.py
158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
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. |
Source code in gopro_api/api/models.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
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 |
Source code in gopro_api/api/models.py
280 281 282 283 284 285 286 287 288 289 290 291 | |
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. |
Source code in gopro_api/api/models.py
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
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. |
Source code in gopro_api/api/models.py
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | |
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. |
Source code in gopro_api/api/models.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
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. |
Source code in gopro_api/api/models.py
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | |