Created
January 29, 2017 05:16
-
-
Save Sohojoe/c0fda668ec533a357c5806adb692800f to your computer and use it in GitHub Desktop.
New Public Gist
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
// App.Config | |
// Created by Sohojoe on 2017/01/28 | |
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.Linq; | |
using ServiceStack; | |
using ServiceStack.Text; | |
public class GithubRepository | |
{ | |
public string Name { get; set; } | |
public string Description { get; set; } | |
public string Url { get; set; } | |
public string Homepage { get; set; } | |
public string Language { get; set; } | |
public int Watchers { get; set; } | |
public int Forks { get; set; } | |
public override string ToString() => Name; | |
} | |
var orgName = "ServiceStack"; | |
var orgRepos = $"https://api.github.com/orgs/{orgName}/repos" | |
.GetJsonFromUrl(httpReq => httpReq.UserAgent = "Gistlyn") | |
.FromJson<GithubRepository[]>() | |
.OrderByDescending(x => x.Watchers) | |
.Take(165) | |
.ToList(); | |
"Top 5 {0} Github Repositories:".Print(orgName); | |
orgRepos.PrintDump(); | |
// Save a copy of this *public* Gist by clicking the "Save As" below |
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
<?xml version="1.0" encoding="utf-8"?> | |
<packages> | |
<package id="ServiceStack.Text" version="4.0.62" targetFramework="net45" /> | |
<package id="ServiceStack.Client" version="4.0.62" targetFramework="net45" /> | |
<package id="ServiceStack.Interfaces" version="4.0.62" targetFramework="net45" /> | |
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="net45" /> | |
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net45" /> | |
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" /> | |
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" /> | |
<package id="Microsoft.Bcl.Build" version="1.0.14" /> | |
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> | |
<package id="Orions.Cloud.Client.Http" version="2.14.35" targetFramework="net45" /> | |
</packages> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment