This repository was archived by the owner on Aug 28, 2025. It is now read-only.

Description
When calling the Gds class in the reports module the entry point is updated to "gds", however when subsequently calling an Api class it is not set back to "api". This results in the following error:
>>>from upwork.routers.hr import engagements
>>>from upwork.routers.reports.finance import earnings, billings
>>> e = engagements.Api(client).get_list("{}")
<Response [200]>
>>> r = earnings.Gds(client).get_by_freelancer('test', {'tq': quote('SELECT amount WHERE worked_on "2019-06-01" AND worked_on <= "2019-06-02"')})
<Response [200]>
>>> e = engagements.Api(client).get_list("{}")
<Response [500]>
>>> engagements.Api(client).get_list("{}")
<Response [500]>
{'version': '0.6', 'status': 'error', 'errors': [{'reason': 'other', 'message': 'Wrong URL requested'}]}
>>> client.epoint = 'api'
>>> e = engagements.Api(client).get_list("{}")
<Response [200]>
>>>
Here is an example of responsible code in the upwork.routers.reports.finanance.earnings module:
class Gds:
""" """
client = None
entry_point = "gds"
def __init__(self, client):
self.client = client
self.client.epoint = self.entry_point
Api class does not set this back to "api":
class Api:
""" """
client = None
def __init__(self, client):
self.client = client