checkdigits / ntfy-for-delphi

A friendly library to push instant notifications using ntfy.sh servers in Delphi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ntfy was made by Philipp C. Heckel. Consider leaving a star in his project. As Philipp C. Heckel stated, this service will stay free, so any kind of support to afford costs help with cloud hosting will be warmly received. You can also self-host ntfy server. Visit docs.ntfy.sh to get started with documentation.

🔔 Ntfy for Delphi

Ntfy for Delphi it's a friendly library to work with ntfy.sh servers in Delphi. It allows you publishing messages and subscribing to topics to receive instant notifications.

⚙️ Manual Installation

You need to add src folder to your library path or search path.

⚙️ Boss Installation

  boss install github.com/hazzelnuts/ntfy-for-delphi

⚡️ Quickstart

Push a notification on a specific topic. Topics are the same as channels and the name you choose will become a public url, so remember to make difficult to guess it.

uses
  Notify;

begin
  Ntfy.Notification(
    New.Notification
      .Topic('your-very-secret-topic')
      .Title('⚾ Go to the game')
      .MessageContent('Tomorrow at 10:00hs ') 
  );

  Ntfy.Publish;
end;

💬 Subscribe to a topic

You can subscribe to a topic through several ways. For instance, the Web App, Android, CLI or you can use this library as follows:

uses
  Notify;

begin
  Ntfy.Subscribe('your-very-secret-topic', 
    procedure (AEvent: INotifyEvent)
    begin
      WriteLn('You received a message: ' +  AEvent.MessageContent)
    end);
end;

There is a VCL Sample demonstration showing you how to use Delphi Ntfy subscription mechanism into your project.

⚙️ Supported Version & Platforms

It hasn't been tested in some Delphi versions yet. You can help finding out informing with a PR update to this README file. In the PR, inform the selected badged.

⛔ Limitations

Support to notifications that contains broadcast actions has not been implemented. Likewise, some advanced specific resources has not yet been implemented as well.

Action Support
view
broadcast
http
Subscription Type Support
json
raw
sse
websocket

🔗 Dependencies

Ntfy for Delphi uses a few libraries in the messages subscription and publishing mechanism. There is no need to install. The respective credit adviced.

🌱 Consider Contributing

Ntfy for Delphi it's an open source project under the MIT license. Feel free to use or contribute!

⚠ Observations

For the moment this library uses OpenSSL and is necessary to have it in the executable's folder. Plannings for implementing future versions which supports NetHttp are under development.

About

A friendly library to push instant notifications using ntfy.sh servers in Delphi

License:MIT License


Languages

Language:Pascal 100.0%