Title: client.epoint is modified by Gds class but not by Api · Issue #53 · upwork/python-upwork · GitHub
Open Graph Title: client.epoint is modified by Gds class but not by Api · Issue #53 · upwork/python-upwork
X Title: client.epoint is modified by Gds class but not by Api · Issue #53 · upwork/python-upwork
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 engag...
Open Graph 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...
X 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...
Opengraph URL: https://github.com/upwork/python-upwork/issues/53
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"client.epoint is modified by Gds class but not by Api","articleBody":"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: \r\n\r\n```\r\n\u003e\u003e\u003efrom upwork.routers.hr import engagements\r\n\u003e\u003e\u003efrom upwork.routers.reports.finance import earnings, billings\r\n\u003e\u003e\u003e e = engagements.Api(client).get_list(\"{}\")\r\n\u003cResponse [200]\u003e\r\n\u003e\u003e\u003e r = earnings.Gds(client).get_by_freelancer('test', {'tq': quote('SELECT amount WHERE worked_on \"2019-06-01\" AND worked_on \u003c= \"2019-06-02\"')})\r\n\u003cResponse [200]\u003e\r\n\u003e\u003e\u003e e = engagements.Api(client).get_list(\"{}\")\r\n\u003cResponse [500]\u003e\r\n\u003e\u003e\u003e engagements.Api(client).get_list(\"{}\")\r\n\u003cResponse [500]\u003e\r\n{'version': '0.6', 'status': 'error', 'errors': [{'reason': 'other', 'message': 'Wrong URL requested'}]}\r\n\u003e\u003e\u003e client.epoint = 'api'\r\n\u003e\u003e\u003e e = engagements.Api(client).get_list(\"{}\")\r\n\u003cResponse [200]\u003e\r\n\u003e\u003e\u003e\r\n```\r\n\r\nHere is an example of responsible code in the `upwork.routers.reports.finanance.earnings` module:\r\n\r\n```\r\nclass Gds:\r\n \"\"\" \"\"\"\r\n\r\n client = None\r\n entry_point = \"gds\"\r\n\r\n def __init__(self, client):\r\n self.client = client\r\n self.client.epoint = self.entry_point\r\n\r\n```\r\n\r\nApi class does not set this back to \"api\":\r\n\r\n```\r\nclass Api:\r\n \"\"\" \"\"\"\r\n\r\n client = None\r\n\r\n def __init__(self, client):\r\n self.client = client\r\n```","author":{"url":"https://github.com/ChristianTheConsultant","@type":"Person","name":"ChristianTheConsultant"},"datePublished":"2020-12-03T09:32:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/53/python-upwork/issues/53"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:31a8814a-301f-8eff-8b83-678879247daf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B89E:BCA9F:33C5EE7:458A9C1:69808F9D |
| html-safe-nonce | ee5aba4a37f3020369f9e41eaeae2494169bbb2174537178bf0dfb286c62ba2f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODlFOkJDQTlGOjMzQzVFRTc6NDU4QTlDMTo2OTgwOEY5RCIsInZpc2l0b3JfaWQiOiIzOTY0MjM3MDU2Mjg4MjY0MDkzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d3c3bfea42fcbb86dc7240a6c10453f36c9735751ec8b3c3c8ef24045db20d1d |
| hovercard-subject-tag | issue:756025692 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/upwork/python-upwork/53/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3fb8575d7dc82470c20ca120e45bbc7a2ddf48305c2e6bf8acd3a0ea682022da/upwork/python-upwork/issues/53 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3fb8575d7dc82470c20ca120e45bbc7a2ddf48305c2e6bf8acd3a0ea682022da/upwork/python-upwork/issues/53 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ChristianTheConsultant |
| hostname | github.com |
| expected-hostname | github.com |
| None | 469777838102ab297ec4fcad28d2f2800ba15f98fafe1027761c30ba1171be52 |
| turbo-cache-control | no-preview |
| go-import | github.com/upwork/python-upwork git https://github.com/upwork/python-upwork.git |
| octolytics-dimension-user_id | 11737042 |
| octolytics-dimension-user_login | upwork |
| octolytics-dimension-repository_id | 35096308 |
| octolytics-dimension-repository_nwo | upwork/python-upwork |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 35096308 |
| octolytics-dimension-repository_network_root_nwo | upwork/python-upwork |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | abd13d780acc53a8d052b86a5b6ac82b79676965 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width