Created
July 31, 2013 14:45
-
-
Save mravey/6122610 to your computer and use it in GitHub Desktop.
Access Bime API in C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Net; | |
namespace Test | |
{ | |
class MainClass | |
{ | |
public static void Main (string[] args) | |
{ | |
string token = "rtcIe1nbtwhG8fjfSPnUiIM4hWegrWGNGeRokHdI"; //Replace by your own token | |
string base_url = "https://api.bimeapp.com/v2"; | |
string dashboards_url = base_url + "/dashboards/" + "?access_token=" + token; | |
HttpWebRequest request = WebRequest.Create(dashboards_url) as HttpWebRequest; | |
request.Method = "GET"; | |
request.ContentType = "application/json"; | |
StreamReader reader = new StreamReader(request.GetResponse ().GetResponseStream ()); | |
string data = reader.ReadToEnd(); | |
Console.WriteLine(data); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment