[−][src]Struct abuseipdb::Client
The AbuseIPDB client.
Methods
impl Client
[src]
pub fn new<S: Into<String>>(api_key: S) -> Self
[src]
Create a new AbuseIPDB client with the given API key and default settings.
pub fn builder() -> ClientBuilder
[src]
Returns a AbuseIPDB client builder.
pub async fn check<'_>(
&'_ self,
ip_addr: IpAddr,
max_age_in_days: Option<u16>,
verbose: bool
) -> Result<Response<Check>, Error>
[src]
&'_ self,
ip_addr: IpAddr,
max_age_in_days: Option<u16>,
verbose: bool
) -> Result<Response<Check>, Error>
Queries AbuseIPDB given a IP address.
The check endpoint accepts a single IP address (v4 or v6).
Optionally you may set the max_age_in_days
parameter to only
return reports within the last x amount of days.
pub async fn check_block<'_, '_>(
&'_ self,
network: &'_ str,
max_age_in_days: Option<u16>
) -> Result<Response<BlockCheck>, Error>
[src]
&'_ self,
network: &'_ str,
max_age_in_days: Option<u16>
) -> Result<Response<BlockCheck>, Error>
Queries AbuseIPDB given a subnet.
The check-block endpoint accepts a subnet (v4 or v6) denoted with CIDR notation.
pub async fn blacklist<'_>(
&'_ self,
confidence_min: Option<u8>,
limit: Option<u32>,
for_self: bool
) -> Result<Response<Blacklist>, Error>
[src]
&'_ self,
confidence_min: Option<u8>,
limit: Option<u32>,
for_self: bool
) -> Result<Response<Blacklist>, Error>
Queries AbuseIPDB for the blacklist.
The blacklist is the culmination of all of the valiant reporting by AbuseIPDB users. It's a list of the most reported IP addresses.
pub async fn report<'_, '_, '_>(
&'_ self,
ip_addr: IpAddr,
categories: &'_ [Category],
comment: Option<&'_ str>
) -> Result<Response<AddressAbuse>, Error>
[src]
&'_ self,
ip_addr: IpAddr,
categories: &'_ [Category],
comment: Option<&'_ str>
) -> Result<Response<AddressAbuse>, Error>
Reports an IP address to AbuseIPDB.
At least one category is required.
Auto Trait Implementations
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
impl !RefUnwindSafe for Client
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,