Class: Strava::Models::PhotosSummaryPrimary

Inherits:
Response show all
Defined in:
lib/strava/models/photos_summary_primary.rb

Overview

Represents the primary photo reference in a photos summary.

Contains identification and URL information for the primary photo of an activity.

Examples:

Accessing primary photo URLs

activity = client.activity(1234567890)
if activity.photos&.primary
  photo = activity.photos.primary
  puts "Photo ID: #{photo.id}"
  puts "Source: #{photo.source}"
  puts "URLs: #{photo.urls}"
end

See Also:

Instance Method Summary collapse

Instance Method Details

#idInteger?

Returns Unique identifier for the photo.

Returns:

  • (Integer, nil)

    Unique identifier for the photo



25
# File 'lib/strava/models/photos_summary_primary.rb', line 25

property 'id'

#media_typeInteger?

Note:

Not documented by Strava API

Returns Type of media (1=photo, 2=video).

Returns:

  • (Integer, nil)

    Type of media (1=photo, 2=video)



38
# File 'lib/strava/models/photos_summary_primary.rb', line 38

property 'media_type'

#sourceInteger

Returns Source of the photo (1=native Strava upload, 2=Instagram).

Returns:

  • (Integer)

    Source of the photo (1=native Strava upload, 2=Instagram)



28
# File 'lib/strava/models/photos_summary_primary.rb', line 28

property 'source'

#unique_idString

Returns Unique identifier string for the photo.

Returns:

  • (String)

    Unique identifier string for the photo



31
# File 'lib/strava/models/photos_summary_primary.rb', line 31

property 'unique_id'

#urlsHash

Returns Hash containing URLs to different sizes of the photo.

Returns:

  • (Hash)

    Hash containing URLs to different sizes of the photo



34
# File 'lib/strava/models/photos_summary_primary.rb', line 34

property 'urls'