pub struct BumpClient { /* private fields */ }
Implementations§
Source§impl BumpClient
impl BumpClient
Source§impl BumpClient
impl BumpClient
pub fn new(url: &str, authentication: BumpAuthentication) -> Self
pub fn with_authentication(self, authentication: BumpAuthentication) -> Self
pub fn authenticate<'a>(&self, r: RequestBuilder<'a>) -> RequestBuilder<'a>
pub fn with_middleware<M: Middleware + 'static>(self, middleware: M) -> Self
Sourcepub fn post_diffs(&self) -> PostDiffsRequest<'_>
pub fn post_diffs(&self) -> PostDiffsRequest<'_>
Create a diff
Create a diff between any two given API definitions.
The diff result will be available asynchronously and needs to be retrieved with the GET /diffs/:id
API endpoint.
Sourcepub fn get_diffs_by_id(&self, id: &str) -> GetDiffsByIdRequest<'_>
pub fn get_diffs_by_id(&self, id: &str) -> GetDiffsByIdRequest<'_>
Fetch detailed information from an existing diff
Fetch the result of a previously created diff with the POST /diffs
API endpoint.
Sourcepub fn get_hubs_by_hub_id_or_slug(
&self,
hub_id_or_slug: &str,
) -> GetHubsByHubIdOrSlugRequest<'_>
pub fn get_hubs_by_hub_id_or_slug( &self, hub_id_or_slug: &str, ) -> GetHubsByHubIdOrSlugRequest<'_>
Fetch information of an existing Hub
Fetch information of an existing Hub including the list of APIs it contains. The response follows the APIs.json specification
Sourcepub fn post_versions(
&self,
args: PostVersionsRequired<'_>,
) -> PostVersionsRequest<'_>
pub fn post_versions( &self, args: PostVersionsRequired<'_>, ) -> PostVersionsRequest<'_>
Create a new version
Deploy a new version for a given documentation, which will become the current version.
Sourcepub fn post_validations(
&self,
args: PostValidationsRequired<'_>,
) -> PostValidationsRequest<'_>
pub fn post_validations( &self, args: PostValidationsRequired<'_>, ) -> PostValidationsRequest<'_>
Validate a documentation definition
Validate a definition against its schema (OpenAPI or AsyncAPI) and return errors without creating a new version. This is useful in a CI process, to validate that a changed definition file is valid and won’t fail when being deployed on Bump.
Sourcepub fn post_previews(&self, definition: &str) -> PostPreviewsRequest<'_>
pub fn post_previews(&self, definition: &str) -> PostPreviewsRequest<'_>
Create a preview
Create a preview for a given documentation file. The preview will have a unique temporary URL, and will be active for 30 minutes.
Sourcepub fn put_previews_by_preview_id(
&self,
preview_id: &str,
definition: &str,
) -> PutPreviewsByPreviewIdRequest<'_>
pub fn put_previews_by_preview_id( &self, preview_id: &str, definition: &str, ) -> PutPreviewsByPreviewIdRequest<'_>
Update an existing preview
Update a preview with the given documentation file. The preview will stay active for 30 minutes after the last update.
Sourcepub fn get_versions_by_version_id(
&self,
version_id: &str,
) -> GetVersionsByVersionIdRequest<'_>
pub fn get_versions_by_version_id( &self, version_id: &str, ) -> GetVersionsByVersionIdRequest<'_>
Fetch a full documentation version including diff summary
Fetch a full documentation version including diff summary.
Sourcepub fn get_ping(&self) -> GetPingRequest<'_>
pub fn get_ping(&self) -> GetPingRequest<'_>
Check the API status
Responds a pong if the API is up and running.