如何使用c#拨打boardgamegeek api? [英] How do I make calls to a boardgamegeek api using c#?

查看:80
本文介绍了如何使用c#拨打boardgamegeek api?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我打电话给 www.boardgamegeek.com API。



I我正在使用下面的代码:

Hi All,

I am calling www.boardgamegeek.com API.

I am using below code:

HttpClient client = new HttpClient();
        client.BaseAddress = new Uri("http://www.boardgamegeek.com/xmlapi/collection/dhasmain");
        client.DefaultRequestHeaders.Accept.Add(
        new MediaTypeWithQualityHeaderValue("application/json"));

        // List data response.
        HttpResponseMessage response = client.GetAsync("?own=1").Result; 
        if (response.IsSuccessStatusCode)
        {
            var dataObjects = response.Content.ReadAsStringAsync().Result;
        }
        else
        {
            Console.WriteLine("{0} ({1})", (int)response.StatusCode, response.ReasonPhrase);
        }





但显示 结果=尚未计算



请有人建议我是什么问题。



提前致谢,

Rohit



But it is showing Result=Not yet computed

Please anyone suggest me what is the issue.

Thanks in advance,
Rohit

推荐答案

如果您对第三方API有疑问,请询问编写API的人,而不是一群人从来没有听说过。
If you have questions about a 3rd party API like that, you ask the people who wrote the API, not a bunch of people who have never heard of it.


这篇关于如何使用c#拨打boardgamegeek api?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆