Compare commits

..

No commits in common. "9e3d10d85736c71a4fef83be627f928dd8fd8bc9" and "e1a782ea9109062b25f2e37c481d7d34c16d4b8c" have entirely different histories.

4 changed files with 8 additions and 6 deletions

View File

@ -1,5 +0,0 @@
pipeline:
test:
image: rust:alpine
commands:
- cargo test

View File

@ -1,7 +1,9 @@
#[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate serde_json;
extern crate url;
extern crate reqwest;
pub mod models;

View File

@ -1,9 +1,13 @@
use dotenv::dotenv;
use std::env;
use dotenv::dotenv;
mod requester;
#[tokio::main]
async fn main() {
dotenv().ok();
let api_token = env::var("TANDOOR_TOKEN").expect("Token needed");
let entries = requester::fetch_shopping_list_entries(&api_token).await;
println!("{:?}",entries)
}

View File

@ -5,6 +5,7 @@ use std::env;
pub async fn fetch_shopping_list_entries(api_token: &str) -> Option<Vec<ShoppingListEntry>> {
let base_url = env::var("TANDOOR_BASE_URL").expect("Base Url needed");
let route = "/shopping-list-entry/";
let url = format!("{}{}", base_url, route);
let client = Client::new();