Sha256: 2b2d60e6d60e9ba8cf58195d256d224f775d9e5f18161a80e12dd5879ebbad32

Contents?: true

Size: 742 Bytes

Versions: 1

Compression:

Stored size: 742 Bytes

Contents

module Strava
  # Class to represent Strava Club Announcement
  # https://strava.github.io/api/v3/activities/
  class ClubAnnouncement < Base

    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

  end
end

__END__

ca = Strava::Athlete.current_athlete;
ca.activities;
ca.activities(page: 2);
ca.activities(page: 3);
ca.activities(page: 4);
act = ca.activities.detect{|act| act.response['comment_count'] > 0 && act.response['kudos_count'] > 0 }
act.comments

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
strava-0.1.0 lib/strava/club_announcement.rb