Skip to content

Instantly share code, notes, and snippets.

View scottksmith95's full-sized avatar

Scott Smith scottksmith95

View GitHub Profile
@scottksmith95
scottksmith95 / ApiRequest.cs
Created June 25, 2012 15:44
JSON from API as a string
using System;
using System.Net;
public class ApiRequest
{
readonly static WebClient WebClient = new WebClient();
public static string GetJson(Uri uri)
{
return WebClient.DownloadString(uri);
@scottksmith95
scottksmith95 / ApiRequest.cs
Created June 25, 2012 15:47
JSON from API as an object using JavaScriptSerializer
using System;
using System.Net;
public class ApiRequest
{
readonly static WebClient WebClient = new WebClient();
public static string GetJson(Uri uri)
{
return WebClient.DownloadString(uri);
@scottksmith95
scottksmith95 / ApiRequest.cs
Created June 25, 2012 15:50
JSON from API as an object using Json.Net
using System;
using System.Net;
public class ApiRequest
{
readonly static WebClient WebClient = new WebClient();
public static string GetJson(Uri uri)
{
return WebClient.DownloadString(uri);
@scottksmith95
scottksmith95 / ApiRequest.cs
Created June 25, 2012 15:56
JSON from API as a GitHubUser using Json.Net
using System;
using System.Net;
public class ApiRequest
{
readonly static WebClient WebClient = new WebClient();
public static string GetJson(Uri uri)
{
return WebClient.DownloadString(uri);
@scottksmith95
scottksmith95 / ApiRequest.cs
Created June 25, 2012 16:10
JSON from API as a GitHubUser using Json.Net Enhanced
using System;
using System.Net;
public class ApiRequest
{
readonly static WebClient WebClient = new WebClient();
public static string GetJson(Uri uri)
{
return WebClient.DownloadString(uri);
{
"name": "Bit Munkey",
"title": "Mascot and Waterboy",
"location": "Tamarindo, Costa Rica",
"website_link": "https://coderbits.com",
"bio": "Born in the lush jungles of the Guanacaste region of Costa Rica, Bit Munkey enjoys surfing, scuba diving, vine swinging, and of course ... bananas!",
"created": "2012-08-24T18:40:43Z",
"updated": "2013-08-22T18:35:52Z",
"views": 4540,
"rank": 4386,
@scottksmith95
scottksmith95 / index.html
Last active December 14, 2015 00:39
How to use the coderbits profile widget on your website or blog
<!-- Include the following CSS and Javascript in your page -->
<link href="https://coderbits.com/content/widget/coderbits.css" media="all" rel="stylesheet" type="text/css">
<script src="https://coderbits.com/content/widget/coderbits.js"></script>
<!-- Place the following in the page where you want the widget to render and set your username -->
<section id="coderbits" data-coderbits-username="<your username>"></section>
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>
$ 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"
[
{
"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": "",