| Crates.io | line_notify |
| lib.rs | line_notify |
| version | 0.2.1 |
| created_at | 2024-02-19 12:16:34.057845+00 |
| updated_at | 2024-02-20 04:41:52.174372+00 |
| description | A simple line notify client |
| homepage | |
| repository | https://github.com/MorrisFreeman/line_notify |
| max_upload_size | |
| id | 1145158 |
| size | 43,976 |
LineNotifyは、Rustを使用してLINE Notify APIを通じて通知を送信するためのシンプルなインターフェースを提供します。このクレートを使用することで、テキストメッセージと画像の両方をLINE Notifyを通じて送信できます。Rustの強力な非同期機能を活用します。
まず、LINE Notifyのウェブサイトに従ってLINE Notifyのアクセストークンを取得します。
次に、プロジェクトで以下のようにクレートを使用します:
use line_notify::LineNotify;
use tokio;
#[tokio::main]
async fn main() {
let token = "YOUR_ACCESS_TOKEN";
let message = "Hello, World!";
let line_notify = LineNotify::new(token);
match line_notify.set_message(message).send().await {
Ok(response) => {
println!("Status: {}", response.status());
println!("Headers:\n{:#?}", response.headers());
println!("Body: {}", response.text().await.unwrap());
},
Err(e) => println!("Error: {}", e),
}
}
貢献は大歓迎です!お気軽にプルリクエストを送ってください。
このクレートはMITライセンスの下で公開されています。
このクレートはLINE Corporationと公式には関連していません。