Class: Strava::Models::PhotosSummary

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

Overview

Represents summary photo information for an activity.

Contains basic information about photos attached to an activity, including the count and primary photo reference.

Examples:

Accessing activity photo summary

activity = client.activity(1234567890)
if activity.photos && activity.photos.count > 0
  puts "This activity has #{activity.photos.count} photo(s)"
  if activity.photos.primary
    puts "Primary photo: #{activity.photos.primary.urls}"
  end
end

See Also:

Instance Method Summary collapse

Instance Method Details

#countInteger

Returns Total number of photos attached to the activity.

Returns:

  • (Integer)

    Total number of photos attached to the activity



26
# File 'lib/strava/models/photos_summary.rb', line 26

property 'count'

#primaryPhotosSummaryPrimary?

Returns The primary/featured photo reference.

Returns:



33
# File 'lib/strava/models/photos_summary.rb', line 33

property 'primary', transform_with: ->(v) { Strava::Models::PhotosSummaryPrimary.new(v) }

#use_primary_photoBoolean?

Note:

Not documented by Strava API

Returns Whether to use the primary photo for display.

Returns:

  • (Boolean, nil)

    Whether to use the primary photo for display



30
# File 'lib/strava/models/photos_summary.rb', line 30

property 'use_primary_photo'