Skip to content

Readme example: No response for GetSingleCategoryRecords #10

@MuxaJlbl4

Description

@MuxaJlbl4

Hello! Thanks for your wrapper implementation)
I'm trying to use example code from README.md, but can't get response with GetSingleCategoryRecords()
What am I doing wrong?

Visual Studio 2022
.Net Framework 4.8 Console App + SpeedrunDotComAPI from NuGet

using System;
using System.Linq;
using System.Threading.Tasks;
using SpeedrunDotComAPI;
using SpeedrunDotComAPI.Categories;
using SpeedrunDotComAPI.Leaderboards;
using SpeedrunDotComAPI.Runs;

namespace AsyncConsole
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Task task = Task.Run(async () => await PrintAsync());
            Console.ReadKey();
        }
        static async Task PrintAsync()
        {
            SRCApiClient src = new SRCApiClient();

            // Success request:
            CategoryModel[] sm64Categories = await src.Games.GetSingleGameCategories("sm64");
            CategoryModel seventyStar = sm64Categories.First(c => c.Name == "70 Star");
            Console.WriteLine(seventyStar.Rules.ToString());

            // No response:
            LeaderboardModel[] leaderboards = await src.Categories.GetSingleCategoryRecords(seventyStar.Id);
            RunPlaceModel worldRecord = leaderboards[0].Runs.First(r => r.Place == 1);
            Console.WriteLine(worldRecord.ToString());
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions