Skip to content

Instantly share code, notes, and snippets.

@pragdave
Created April 23, 2013 20:05
Show Gist options
  • Save pragdave/5446949 to your computer and use it in GitHub Desktop.
Save pragdave/5446949 to your computer and use it in GitHub Desktop.
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