-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rest API endpoints to Circles to allow CRUD requests #213
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #213 +/- ##
==========================================
- Coverage 82.48% 82.44% -0.04%
==========================================
Files 23 24 +1
Lines 508 524 +16
==========================================
+ Hits 419 432 +13
- Misses 89 92 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
This looks good so far, in that it creates a view that lists all circles. The next step would be to return only the circles that the requesting user has the right to view. Check the code for the existing "circles" view to get an idea of how to narrow down the queryset. |
I have got this working. At least it works in Postman. However attempting a GET request in the browser returns:
I have attempted including the token as part of the url, i.e.
as well as passing it as a query parameter, i.e. in the browser console, using
but neither of these solutions work Assuming this doesn't matter I'll update the PR. But if it does matter, would appreciate some suggestions. |
Typically, authorization tokens are passed in via a request header. See the following document for more details about authorizing requests with Postman: https://learning.postman.com/docs/sending-requests/authorization/ |
Is this article not talking about passing them in Postman? I have it working in Postman. It is in the browsable API that I can't get it working. |
@brylie I managed to get it working - I needed to use a browser extension to edit the header. |
Ah, I understand. FWIW, we don't need to test these API endpoints in a browser since they will be used in a mobile client. Only Postman should be necessary, along with automated tests from Python. |
This resolves issue #195.
@brylie please review and give me any feedback. I have tested using the Browsable API and Postman.
Test coverage was 83%
isort and black both run.