Skip to content
This repository was archived by the owner on Oct 9, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions odesk/namespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# (C) 2010-2014 oDesk
import os
from .config import BASE_URL
import posixpath

__all__ = ['Namespace', 'GdsNamespace']

Expand All @@ -15,7 +16,7 @@ class Namespace(object):

"""

base_url = os.path.join(BASE_URL, 'api/')
base_url = posixpath.join(BASE_URL, 'api/')
api_url = None
version = 1

Expand Down Expand Up @@ -45,7 +46,7 @@ def delete(self, url, data=None):

class GdsNamespace(Namespace):
"""Gds API only allows GET requests."""
base_url = os.path.join(BASE_URL, 'gds/')
base_url = posixpath.join(BASE_URL, 'gds/')

def post(self, url, data=None):
return None
Expand Down
7 changes: 4 additions & 3 deletions odesk/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import urllib
import oauth2 as oauth
import logging
import posixpath

from .config import BASE_URL

Expand All @@ -27,10 +28,10 @@ class OAuth(Namespace):
api_url = 'auth/'
version = 1

request_token_url = os.path.join(
request_token_url = posixpath.join(
BASE_URL, 'api/auth/v1/oauth/token/request')
authorize_url = os.path.join(BASE_URL, 'services/api/auth')
access_token_url = os.path.join(BASE_URL, 'api/auth/v1/oauth/token/access')
authorize_url = posixpath.join(BASE_URL, 'services/api/auth')
access_token_url = posixpath.join(BASE_URL, 'api/auth/v1/oauth/token/access')

def get_oauth_params(self, url, key, secret, data=None, method='GET',
to_header=False, to_dict=False):
Expand Down