Struct BumpClient

Source
pub struct BumpClient { /* private fields */ }

Implementations§

Source§

impl BumpClient

Source

pub fn from_env() -> Self

Source§

impl BumpClient

Source

pub fn new(url: &str, authentication: BumpAuthentication) -> Self

Source

pub fn with_authentication(self, authentication: BumpAuthentication) -> Self

Source

pub fn authenticate<'a>(&self, r: RequestBuilder<'a>) -> RequestBuilder<'a>

Source

pub fn with_middleware<M: Middleware + 'static>(self, middleware: M) -> Self

Source

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.

Source

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.

Source

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

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn get_ping(&self) -> GetPingRequest<'_>

Check the API status

Responds a pong if the API is up and running.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more