Skip to content

Commit

Permalink
Touch up the README a tad
Browse files Browse the repository at this point in the history
  • Loading branch information
scrogson committed Nov 3, 2015
1 parent 0917fd0 commit 00aa965
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ defmodule GitHub do

# Public API

def new do
def client do
OAuth2.Client.new([
strategy: __MODULE__,
client_id: "abc123",
Expand All @@ -86,14 +86,14 @@ defmodule GitHub do
end

def authorize_url!(params \\ []) do
new()
client()
|> put_param(:scope, "user,public_repo")
|> OAuth2.Client.authorize_url!(params)
end

# you can pass options to the underlying http library via `options` parameter
def get_token!(params \\ [], headers \\ [], options \\ []) do
OAuth2.Client.get_token!(new(), params, headers, options)
OAuth2.Client.get_token!(client(), params, headers, options)
end

# Strategy Callbacks
Expand Down Expand Up @@ -138,7 +138,6 @@ case OAuth2.AccessToken.get(token, "/user") do
{:error, %OAuth2.Error{reason: reason}} ->
Logger.error("Error: #{inspect reason}")
end

```

## Examples
Expand Down

0 comments on commit 00aa965

Please sign in to comment.