Skip to content

Commit

Permalink
Add proxies support to Api.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jeflopo committed May 19, 2015
1 parent 74615ec commit fa73c49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tumblpy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class Tumblpy(object):
def __init__(self, app_key=None, app_secret=None, oauth_token=None,
oauth_token_secret=None, headers=None):
oauth_token_secret=None, headers=None, proxies=None):

# Define some API URLs real quick
self.base_api_url = 'https://api.tumblr.com'
Expand Down Expand Up @@ -42,6 +42,7 @@ def __init__(self, app_key=None, app_secret=None, oauth_token=None,
self.oauth_token, self.oauth_token_secret)

self.client = requests.Session()
self.client.proxies = proxies
self.client.headers = req_headers
self.client.auth = auth

Expand Down

0 comments on commit fa73c49

Please sign in to comment.