pub struct Client { /* private fields */ }Expand description
API Keys are used to authenticate to the ngrok API. You may use the API itself to provision and manage API Keys but you’ll need to provision your first API key from the API Keys page on your ngrok.com dashboard.
Implementations§
Source§impl Client
impl Client
pub fn new(c: Client) -> Self
Sourcepub async fn create(&self, req: &APIKeyCreate) -> Result<APIKey, Error>
pub async fn create(&self, req: &APIKeyCreate) -> Result<APIKey, Error>
Create a new API key. The generated API key can be used to authenticate to the ngrok API.
Sourcepub async fn get(&self, id: &str) -> Result<APIKey, Error>
pub async fn get(&self, id: &str) -> Result<APIKey, Error>
Get the details of an API key by ID.
Sourcepub fn list(&self, req: FilteredPaging) -> List
pub fn list(&self, req: FilteredPaging) -> List
List all API keys owned by this account
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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