diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/github.rs | 4 | ||||
| -rw-r--r-- | src/main.rs | 2 | 
2 files changed, 3 insertions, 3 deletions
| diff --git a/src/github.rs b/src/github.rs index 0f4de77..bcd9865 100644 --- a/src/github.rs +++ b/src/github.rs @@ -42,7 +42,7 @@ impl Repo {  /// Fetch all GitHub repositories for the given user. -pub async fn fetch_repos() -> Result<Vec<Repo>, Error> { +pub async fn fetch_repos(github_username: &str) -> Result<Vec<Repo>, Error> {      let mut headers = reqwest::header::HeaderMap::new();      headers.insert("Accept", "application/vnd.github.v3+json".parse()?); @@ -58,7 +58,7 @@ pub async fn fetch_repos() -> Result<Vec<Repo>, Error> {              reqwest::Method::GET,              format!(                  "https://api.github.com/users/{}/repos?page={}&per_page=100", -                "teddywing", +                github_username,                  i,              ),          ) diff --git a/src/main.rs b/src/main.rs index 77083cf..9689d3c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,7 +10,7 @@ use std::path::{Path, PathBuf};  #[tokio::main]  async fn main() { -    let repos = github::fetch_repos().await.unwrap(); +    let repos = github::fetch_repos("teddywing").await.unwrap();      dbg!(&repos); | 
