generated from emo-crab/rust-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cffebc0
commit f0be07d
Showing
4 changed files
with
41 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
use crate::v2::vulnerabilities::Vulnerabilities; | ||
use crate::{Error, NVDApi, Object}; | ||
const ROUTER: &str = "cve"; | ||
|
||
impl NVDApi { | ||
pub async fn vulnerabilities(&self, query: Vulnerabilities) -> Result<Object, Error> { | ||
let u = format!("{}/{}", self.base_path, ROUTER); | ||
self.request(self.client.get(u).query(&query)).await | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
mod vulnerabilities; | ||
mod api; | ||
|
||
const BASE_URL: &'static str = "https://services.nvd.nist.gov/rest/json/"; | ||
const VERSION: f32 = 2.0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters