パッケージ、リポジトリ、アプリカテゴリを検索

GitHub リポジトリCrdzbird/ntfluttery

ntfluttery

ntfy.sh からのカスタム通知の統合を支援する Dart ライブラリ

ntfluttery のプロジェクト画像
スター
4
フォーク
0
最終プッシュ(UTC)
2024/02/15
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

ntfluttery

This plugin is focused on help with the integration of ntfy.sh it has multiple ways to access the list of messages such as a Streaming of data or even using custom credentials.

Also it provides various ways to handle the messages list.

Features

  • Ready to use NTFY:
  • Tuples of messages: Thanks to Dart 3, you can fetch customisable tuples based on the type of message.
  • Error Handling and Data Processing
  • Growing test percentage: The test percentage is being continously growing, to ensure a fully tested library.

Getting Started

Installation

To use this plugin, add ntfluttery as a dependency in your pubspec.yaml file.

dependencies:
  ntfluttery: ^latest_version
Usage
import 'package:ntfluttery/ntfluttery.dart';

void main() {
    // initialize the client
  final client = NtflutteryService(
      credentials:
          Credentials(username: 'ntfyUser', password: 'ntfyPassword'));

    // Inject a logger into each request.
    client.addLogging(true);

    // Fetch from the NTFY API as a STREAM
  final result = await cliente
      .get('https:/notification/$topic/json?poll=1');

    // Received the data as a touple ready to be used.
  result.$1.listen((event) {
    print(event.$1);
    print(event.$2);
  });
}
import 'package:ntfluttery/ntfluttery.dart';

void main() {
    // initialize the client
  final client = NtflutteryService(
      credentials:
          Credentials(username: 'ntfyUser', password: 'ntfyPassword'));

    // Or fetch the messages and instead of use a Streaming just use it as a simple Future value.
    final latest = await cliente.getLatestMessage(
      'https://notification/$topic/json?poll=1');
  print('latest: $latest');
}

Additional Information

  • Platform Support: iOS, Android, Web, Desktop
  • Dependencies: Dio, Flutter, PrettyDioLogger

Contributing

Contributions are welcome!

License

This project is licensed under the MIT License.

Special thanks

Thanks to Philipp C. Heckel for create this great tool.

Support and Contact

If you have any questions or issues, please file them on issue tracker.

For further inquiries, contact me at luisalfonsocb83@gmail.com.

Luis Cardoza Bird GitHub avatar
GitHub 作者

Luis Cardoza Bird ↗

https://crdzbird-portfolio.herokuapp.com

DEVotionManagua,Nicaragua公式サイト ↗
言語HTMLDartCSS

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 7 件

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗