Skip to content

Instantly share code, notes, and snippets.

Last active Nov 10, 2020
What would you like to do?
New Public Gist
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";
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
var orgRepos = $"{orgName}/repos"
.GetJsonFromUrl(httpReq => httpReq.UserAgent = "Gistlyn")
.OrderByDescending(x => x.Watchers)
"Top 5 {0} Github Repositories:".Print(orgName);
// Save a copy of this *public* Gist by clicking the "Save As" below
<?xml version="1.0" encoding="utf-8"?>
<package id="System.Memory" version="4.5.4" targetFramework="net45" />
<package id="ServiceStack.Text" version="5.10.0" targetFramework="net45" />
<package id="ServiceStack.Client" version="5.10.0" targetFramework="net45" />
<package id="ServiceStack.Common" version="5.10.0" targetFramework="net45" />
<package id="ServiceStack.Interfaces" version="5.10.0" targetFramework="net45" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment