dvliman / logsnag

A clojure library for interacting with LogSnag

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logsnag Clojure

Clojure library for interacting with the LogSnag API. Small, opinionated, and hand-crafted.

Clojars Project License: MIT

Coordinates

com.github.dvliman/logsnag {:mvn/version "0.0.1"}

Usage

First, require the library. You can generate token on Settings > API > My Tokens page

(require '[dvliman.logsnag :as logsnag]')

(def logsnag-client 
  {:token "26...0b" :project "my-project"})

(logsnag/publish
  logsnag-client
  {:notify true
   :channel :waitlist
   :event "user joined"
   :description "joe@example.com joined waitlist"
   :icon ":rose:"})
    
(logsnag/insight
  logsnag-client 
  {:title "pageview"
   :value 1
   :icon ":rose:"})

License

Copyright © 2023 dvliman.com

Distributed under the Eclipse Public License version 1.0.

About

A clojure library for interacting with LogSnag


Languages

Language:Clojure 98.3%Language:Makefile 1.7%