Skip to content

Latest commit

 

History

History
352 lines (263 loc) · 10.2 KB

ClubsApi.md

File metadata and controls

352 lines (263 loc) · 10.2 KB

Strava.NET.Api.ClubsApi

All URIs are relative to https://www.strava.com/api/v3

Method HTTP request Description
GetClubActivitiesById GET /clubs/{id}/activities List Club Activities
GetClubAdminsById GET /clubs/{id}/admins List Club Administrators.
GetClubById GET /clubs/{id} Get Club
GetClubMembersById GET /clubs/{id}/members List Club Members
GetLoggedInAthleteClubs GET /athlete/clubs List Athlete Clubs

GetClubActivitiesById

List GetClubActivitiesById (int? id, int? page, int? perPage)

List Club Activities

Retrieve recent activities from members of a specific club. The authenticated athlete must belong to the requested club in order to hit this endpoint. Pagination is supported. Athlete profile visibility is respected for all activities.

Example

using System;
using System.Diagnostics;
using Strava.NET.Api;
using Strava.NET.Client;
using Strava.NET.Model;

namespace Example
{
    public class GetClubActivitiesByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ClubsApi();
            var id = 56;  // int? | The identifier of the club.
            var page = 56;  // int? | Page number. (optional) 
            var perPage = 56;  // int? | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Club Activities
                List<SummaryActivity> result = apiInstance.GetClubActivitiesById(id, page, perPage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClubsApi.GetClubActivitiesById: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id int? The identifier of the club.
page int? Page number. [optional]
perPage int? Number of items per page. Defaults to 30. [optional] [default to 30]

Return type

List

Authorization

strava_oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetClubAdminsById

List GetClubAdminsById (int? id, int? page, int? perPage)

List Club Administrators.

Returns a list of the administrators of a given club.

Example

using System;
using System.Diagnostics;
using Strava.NET.Api;
using Strava.NET.Client;
using Strava.NET.Model;

namespace Example
{
    public class GetClubAdminsByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ClubsApi();
            var id = 56;  // int? | The identifier of the club.
            var page = 56;  // int? | Page number. (optional) 
            var perPage = 56;  // int? | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Club Administrators.
                List<SummaryAthlete> result = apiInstance.GetClubAdminsById(id, page, perPage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClubsApi.GetClubAdminsById: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id int? The identifier of the club.
page int? Page number. [optional]
perPage int? Number of items per page. Defaults to 30. [optional] [default to 30]

Return type

List

Authorization

strava_oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetClubById

DetailedClub GetClubById (int? id)

Get Club

Returns a given club using its identifier.

Example

using System;
using System.Diagnostics;
using Strava.NET.Api;
using Strava.NET.Client;
using Strava.NET.Model;

namespace Example
{
    public class GetClubByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ClubsApi();
            var id = 56;  // int? | The identifier of the club.

            try
            {
                // Get Club
                DetailedClub result = apiInstance.GetClubById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClubsApi.GetClubById: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id int? The identifier of the club.

Return type

DetailedClub

Authorization

strava_oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetClubMembersById

List GetClubMembersById (int? id, int? page, int? perPage)

List Club Members

Returns a list of the athletes who are members of a given club.

Example

using System;
using System.Diagnostics;
using Strava.NET.Api;
using Strava.NET.Client;
using Strava.NET.Model;

namespace Example
{
    public class GetClubMembersByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ClubsApi();
            var id = 56;  // int? | The identifier of the club.
            var page = 56;  // int? | Page number. (optional) 
            var perPage = 56;  // int? | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Club Members
                List<SummaryAthlete> result = apiInstance.GetClubMembersById(id, page, perPage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClubsApi.GetClubMembersById: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id int? The identifier of the club.
page int? Page number. [optional]
perPage int? Number of items per page. Defaults to 30. [optional] [default to 30]

Return type

List

Authorization

strava_oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetLoggedInAthleteClubs

List GetLoggedInAthleteClubs (int? page, int? perPage)

List Athlete Clubs

Returns a list of the clubs whose membership includes the authenticated athlete.

Example

using System;
using System.Diagnostics;
using Strava.NET.Api;
using Strava.NET.Client;
using Strava.NET.Model;

namespace Example
{
    public class GetLoggedInAthleteClubsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: strava_oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ClubsApi();
            var page = 56;  // int? | Page number. (optional) 
            var perPage = 56;  // int? | Number of items per page. Defaults to 30. (optional)  (default to 30)

            try
            {
                // List Athlete Clubs
                List<SummaryClub> result = apiInstance.GetLoggedInAthleteClubs(page, perPage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClubsApi.GetLoggedInAthleteClubs: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
page int? Page number. [optional]
perPage int? Number of items per page. Defaults to 30. [optional] [default to 30]

Return type

List

Authorization

strava_oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]