-
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.
Add support to authentication with access token
Closes #5
- Loading branch information
Showing
6 changed files
with
77 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ use ntfy::prelude::*; | |
#[tokio::main] | ||
async fn main() -> Result<(), NtfyError> { | ||
let dispatcher = Dispatcher::builder("https://ntfy.sh") | ||
.credentials(Auth::new("username", "password")) // Add optional credentials | ||
.credentials(Auth::credentials("username", "password")) // Add optional credentials | ||
.proxy("socks5h://127.0.0.1:9050") // Add optional proxy | ||
.build()?; // Build dispatcher | ||
|
@@ -61,4 +61,4 @@ This project is distributed under the MIT software license - see the [LICENSE](L | |
|
||
⚡ Tips: <https://getalby.com/p/yuki> | ||
|
||
⚡ Lightning Address: [email protected] | ||
⚡ Lightning Address: [email protected] |
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
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,12 +1,14 @@ | ||
#!/usr/bin/env just --justfile | ||
|
||
precommit: | ||
cargo fmt | ||
cargo fmt --all -- --config format_code_in_doc_comments=true | ||
cargo test | ||
cargo clippy | ||
cargo clippy --features blocking | ||
|
||
check: | ||
cargo fmt --all -- --config format_code_in_doc_comments=true | ||
cargo check | ||
cargo test | ||
cargo clippy -- -D warnings | ||
cargo clippy --features blocking -- -D warnings | ||
cargo clippy --features blocking -- -D warnings |
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