Permalink
Browse files

Added optional base_url argument to GitHub.__init__.

A proper abstraction to

  github.BaseEndPoint.BASE_URL = "/something/else"
  • Loading branch information...
Mark Ellzey authored and dustin committed May 4, 2011
1 parent 4552978 commit 15c995ae67fb784d5e401e3af59fbd639d0a9185
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/github.py
View
@@ -628,11 +628,14 @@ def addRepoToTeam(self, team_id, user, repo):
class GitHub(object):
"""Interface to github."""
- def __init__(self, user=None, token=None, fetcher=default_fetcher):
- self.user = user
- self.token = token
+ def __init__(self, user=None, token=None, fetcher=default_fetcher, base_url=None):
+ self.user = user
+ self.token = token
self.fetcher = fetcher
+ if base_url:
+ BaseEndpoint.BASE_URL = base_url
+
@property
def users(self):
"""Get access to the user API."""

0 comments on commit 15c995a

Please sign in to comment.