pub struct FactoryAPI { /* private fields */ }Expand description
CRF API implementation
Implementations§
Source§impl FactoryAPI
impl FactoryAPI
Sourcepub fn with_auth(token_provider: Box<dyn ITokenProvider + Send>) -> FactoryAPI
pub fn with_auth(token_provider: Box<dyn ITokenProvider + Send>) -> FactoryAPI
Create a new instance using the provided token provider.
Sourcepub async fn list(&self) -> Result<SearchResponse, FactoryError>
pub async fn list(&self) -> Result<SearchResponse, FactoryError>
Retrieve CRF robots on the main page.
Sourcepub async fn search(
&self,
params: SearchPayload,
) -> Result<SearchResponse, FactoryError>
pub async fn search( &self, params: SearchPayload, ) -> Result<SearchResponse, FactoryError>
Search for robots on the CRF which meet the provided parameters
pub async fn create_robot( &self, robot: CreateRobotPayload, ) -> Result<CreateRobotResponse, FactoryError>
pub async fn publish_robot( &self, robot: PublishRobotPayload, id: String, ) -> Result<PublishRobotResponse, FactoryError>
pub async fn unpublish_bot(&self, id: String) -> Result<(), FactoryError>
pub async fn delete_robot(&self, id: String) -> Result<(), FactoryError>
pub async fn factory_info(&self) -> Result<FactoryInfoResponse, FactoryError>
pub async fn my_robots(&self) -> Result<MyRobotsResponse, FactoryError>
pub async fn my_published_robots( &self, ) -> Result<MyRobotsResponse, FactoryError>
pub async fn get(&self, id: String) -> Result<GetRobotResponse, FactoryError>
pub async fn moderate( &self, payload: ModerateRobotPayload, id: String, ) -> Result<(), FactoryError>
pub async fn report( &self, payload: ReportRobotPayload, id: String, ) -> Result<(), FactoryError>
Auto Trait Implementations§
impl !Freeze for FactoryAPI
impl !RefUnwindSafe for FactoryAPI
impl !UnwindSafe for FactoryAPI
impl Send for FactoryAPI
impl Sync for FactoryAPI
impl Unpin for FactoryAPI
impl UnsafeUnpin for FactoryAPI
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more