Module: Strava::Api::Endpoints::Clubs

Included in:
Client
Defined in:
lib/strava/api/endpoints/clubs.rb

Overview

API endpoints for Strava clubs.

Clubs represent groups of athletes on Strava. Club API endpoints allow you to retrieve club information and view recent club events.

Note: the Club Activities, Club Members, and Club Admins endpoints were removed by Strava on September 1, 2026.

Instance Method Summary collapse

Instance Method Details

#athlete_clubs(options = {}, &block) ⇒ Object

List logged-in athlete clubs.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :page (Integer)

    Page number.

  • :per_page (Integer)

    Number of items per page. Defaults to 30.



27
28
29
# File 'lib/strava/api/endpoints/clubs.rb', line 27

def athlete_clubs(options = {}, &block)
  paginate 'athlete/clubs', options, Strava::Models::SummaryClub, &block
end

#club(id_or_options, options = {}) ⇒ Object

Get club.

Parameters:

  • id_or_options (String, Integer, Hash)

    Either a club ID or a hash of options including :id

  • options (Hash) (defaults to: {})

    Additional options (if first parameter is an ID)



37
38
39
40
# File 'lib/strava/api/endpoints/clubs.rb', line 37

def club(id_or_options, options = {})
  id, options = parse_args(id_or_options, options)
  Strava::Models::DetailedClub.new(get("clubs/#{id}", options))
end

#club_events(id_or_options, options = {}, &block) ⇒ Object

List club / group events.

Parameters:

  • id_or_options (String, Integer, Hash)

    Either a club ID or a hash of options including :id

  • options (Hash) (defaults to: {})

    Additional options (if first parameter is an ID)

Options Hash (options):

  • :page (Integer)

    Page number

  • :per_page (Integer)

    Number of items per page. Defaults to 30



50
51
52
53
# File 'lib/strava/api/endpoints/clubs.rb', line 50

def club_events(id_or_options, options = {}, &block)
  id, options = parse_args(id_or_options, options)
  paginate "clubs/#{id}/group_events", options, Strava::Models::ClubEvent, &block
end