https://github.com/monkey-projects/pushover-clj
Clojure lib to call the Pushover API
https://github.com/monkey-projects/pushover-clj
Last synced: 8 months ago
JSON representation
Clojure lib to call the Pushover API
- Host: GitHub
- URL: https://github.com/monkey-projects/pushover-clj
- Owner: monkey-projects
- License: gpl-3.0
- Created: 2024-03-20T14:59:33.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-18T07:56:27.000Z (over 1 year ago)
- Last Synced: 2025-02-22T10:46:51.601Z (11 months ago)
- Language: Clojure
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pushover Clj
This is a Clojure library to talk to the [Pushover API](https://pushover.net/api). It uses
[Martian](https://github.com/oliyh/martian) to build the requests.
# Usage
Include it in your project:
```clojure
{:deps {com.monkeyprojects/pushover-clj {:mvn/version 0.1.0-SNAPSHOT}}}
```
The functionality can be found in namespace `monkey.pushover.core`. First create a client,
then invoke the `post-message` function:
```clojure
(require '[monkey.pushover.core :as p])
;; Create a client with default opts
(def client (p/make-client {}))
;; Post a message
(p/post-message client {:token "secret-app-token"
:user "dest-user-id"
:message "Hi, this is a message from pushover-clj"!})
```
We use [HttpKit](https://github.com/http-kit/http-kit) as a backend so the requests
return a future. It's up to you to `defer` it or do something else with it.
# TODO
- Add support for attachments
- Add other API requests
- Allow to specify the token once on client creation instead of with each call
- Integration tests
# License
Copyright (c) 2024 by [Monkey Projects BV](https://www.monkey-projects.be)
[GPL v3 License](LICENSE)