Class: Strava::Models::DetailedPhoto
- Inherits:
-
Response
- Object
- Hashie::Trash
- Strava::Model
- Response
- Strava::Models::DetailedPhoto
- Defined in:
- lib/strava/models/detailed_photo.rb
Overview
Represents a photo or video attached to an activity.
Photos can be uploaded directly to Strava or linked from Instagram. This model contains URLs to various sizes of the media, timestamps, and metadata about the photo or video.
Note: This is an undocumented Strava API endpoint.
Instance Method Summary collapse
-
#activity_id ⇒ Integer
ID of the activity this photo is attached to.
-
#activity_name ⇒ String
Name of the activity.
-
#athlete_id ⇒ Integer
ID of the athlete who uploaded the photo.
-
#caption ⇒ String?
Photo caption/description.
-
#created_at ⇒ Time
When the photo was created/taken.
-
#created_at_local ⇒ Time
Local time when photo was created.
-
#cursor ⇒ String?
Pagination cursor for photo listing.
-
#default_photo ⇒ Boolean
Whether this is the default/cover photo for the activity.
-
#duration ⇒ Float?
Duration in seconds (for videos).
-
#location ⇒ Array<Float>?
Geographic location [latitude, longitude] where photo was taken.
-
#placeholder_image ⇒ String?
URL to placeholder/thumbnail image.
-
#post_id ⇒ Integer?
Post identifier if photo is from a social post.
-
#resource_state ⇒ Integer
Resource state indicator.
-
#sizes ⇒ Hash
Map of size keys to dimensions [width, height].
-
#source ⇒ Integer
Source of the photo (1=native Strava upload, 2=Instagram).
-
#status ⇒ String
Processing status.
-
#type ⇒ Integer
Type of media (1=photo, 2=video).
-
#unique_id ⇒ String
Unique identifier for the photo/video.
-
#uploaded_at ⇒ Time
When the photo was uploaded to Strava.
-
#urls ⇒ Hash
Map of size keys to photo URLs (e.g., => "https://...", "1000" => "https://...").
-
#video_url ⇒ String?
Direct URL to video file.
Instance Method Details
#activity_id ⇒ Integer
Returns ID of the activity this photo is attached to.
33 |
# File 'lib/strava/models/detailed_photo.rb', line 33 property 'activity_id' |
#activity_name ⇒ String
Returns Name of the activity.
36 |
# File 'lib/strava/models/detailed_photo.rb', line 36 property 'activity_name' |
#athlete_id ⇒ Integer
Returns ID of the athlete who uploaded the photo.
30 |
# File 'lib/strava/models/detailed_photo.rb', line 30 property 'athlete_id' |
#caption ⇒ String?
Returns Photo caption/description.
45 |
# File 'lib/strava/models/detailed_photo.rb', line 45 property 'caption' |
#created_at ⇒ Time
Returns When the photo was created/taken.
60 |
# File 'lib/strava/models/detailed_photo.rb', line 60 property 'created_at', transform_with: ->(v) { Time.parse(v) } |
#created_at_local ⇒ Time
Returns Local time when photo was created.
63 |
# File 'lib/strava/models/detailed_photo.rb', line 63 property 'created_at_local', transform_with: ->(v) { Time.parse(v) } |
#cursor ⇒ String?
Returns Pagination cursor for photo listing.
78 |
# File 'lib/strava/models/detailed_photo.rb', line 78 property 'cursor' |
#default_photo ⇒ Boolean
Returns Whether this is the default/cover photo for the activity.
75 |
# File 'lib/strava/models/detailed_photo.rb', line 75 property 'default_photo' |
#duration ⇒ Float?
Returns Duration in seconds (for videos).
81 |
# File 'lib/strava/models/detailed_photo.rb', line 81 property 'duration' |
#location ⇒ Array<Float>?
Returns Geographic location [latitude, longitude] where photo was taken.
87 |
# File 'lib/strava/models/detailed_photo.rb', line 87 property 'location' |
#placeholder_image ⇒ String?
Returns URL to placeholder/thumbnail image.
69 |
# File 'lib/strava/models/detailed_photo.rb', line 69 property 'placeholder_image' |
#post_id ⇒ Integer?
Returns Post identifier if photo is from a social post.
39 |
# File 'lib/strava/models/detailed_photo.rb', line 39 property 'post_id' |
#resource_state ⇒ Integer
Returns Resource state indicator.
42 |
# File 'lib/strava/models/detailed_photo.rb', line 42 property 'resource_state' |
#sizes ⇒ Hash
Returns Map of size keys to dimensions [width, height].
72 |
# File 'lib/strava/models/detailed_photo.rb', line 72 property 'sizes' |
#source ⇒ Integer
Returns Source of the photo (1=native Strava upload, 2=Instagram).
51 |
# File 'lib/strava/models/detailed_photo.rb', line 51 property 'source' |
#status ⇒ String
Returns Processing status.
54 |
# File 'lib/strava/models/detailed_photo.rb', line 54 property 'status' |
#type ⇒ Integer
Returns Type of media (1=photo, 2=video).
48 |
# File 'lib/strava/models/detailed_photo.rb', line 48 property 'type' |
#unique_id ⇒ String
Returns Unique identifier for the photo/video.
27 |
# File 'lib/strava/models/detailed_photo.rb', line 27 property 'unique_id' |
#uploaded_at ⇒ Time
Returns When the photo was uploaded to Strava.
57 |
# File 'lib/strava/models/detailed_photo.rb', line 57 property 'uploaded_at', transform_with: ->(v) { Time.parse(v) } |
#urls ⇒ Hash
Returns Map of size keys to photo URLs (e.g., => "https://...", "1000" => "https://...").
66 |
# File 'lib/strava/models/detailed_photo.rb', line 66 property 'urls' |
#video_url ⇒ String?
Returns Direct URL to video file.
84 |
# File 'lib/strava/models/detailed_photo.rb', line 84 property 'video_url' |