Class: Strava::Models::UpdatableActivity

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

Overview

Represents the response from updating an activity.

When you update an activity using the update_activity endpoint, Strava returns this model containing the fields that were successfully updated. This is a subset of the full activity data.

Examples:

Updating activity properties

updated = client.update_activity(1234567890,
  name: "Morning Run",
  description: "Great weather today!",
  commute: false,
  trainer: false,
  gear_id: "g12345"
)

puts "Activity renamed to: #{updated.name}"
puts "Gear ID: #{updated.gear_id}"

See Also:

Instance Method Summary collapse

Instance Method Details

#commuteBoolean?

Returns Whether this activity is a commute.

Returns:

  • (Boolean, nil)

    Whether this activity is a commute



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

property 'commute'

#descriptionString?

Returns Description of the activity.

Returns:

  • (String, nil)

    Description of the activity



39
# File 'lib/strava/models/updatable_activity.rb', line 39

property 'description'

#gear_idString?

Returns ID of the gear (shoes/bike) used for this activity.

Returns:

  • (String, nil)

    ID of the gear (shoes/bike) used for this activity



48
# File 'lib/strava/models/updatable_activity.rb', line 48

property 'gear_id'

#hide_from_homeBoolean?

Returns Whether to hide this activity from the home feed.

Returns:

  • (Boolean, nil)

    Whether to hide this activity from the home feed



36
# File 'lib/strava/models/updatable_activity.rb', line 36

property 'hide_from_home'

#nameString?

Returns Name/title of the activity.

Returns:

  • (String, nil)

    Name/title of the activity



42
# File 'lib/strava/models/updatable_activity.rb', line 42

property 'name'

#sport_typeString?

Returns Sport type (e.g., "Run", "Ride", "Swim").

Returns:

  • (String, nil)

    Sport type (e.g., "Run", "Ride", "Swim")



45
# File 'lib/strava/models/updatable_activity.rb', line 45

property 'sport_type'

#trainerBoolean?

Returns Whether this activity was done on a trainer/treadmill.

Returns:

  • (Boolean, nil)

    Whether this activity was done on a trainer/treadmill



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

property 'trainer'