Skip to content

Instantly share code, notes, and snippets.

View scottksmith95's full-sized avatar

Scott Smith scottksmith95

View GitHub Profile
[JsonProperty("avatar_url")]
public string AvatarUrl { get; set; }
public string avatar_url{ get; set; }
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
class Program
{
const string GitHubPath = "https://api.github.com/users/scottksmith95/repos";
static void Main(string[] args)
{
public class Owner
{
public string avatar_url { get; set; }
public string login { get; set; }
public string url { get; set; }
public string gravatar_id { get; set; }
public int id { get; set; }
}
public class RootObject
using System;
using Newtonsoft.Json;
class Program
{
const string GitHubPath = "https://api.github.com/users/scottksmith95/repos";
static void Main(string[] args)
{
var gitHubUri = new Uri(GitHubPath);
using System;
using System.Web.Script.Serialization;
class Program
{
const string GitHubPath = "https://api.github.com/users/scottksmith95/repos";
static readonly JavaScriptSerializer Serializer = new JavaScriptSerializer();
static void Main(string[] args)
using System;
using System.Net;
public class ApiRequest
{
readonly static WebClient WebClient = new WebClient();
public static string GetJson(Uri uri)
{
return WebClient.DownloadString(uri);
[
{
"description": "GitHub API access and OAuth connect support for the github.com API",
"has_wiki": true,
"svn_url": "https://github.com/scottksmith95/CSharp.GitHub",
"open_issues": 0,
"language": "C#",
"watchers": 1,
"fork": false,
"homepage": "",
$ curl -i https://api.github.com
HTTP/1.1 302 Found
Server: nginx/1.0.12
Date: Mon, 20 Feb 2012 11:15:49 GMT
Content-Type: text/html;charset=utf-8
Connection: keep-alive
Status: 302 Found
X-RateLimit-Limit: 5000
ETag: "d41d8cd98f00b204e9800998ecf8427e"
using Algolia.Search;
using Newtonsoft.Json.Linq;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Algolia.Search
{
/// <summary>
/// Helper class for making it simpler to work with an index.
/// </summary>