Class: Strava::ClubAnnouncement

Inherits:
Base
  • Object
show all
Defined in:
lib/strava/club_announcement.rb

Overview

Class to represent Strava Club Announcement https://strava.github.io/api/v3/activities/

Instance Attribute Summary

Attributes inherited from Base

#client, #id, #response

Instance Method Summary collapse

Methods inherited from Base

#detailed?, #initialize, #resource_state, resource_states, #summary?

Constructor Details

This class inherits a constructor from Strava::Base

Instance Method Details

#update(data, **opts) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/strava/club_announcement.rb', line 6

def update(data, **opts)
  @response = data
  @id             = data['id']
  @resource_state = data['resource_state']

  @message        = data['message']
  @created_at     = data['created_at']
  @club_id        = data['club_id']
  @athlete        = Athlete.new(data['athlete'], client: @client)
end