Permalink
Browse files

Added options for client creation, fixes #82

  • Loading branch information...
1 parent f5607be commit 94e05ef4038c029ed3fa5c516abccab39e0c2df5 @pksunkara committed Dec 24, 2013
Showing with 13 additions and 8 deletions.
  1. +3 −0 lib/octonode/auth.js
  2. +8 −6 lib/octonode/client.js
  3. +2 −2 src/octonode/client.coffee
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -26,7 +26,7 @@ class HttpError extends Error
# Initiate class
class Client
- constructor: (@token) ->
+ constructor: (@token, @options) ->
# Get authenticated user instance for client
me: ->
@@ -80,7 +80,7 @@ class Client
url.format
protocol: "https:"
auth: if typeof @token == 'object' and @token.username then "#{@token.username}:#{@token.password}" else ''
- hostname: "api.github.com"
+ hostname: @options and @options.hostname or "api.github.com"
pathname: path
query: query

0 comments on commit 94e05ef

Please sign in to comment.