{"action":"created","issue":{"url":"https://api.github.com/repos/scala-exercises/evaluator/issues/19","repository_url":"https://api.github.com/repos/scala-exercises/evaluator","labels_url":"https://api.github.com/repos/scala-exercises/evaluator/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/scala-exercises/evaluator/issues/19/comments","events_url":"https://api.github.com/repos/scala-exercises/evaluator/issues/19/events","html_url":"https://github.com/scala-exercises/evaluator/pull/19","id":169930045,"number":19,"title":"JP - Adds free algebra for Evaluator Client API","user":{"login":"juanpedromoreno","id":4879373,"avatar_url":"https://avatars.githubusercontent.com/u/4879373?v=3","gravatar_id":"","url":"https://api.github.com/users/juanpedromoreno","html_url":"https://github.com/juanpedromoreno","followers_url":"https://api.github.com/users/juanpedromoreno/followers","following_url":"https://api.github.com/users/juanpedromoreno/following{/other_user}","gists_url":"https://api.github.com/users/juanpedromoreno/gists{/gist_id}","starred_url":"https://api.github.com/users/juanpedromoreno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanpedromoreno/subscriptions","organizations_url":"https://api.github.com/users/juanpedromoreno/orgs","repos_url":"https://api.github.com/users/juanpedromoreno/repos","events_url":"https://api.github.com/users/juanpedromoreno/events{/privacy}","received_events_url":"https://api.github.com/users/juanpedromoreno/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-08T13:58:17Z","updated_at":"2016-08-08T14:25:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scala-exercises/evaluator/pulls/19","html_url":"https://github.com/scala-exercises/evaluator/pull/19","diff_url":"https://github.com/scala-exercises/evaluator/pull/19.diff","patch_url":"https://github.com/scala-exercises/evaluator/pull/19.patch"},"body":"This PR brings a preliminary version of the free algebra to interact with the evaluator service.\r\n\r\nIn this way, this would be an example of use case:\r\n\r\n```scala\r\nval client = new EvaluatorClient(\"<evaluator-service-url>\",  \"<evaluator-auth-key>\")\r\n\r\n  val response: Free[EvaluatorOp, EvaluationResponse[EvalResponse]] =\r\n    client.api.evaluates(\r\n      dependencies = List(\r\n        Dependency(\r\n          groupId = \"org.typelevel\",\r\n          artifactId = \"cats_2.11\",\r\n          version = \"0.6.1\")),\r\n      code = \"{import cats._; Eval.now(42).value}\")\r\n\r\n  response.exec[Eval].value match {\r\n    case Xor.Right(EvaluationResult(result, _, _)) ⇒\r\n      println(result)\r\n    case Xor.Left(ex) ⇒ throw ex\r\n  }\r\n```\r\n\r\nPlease, @dialelo @raulraja Could you review it? Thanks!"},"comment":{"url":"https://api.github.com/repos/scala-exercises/evaluator/issues/comments/238253970","html_url":"https://github.com/scala-exercises/evaluator/pull/19#issuecomment-238253970","issue_url":"https://api.github.com/repos/scala-exercises/evaluator/issues/19","id":238253970,"user":{"login":"dialelo","id":409039,"avatar_url":"https://avatars.githubusercontent.com/u/409039?v=3","gravatar_id":"","url":"https://api.github.com/users/dialelo","html_url":"https://github.com/dialelo","followers_url":"https://api.github.com/users/dialelo/followers","following_url":"https://api.github.com/users/dialelo/following{/other_user}","gists_url":"https://api.github.com/users/dialelo/gists{/gist_id}","starred_url":"https://api.github.com/users/dialelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dialelo/subscriptions","organizations_url":"https://api.github.com/users/dialelo/orgs","repos_url":"https://api.github.com/users/dialelo/repos","events_url":"https://api.github.com/users/dialelo/events{/privacy}","received_events_url":"https://api.github.com/users/dialelo/received_events","type":"User","site_admin":false},"created_at":"2016-08-08T14:25:27Z","updated_at":"2016-08-08T14:25:27Z","body":"Other than the comment LGTM!"}}
{"actor":{"display_login":"dialelo"}}