-
Notifications
You must be signed in to change notification settings - Fork 0
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
9d8cab6
commit 0c94cc1
Showing
6 changed files
with
42 additions
and
29 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
# name: Rust CI | ||
|
||
# on: | ||
# push: | ||
# branches: | ||
# - main | ||
|
||
# jobs: | ||
# build: | ||
# runs-on: macos-latest | ||
|
||
# steps: | ||
# - name: Set up Rust | ||
# uses: actions/checkout@v2 | ||
# - name: Install cargo-audit | ||
# run: cargo install cargo-audit | ||
# - name: Build | ||
# run: cargo build --verbose | ||
# - name: Test | ||
# run: cargo test --verbose | ||
# - name: Clippy | ||
# run: cargo clippy --verbose -- -D warnings | ||
# - name: Audit | ||
# run: cargo audit |
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 @@ | ||
pub mod transactions; |
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,13 @@ | ||
//! Command Line Interface `Transaction` commands | ||
use crate::{ | ||
db, | ||
starling::client::{StarlingApiClient, StarlingClient}, | ||
}; | ||
|
||
/// Fetch transactions for the specified number of days and save to the database | ||
pub async fn get_transactions(client: &StarlingApiClient, days: i64) { | ||
if let Some(account) = client.accounts().await.iter().next() { | ||
db::service::insert_or_update(client, account, days).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,3 +1,4 @@ | ||
pub mod commands; | ||
pub mod db; | ||
pub mod entities; | ||
pub mod starling; |