You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用C#获取LOL即将到来的赛事(含GameID)遇问题求助

求助:调用PandaScore API获取LOL未来赛事持续报错

我需要获取LOL的未来赛事数据(最好包含GameID),试过Riotsharp等多个API,目前只有PandaScore的接口适配需求,但无论怎么修改官网示例代码的参数,调用后总是收到错误信息。有没有使用过PandaScore或者遇到类似问题的朋友能帮忙解决?

官方提供的示例代码如下:

using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("https://api.pandascore.co/lol/matches/upcoming?sort=&page=1&per_page=50"),
    Headers =
    {
        { "accept", "application/json" },
        { "authorization", "Bearer /*我的API密钥,在PandaScore官网生成*/" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

内容的提问来源于stack exchange,提问作者Samsuel

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.16 01:31:08