Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamlined the getting started #126

Merged
merged 2 commits into from
May 10, 2017
Merged

Streamlined the getting started #126

merged 2 commits into from
May 10, 2017

Conversation

BenFradet
Copy link
Contributor

No description provided.

@codecov-io
Copy link

codecov-io commented May 9, 2017

Codecov Report

Merging #126 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #126   +/-   ##
=======================================
  Coverage   88.44%   88.44%           
=======================================
  Files          38       38           
  Lines         528      528           
  Branches        2        2           
=======================================
  Hits          467      467           
  Misses         61       61

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f8233d9...8142610. Read the comment docs.

Copy link
Member

@juanpedromoreno juanpedromoreno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I've added a minor change suggestion though :shipit:


```tut:silent
val user1 = Github(accessToken).users.get("rafaparadela")
```

user1 in this case `Free[GHException Xor GHResult[User], User]` and we can run (`foldMap`) with `exec[M[_], C]` where `M[_]` represent any type container that implements `MonadError[M, Throwable]`, for instance `cats.Eval`; and C represents a valid implementation of an HttpClient. The previously mentioned implicit classes carry already set up instances for working with `scalaj` (for JVM-compatible apps) and `roshttp` (for scala-js-compatible apps). Take into account that in the latter case, you can only use `Future` in the place of `M[_]`:
`user1` in this case `Free[GHException Xor GHResult[User], User]` which we can run (`foldMap`) with
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- `user1` in this case `Free[GHException Xor GHResult[User], User]` which we
+ `user1` in this case `Free[GitHub4s, Either[GHException, GHResult[User]]]` which we

Copy link
Member

@juanpedromoreno juanpedromoreno May 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it's a GHIO[GHResponse[User]], if we consider type aliases:

type GHIO[A] = Free[GitHub4s, A]
type GHResponse[A] = Either[GHException, GHResult[A]]

@BenFradet
Copy link
Contributor Author

@juanpedromoreno Thanks for your review, I think I've clarified things in 84b7246 👍

Copy link
Contributor

@fedefernandez fedefernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Please, rebase your branch before the merge, thanks!

@BenFradet
Copy link
Contributor Author

@fedefernandez good to go 👍

@fedefernandez fedefernandez merged commit a476398 into master May 10, 2017
@fedefernandez fedefernandez deleted the bf-getting-started branch May 10, 2017 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants