@@ -25,9 +25,9 @@ val accessToken = sys.env.get("GITHUB4S_ACCESS_TOKEN")
2525
2626In order for Github4s to work, you'll need an appropriate implicit ` ExecutionContext ` in Scope.
2727
28- Github4s is a Tagless Final API .
28+ Github4s uses [ Tagless Final encoding ] ( https://typelevel.org/blog/2017/12/27/optimizing-final-tagless.html ) .
2929
30- Every Github4s API call returns an ` F[GHResponse[A]] ` where ` F ` has an instance of [ cats.effect.ConcurrentEffect] [ cats-concurrent-effect ]
30+ Every Github4s API call returns an ` F[GHResponse[A]] ` where ` F ` has an instance of [ cats.effect.ConcurrentEffect] [ cats-concurrent-effect ] .
3131
3232` GHResponse[A] ` is, in turn, a type alias for ` Either[GHException, GHResult[A]] ` .
3333
@@ -46,6 +46,20 @@ val user1 = Github[IO](accessToken).users.get("rafaparadela")
4646
4747` user1 ` in this case is a ` IO[GHResponse[User]] ` .
4848
49+ ### Using ` F[_]: cats.effect.ConcurrentEffect `
50+
51+ ``` scala mdoc:compile-only
52+ object ProgramF {
53+ import cats .effect .ConcurrentEffect
54+ import scala .concurrent .ExecutionContext
55+ import github4s .Github
56+ import github4s .GithubResponses .GHResponse
57+ import github4s .domain .User
58+
59+ def u1 [F [_]: ConcurrentEffect ](implicit ec : ExecutionContext ): F [GHResponse [User ]] =
60+ Github [F ](accessToken).users.get(" juanpedromoreno" )
61+ }
62+ ```
4963
5064### Using ` cats.effect.IO `
5165
@@ -144,4 +158,4 @@ object ProgramEvalWithHeaders {
144158
145159[ access-token ] : https://github.com/settings/tokens
146160[ cats-concurrent-effect ] : https://typelevel.org/cats-effect/typeclasses/concurrent-effect.html
147- [ monix-task ] : https://monix.io/docs/3x/eval/task.html
161+ [ monix-task ] : https://monix.io/docs/3x/eval/task.html
0 commit comments