Add Search.repository endpoint#25
Conversation
core/src/main/scala/io/chrisdavenport/github/endpoints/Search.scala
Outdated
Show resolved
Hide resolved
Co-Authored-By: Christopher Davenport <chris@christopherdavenport.tech>
|
|
||
| object Search { | ||
|
|
||
| def repository[F[_]: Sync]( |
There was a problem hiding this comment.
Can you link to the appropriate endpoint documentation for easy debugging in the future?
|
I would love a unit test on the endpoint generating the request you expect, but understand and don't always live up to that myself. |
|
Makes sense, I'll add one! |
|
|
||
| "Search" should { | ||
|
|
||
| "return a valid search result" in { |
There was a problem hiding this comment.
Hope this is ok. It's just testing the parsing, but not the passed params etc.
There was a problem hiding this comment.
Something is better to nothing.
| .stream | ||
|
|
||
| private val GITHUB_URI: Uri = uri"https://api.github.com" | ||
| private val GITHUB_URI: Uri = uri"https://api.github.com/" |
There was a problem hiding this comment.
Turns out this didn't work with relative urls anymore (probably due to the missing slash).
Adding the slash at the end fixes it.
There was a problem hiding this comment.
kk. Expect that will then be required as well for enterprise versions of that uri. Things to note when we get a bug report.
There was a problem hiding this comment.
Yes, in fact I remember I had to add the / at the end of the uri in the enterprise version to make it work.
Adds a new endpoint to search for repositories.
Some test code I've used to test: