Skip to content

Commit

Permalink
Change official to seasonal
Browse files Browse the repository at this point in the history
  • Loading branch information
BigBang1112 committed Jan 1, 2025
1 parent 273ae68 commit b0dbe09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Src/ManiaAPI.TrackmaniaIO/ManiaAPI.TrackmaniaIO.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageTags>trackmania, maniaplanet, tm, api, web, maniaapi, io</PackageTags>

<Version>1.0.9</Version>
<Version>1.0.12</Version>
<PackageReleaseNotes></PackageReleaseNotes>

<TargetFrameworks>net6.0</TargetFrameworks>
Expand Down
8 changes: 4 additions & 4 deletions Src/ManiaAPI.TrackmaniaIO/TrackmaniaIO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ public static void AddUserAgent(string userAgent)
Client.DefaultRequestHeaders.Add("User-Agent", userAgent);
}

public static async Task<CampaignCollection> GetCampaignsAsync(int page = 0, CancellationToken cancellationToken = default)
public static async Task<CampaignCollection> GetSeasonalCampaignsAsync(int page = 0, CancellationToken cancellationToken = default)
{
return await GetApiAsync<CampaignCollection>($"campaigns/{page}", cancellationToken);
return await GetApiAsync<CampaignCollection>($"campaigns/seasonal/{page}", cancellationToken);
}

public static async Task<Campaign> GetCustomCampaignAsync(int clubId, int campaignId, CancellationToken cancellationToken = default)
{
return await GetApiAsync<Campaign>($"campaign/{clubId}/{campaignId}", cancellationToken);
}

public static async Task<Campaign> GetOfficialCampaignAsync(int campaignId, CancellationToken cancellationToken = default)
public static async Task<Campaign> GetSeasonalCampaignAsync(int campaignId, CancellationToken cancellationToken = default)
{
return await GetApiAsync<Campaign>($"officialcampaign/{campaignId}", cancellationToken);
return await GetApiAsync<Campaign>($"campaign/seasonal/{campaignId}", cancellationToken);
}

public static async Task<Leaderboard> GetLeaderboardAsync(string leaderboardUid, string mapUid, CancellationToken cancellationToken = default)
Expand Down

0 comments on commit b0dbe09

Please sign in to comment.