搜索插件、代码仓与 APP 分类

GitHub 代码仓Crdzbird/ntfluttery

ntfluttery

一个 Dart 库,用于帮助从 ntfy.sh 集成自定义通知

ntfluttery 项目封面
星标
4
复刻
0
最近推送(UTC)
2024年2月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 ↗