-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from timo-schmid/endpoint-search-streaming
Endpoints Search.repositories and Search.users
- Loading branch information
Showing
20 changed files
with
11,336 additions
and
203 deletions.
There are no files selected for viewing
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
16 changes: 16 additions & 0 deletions
16
core/src/main/scala/io/chrisdavenport/github/data/Order.scala
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.chrisdavenport.github.data | ||
|
||
sealed trait Order | ||
|
||
object Order { | ||
|
||
case object Ascending extends Order | ||
case object Descending extends Order | ||
|
||
def toOptionalParam(order: Order): Option[String] = | ||
order match { | ||
case Ascending => Some("asc") | ||
case Descending => Some("desc") | ||
} | ||
|
||
} |
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
31 changes: 31 additions & 0 deletions
31
core/src/main/scala/io/chrisdavenport/github/data/Sort.scala
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package io.chrisdavenport.github.data | ||
|
||
sealed trait Sort | ||
|
||
object Sort { | ||
|
||
case object BestMatch extends Repository with User | ||
case object Stars extends Repository | ||
case object Forks extends Repository | ||
case object HelpWantedIssues extends Repository | ||
case object Updated extends Repository | ||
case object Followers extends User | ||
case object Repositories extends User | ||
case object Joined extends User | ||
|
||
sealed trait Repository extends io.chrisdavenport.github.data.Sort | ||
sealed trait User extends io.chrisdavenport.github.data.Sort | ||
|
||
def toOptionalParam(sort: Sort): Option[String] = | ||
sort match { | ||
case BestMatch => None | ||
case Stars => Some("stars") | ||
case Forks => Some("forks") | ||
case HelpWantedIssues => Some("help-wanted-issues") | ||
case Updated => Some("updated") | ||
case Followers => Some("followers") | ||
case Repositories => Some("repositories") | ||
case Joined => Some("joined") | ||
} | ||
|
||
} |
3 changes: 0 additions & 3 deletions
3
core/src/main/scala/io/chrisdavenport/github/data/Teams.scala
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
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
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
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
Oops, something went wrong.