Skip to content

Instantly share code, notes, and snippets.

@mravey
Created July 31, 2013 14:45
Show Gist options
  • Save mravey/6122610 to your computer and use it in GitHub Desktop.
Save mravey/6122610 to your computer and use it in GitHub Desktop.
Access Bime API in C#
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