Module: Strava::Api::Endpoints::Clubs
- Included in:
- Client
- Defined in:
- lib/strava/api/endpoints/clubs.rb
Instance Method Summary collapse
-
#athlete_clubs(options = {}, &block) ⇒ Object
List logged-in athlete clubs.
-
#club(id_or_options, options = {}) ⇒ Object
Get club.
-
#club_activities(id_or_options, options = {}, &block) ⇒ Object
List club activities.
-
#club_admins(id_or_options, options = {}, &block) ⇒ Object
List club administrators.
-
#club_events(id_or_options, options = {}, &block) ⇒ Object
List club / group events.
-
#club_members(id_or_options, options = {}, &block) ⇒ Object
List club members.
Instance Method Details
#athlete_clubs(options = {}, &block) ⇒ Object
List logged-in athlete clubs.
86 87 88 |
# File 'lib/strava/api/endpoints/clubs.rb', line 86 def athlete_clubs( = {}, &block) paginate 'athlete/clubs', , Strava::Models::Club, &block end |
#club(id_or_options, options = {}) ⇒ Object
Get club.
58 59 60 61 |
# File 'lib/strava/api/endpoints/clubs.rb', line 58 def club(, = {}) id, = parse_args(, ) Strava::Models::Club.new(get("clubs/#{id}", )) end |
#club_activities(id_or_options, options = {}, &block) ⇒ Object
List club activities.
17 18 19 20 |
# File 'lib/strava/api/endpoints/clubs.rb', line 17 def club_activities(, = {}, &block) id, = parse_args(, ) paginate "clubs/#{id}/activities", , Strava::Models::Activity, &block end |
#club_admins(id_or_options, options = {}, &block) ⇒ Object
List club administrators.
47 48 49 50 |
# File 'lib/strava/api/endpoints/clubs.rb', line 47 def club_admins(, = {}, &block) id, = parse_args(, ) paginate "clubs/#{id}/admins", , Strava::Models::ClubAdmin, &block end |
#club_events(id_or_options, options = {}, &block) ⇒ Object
List club / group events.
32 33 34 35 |
# File 'lib/strava/api/endpoints/clubs.rb', line 32 def club_events(, = {}, &block) id, = parse_args(, ) paginate "clubs/#{id}/group_events", , Strava::Models::ClubEvent, &block end |
#club_members(id_or_options, options = {}, &block) ⇒ Object
List club members.
73 74 75 76 |
# File 'lib/strava/api/endpoints/clubs.rb', line 73 def club_members(, = {}, &block) id, = parse_args(, ) paginate "clubs/#{id}/members", , Strava::Models::ClubMember, &block end |