Created
April 23, 2013 20:05
-
-
Save pragdave/5446949 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
defmodule Issues.GithubIssues do | |
alias HTTPotion.Response | |
def fetch(user, project) do | |
HTTPotion.start | |
case HTTPotion.get(issues_url(user, project)) do | |
Response[body: body, status_code: status, headers: headers ] -> | |
IO.puts inspect status | |
IO.puts inspect headers | |
end | |
end | |
def issues_url(user, project) do | |
"https://api.github.com/repos/#{user}/#{project}/issues" | |
end | |
end | |
Issues.GithubIssues.fetch("elixir-lang", "elixir") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment