Add an API resource for hosting services.
Review Request #5882 — Created May 26, 2014 and submitted
This introduces
/api/hosting-services/
, which provides basic information
on the hosting services supported by Review Board.The resource does not expose all the information on a
HostingService
.
Right now, I'm keeping to the basic information, such as the name and
capabilities, until I determine what we're going to want to use for the
new repository configuration UI. This UI may impact howHostingService
itself structures data down the road, so it's not worth baking anything
related to that into the API yet.This work is loosely based on Olessia's UCOSP work, though many
changes were made to better fit in with other resources, to take
advantage of whatWebAPIResource
provides, and to make use of the new
LocalDataQuerySet
(which greatly reduces the amount of code).
Fetched the list resource and compared the output to the values from
the HostingServices.Followed links to the item resources. Saw those being fetched as well,
with the correct data.Tested that things like pagination worked (had to limit the number of
results for this).Unit tests passed.
Description | From | Last Updated |
---|---|---|
'webapi_response_errors' imported but unused |
reviewbot | |
'webapi_request_fields' imported but unused |
reviewbot | |
'webapi_login_required' imported but unused |
reviewbot | |
'PERMISSION_DENIED' imported but unused |
reviewbot | |
'DOES_NOT_EXIST' imported but unused |
reviewbot | |
'NOT_LOGGED_IN' imported but unused |
reviewbot | |
'get_hosting_service' imported but unused |
reviewbot | |
'webapi_check_login_required' imported but unused |
reviewbot | |
'webapi_check_local_site' imported but unused |
reviewbot | |
Hmm. Can we clarify this somehow? "Whether creating review requests for committed changes is supported through the web UI?" |
david |
-
This is a review from Review Bot. Tool: Pyflakes Processed Files: reviewboard/webapi/tests/test_hosting_service.py reviewboard/webapi/resources/root.py reviewboard/webapi/tests/urls.py reviewboard/webapi/resources/hosting_service.py reviewboard/webapi/tests/mimetypes.py Ignored Files: docs/manual/webapi/2.0/resources/hosting-service-list.rst docs/manual/webapi/2.0/resources/hosting-service.rst docs/manual/webapi/2.0/resources/index.rst
-
-
-
-
-
-
-
-
-
- Change Summary:
-
Fixed unused imports.
- Commit:
-
0d057a82da3cc3fb49ee44c9e4c6394792711553697885011801d31399e2cc17c62febfff473aa36
- Diff:
-
Revision 2 (+220)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/webapi/tests/test_hosting_service.py reviewboard/webapi/resources/root.py reviewboard/webapi/tests/urls.py reviewboard/webapi/resources/hosting_service.py reviewboard/webapi/tests/mimetypes.py Ignored Files: docs/manual/webapi/2.0/resources/hosting-service-list.rst docs/manual/webapi/2.0/resources/hosting-service.rst docs/manual/webapi/2.0/resources/index.rst
-
This is a review from Review Bot. Tool: Pyflakes Processed Files: reviewboard/webapi/tests/test_hosting_service.py reviewboard/webapi/resources/root.py reviewboard/webapi/tests/urls.py reviewboard/webapi/resources/hosting_service.py reviewboard/webapi/tests/mimetypes.py Ignored Files: docs/manual/webapi/2.0/resources/hosting-service-list.rst docs/manual/webapi/2.0/resources/hosting-service.rst docs/manual/webapi/2.0/resources/index.rst
- Change Summary:
-
Improved the wording of the
supports_post_commit
capability. - Commit:
-
697885011801d31399e2cc17c62febfff473aa36d5418bf814fcdc156e6aad2d63286ef9adb8c34a
- Diff:
-
Revision 3 (+221)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/webapi/tests/test_hosting_service.py reviewboard/webapi/resources/root.py reviewboard/webapi/tests/urls.py reviewboard/webapi/resources/hosting_service.py reviewboard/webapi/tests/mimetypes.py Ignored Files: docs/manual/webapi/2.0/resources/hosting-service-list.rst docs/manual/webapi/2.0/resources/hosting-service.rst docs/manual/webapi/2.0/resources/index.rst
-
This is a review from Review Bot. Tool: Pyflakes Processed Files: reviewboard/webapi/tests/test_hosting_service.py reviewboard/webapi/resources/root.py reviewboard/webapi/tests/urls.py reviewboard/webapi/resources/hosting_service.py reviewboard/webapi/tests/mimetypes.py Ignored Files: docs/manual/webapi/2.0/resources/hosting-service-list.rst docs/manual/webapi/2.0/resources/hosting-service.rst docs/manual/webapi/2.0/resources/index.rst
- Change Summary:
-
Removed the
supports_post_commit
capability in the API until we know what we want to do here. - Commit:
-
d5418bf814fcdc156e6aad2d63286ef9adb8c34ab163f12f7d65bdb237ba77aa439ab16553694ca4
- Diff:
-
Revision 4 (+214)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/webapi/tests/test_hosting_service.py reviewboard/webapi/resources/root.py reviewboard/webapi/tests/urls.py reviewboard/webapi/resources/hosting_service.py reviewboard/webapi/tests/mimetypes.py Ignored Files: docs/manual/webapi/2.0/resources/hosting-service-list.rst docs/manual/webapi/2.0/resources/hosting-service.rst docs/manual/webapi/2.0/resources/index.rst
-
This is a review from Review Bot. Tool: Pyflakes Processed Files: reviewboard/webapi/tests/test_hosting_service.py reviewboard/webapi/resources/root.py reviewboard/webapi/tests/urls.py reviewboard/webapi/resources/hosting_service.py reviewboard/webapi/tests/mimetypes.py Ignored Files: docs/manual/webapi/2.0/resources/hosting-service-list.rst docs/manual/webapi/2.0/resources/hosting-service.rst docs/manual/webapi/2.0/resources/index.rst