Skip to content

Instantly share code, notes, and snippets.

@brentsowers1
Created March 6, 2014 02:47
Show Gist options
  • Save brentsowers1/9381290 to your computer and use it in GitHub Desktop.
Save brentsowers1/9381290 to your computer and use it in GitHub Desktop.
Github Repo case class
/**
* A github user
*/
case class User(login: String, // login name of hte user
id: Int, // numeric github ID
avatar_url: String, // URL to their avatar pic
url: String) // API url to retrieve JSON of the user
/**
* A single code repo.
*/
case class Repo(url: String, // URL to get JSON for this repo via the API
html_url: String, // web page for this repo
clone_url: String, // HTTP clone URL
git_url: String, // git clone url
ssh_url: String, // ssh clone url
svn_url: String, // URL to clone as svn
owner: User, // The owner of this
name: String, // name of this repository
description: String, // optional description of this repo
homepage: String, // optional URL of the home page for this project (not necessarily github)
language: String, // optional programming language
`private`: Boolean, // true/false for whether this is a private repo
fork: Boolean, // true if this was forked from another repo
forks: Int, // number of forks made from this repo
watchers: Int, // number of users watching
size: Int, // number of lines of code?
open_issues: Int, // number of open issues?
pushed_at: java.util.Date, // last time repo was pushed to
created_at: java.util.Date) // when the repo was created
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment