reviewboard.hostingsvcs.service¶
The base hosting service class and associated definitions.
This is pending deprecation. Consumers should update their imports to use
the classes in reviewboard.hostingsvcs.base
.
It includes compatibility imports for:
Client for communicating with a hosting service's API. |
|
An interface to a hosting service for repositories and bug trackers. |
|
A request that can use any HTTP method. |
|
An HTTP response from the server. |
|
A representation of a remote repository. |
- URLRequest[source]¶
Legacy name for HostingServiceHTTPRequest
Deprecated since version 4.0: This has been replaced by
HostingServiceHTTPRequest
.
- get_hosting_service(name: str) Optional[Type[BaseHostingService]] [source]¶
Return the hosting service with the given name.
If the hosting service is not found, None will be returned.
- get_hosting_services() List[Type[BaseHostingService]] [source]¶
Return the list of hosting services.
- Returns:
The
BaseHostingService
subclasses.- Return type:
- register_hosting_service(name: str, cls: Type[BaseHostingService]) None [source]¶
Register a custom hosting service class.
A name can only be registered once. A KeyError will be thrown if attempting to register a second time.
- Parameters:
name (
str
) –The name of the hosting service.
If the hosting service already has an ID assigned as
BaseHostingService.hosting_service_id
, that value should be passed. Note that this will also override any existing ID on the service.cls (
type
) –The hosting service class.
This must be a subclass of
BaseHostingService
.