Skip to content

Commit

Permalink
rearrange
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Apr 14, 2014
1 parent 531b5a4 commit 07cd7e3
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions core/src/main/scala/requests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@ case class Repos(owner: String, name: String) extends Method {
def complete = _ / "repos" / owner / name
}

/** represents git blob request.
* @see http://developer.github.com/v3/git/blobs/
*/
case class GitBlobs(repo: Repos, sha: String, override val mime: Option[String]) extends Method {
def raw = copy(mime = Some("application/vnd.github.raw"))

val complete = { req: Req =>
repo.complete(req) / "git" / "blobs" / sha
}
}

/** represents git reference request.
* @see http://developer.github.com/v3/git/refs/
*/
Expand Down Expand Up @@ -62,6 +51,17 @@ case class GitTrees(repo: Repos, sha: String, params: Map[String, String] = Map(
def complete = repo.complete(_) / "git" / "trees" / sha <<? params
}

/** represents git blob request.
* @see http://developer.github.com/v3/git/blobs/
*/
case class GitBlobs(repo: Repos, sha: String, override val mime: Option[String]) extends Method {
def raw = copy(mime = Some("application/vnd.github.raw"))

val complete = { req: Req =>
repo.complete(req) / "git" / "blobs" / sha
}
}

trait Method extends (Req => Req) {
def mime: Option[String] = Some("application/json")
def complete: Req => Req
Expand Down

0 comments on commit 07cd7e3

Please sign in to comment.