[−][src]Struct iocutil::alienvault::AlienVaultOTXClient
AlienVaultOTX API Client
Methods
impl AlienVaultOTXClient
[src]
pub fn new(apikey: String) -> Self
[src]
make new client
pub fn pulses_from(&self, datetime: DateTime<Utc>) -> Result<Vec<Pulse>, Error>
[src]
get pulses modified from specified datetime
Example
ⓘThis example is not tested
use iocutil::prelude::*; let client = AlienVaultOTXClient::default(); let pulses = client.pulses_from(days_ago(7));
pub fn pulses_for(&self, days: i64) -> Result<Vec<Pulse>, Error>
[src]
get pulses for x days
Example
ⓘThis example is not tested
use iocutil::prelude::*; let client = AlienVaultOTXClient::default(); let pulses = client.pulses_for(7); // get for 7 days
pub fn get_raw_json(
&self,
hash: impl TryInto<SampleHash>,
section: QueryType
) -> Result<String, Error>
[src]
&self,
hash: impl TryInto<SampleHash>,
section: QueryType
) -> Result<String, Error>
get raw json report about indicator
Example
ⓘThis example is not tested
use iocutil::prelude::*; let client = AlienVaultOTXClient::default(); let general = client.get_raw_json("4451058bebb3385efa33d41c30566646", QueryType::General).unwrap(); let analysis = client.get_raw_json("4451058bebb3385efa33d41c30566646", QueryType::Analysis).unwrap();
pub fn query<T>(
&self,
hash: impl TryInto<SampleHash>,
section: QueryType
) -> Result<T, Error> where
T: DeserializeOwned,
[src]
&self,
hash: impl TryInto<SampleHash>,
section: QueryType
) -> Result<T, Error> where
T: DeserializeOwned,
query with free format
Example
ⓘThis example is not tested
use iocutil::prelude::*; use serde::Deserialize; #[derive(Deserialize)] struct Response { page_type: String, // ... } let client = AlienVaultOTXClient::default(); let report: Response = client.query("4451058bebb3385efa33d41c30566646", QueryType::Analysis).unwrap(); assert_eq!(report.page_type.as_str(), "ELF");
Trait Implementations
impl Default for AlienVaultOTXClient
[src]
Auto Trait Implementations
impl Send for AlienVaultOTXClient
impl Sync for AlienVaultOTXClient
impl Unpin for AlienVaultOTXClient
impl UnwindSafe for AlienVaultOTXClient
impl RefUnwindSafe for AlienVaultOTXClient
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 = Infallible
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,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,