Skip to content

Commit

Permalink
The canonical URL for the Patreon API has moved to patreon.com/api
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip James committed Jan 2, 2018
1 parent 975d0ea commit bd97f5c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion patreon/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __get_jsonapi_doc(self, suffix):

def __get_json(self, suffix):
response = requests.get(
"https://api.patreon.com/oauth2/api/{}".format(suffix),
"https://www.patreon.com/api/oauth2/api/{}".format(suffix),
headers={'Authorization': "Bearer {}".format(self.access_token)}
)
return response.json()
Expand Down
2 changes: 1 addition & 1 deletion patreon/api_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from patreon.version_compatibility.utc_timezone import utc_timezone

MOCK_CAMPAIGN_ID = 12
API_ROOT_ENDPOINT = 'https://api.patreon.com/oauth2/api/'
API_ROOT_ENDPOINT = 'https://www.patreon.com/api/oauth2/api/'
MOCK_ACCESS_TOKEN = 'mock token'
MOCK_CURSOR_VALUE = 'Mock Cursor Value'

Expand Down
2 changes: 1 addition & 1 deletion patreon/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def refresh_token(self, refresh_token, redirect_uri):
@staticmethod
def __update_token(params):
response = requests.post(
"https://api.patreon.com/oauth2/token",
"https://www.patreon.com/api/oauth2/token",
params=params
)
return response.json()
4 changes: 2 additions & 2 deletions patreon/oauth_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_get_tokens_requests_tokens_as_expected(post, client):
)

post.assert_called_once_with(
'https://api.patreon.com/oauth2/token',
'https://www.patreon.com/api/oauth2/token',
params={
'grant_type': 'authorization_code',
'code': MOCK_CODE,
Expand All @@ -42,7 +42,7 @@ def test_refresh_token_gets_a_new_token_as_expected(post, client):
)

post.assert_called_once_with(
'https://api.patreon.com/oauth2/token',
'https://www.patreon.com/api/oauth2/token',
params={
'grant_type': 'refresh_token',
'refresh_token': MOCK_REFRESH_TOKEN,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def is_running_tests():
description=DESCRIPTION,
url='http://github.com/Patreon/patreon-python',
author='Patreon',
author_email='david@patreon.com',
author_email='platform@patreon.com',
license='Apache 2.0',
packages=find_packages(
exclude=['examples', 'examples.*', 'test', 'test.*']
Expand Down

0 comments on commit bd97f5c

Please sign in to comment.