我如何使用Quandl API?

时间:2016-01-25 22:03:58

标签: c# quandl

我正在使用C#,我想知道如何使用Quandl API通过xml获取数据,就像股票价格一样。我之前从未使用过API,所以我真的输了。我正在查看他们的快速入门指南,但我不明白像" https://www.quandl.com/api/v3/datasets/WIKI/FB.xml"给你什么。如何使API工作?我甚至可以用C#做​​到吗?

1 个答案:

答案 0 :(得分:1)

使用javascript,您宁愿使用所选数据集的json格式:https://www.quandl.com/api/v3/datasets/WIKI/FB.json,而不是https://www.quandl.com/api/v3/datasets/WIKI/FB.xml。 然后编写一个经典的XMLHttpRequest:

    let image : UIImage = UIImage(named:"w1")!
    let imageData:NSData? =   UIImageJPEGRepresentation(image, 1.0)
    let encodeString:String = imageData!.base64EncodedStringWithOptions(NSDataBase64EncodingOptions.Encoding64CharacterLineLength)