Fork me on GitHub
#announcements
<
2018-11-08
>
olieidel08:11:26

I just released hcloud, an API client for the Hetzner Cloud API. Quick context, what is Hetzner? It’s basically DigitalOcean but cheaper and a German company. I’m not sponsored by them but have hosted all my past projects there and was quite happy - and guess what, there wasn’t a Clojure client for their API yet. Side note: I also did some toying around with metadata to auto-generate docs which are included in the README.md. Probably not that impressive but I thought it was quite neat. Check out dev/readme.clj for the code. https://github.com/olieidel/hcloud

👍 24
jerger_at_dda11:11:49

your lib is comparable to hetzners terraform provider?

roklenarcic11:11:35

You can replace :headers {"Authorization" (str "Bearer " token)} in http-opts with :oauth-token token.

olieidel12:11:49

@jerger_at_dda yeah I suppose it’s comparable, only completely in Clojure. so if you want to “roll your own” creation / management of hetzner servers in Clojure, this is for you 😄

olieidel12:11:40

@U66G3SGP5 wow, that’s a great find, I didn’t know that was equivalent. thanks for looking through the code btw! will change. relevant source of clj-http for those interested: https://github.com/dakrone/clj-http/blob/eee52198d7776e3e6d965fbade9296918efc8cca/src/clj_http/client.clj#L846

roklenarcic12:11:20

Hehe I spent a lot of time looking that source, since I've been making a lot of clients and my own rest client library

olieidel13:11:47

hehe, I have a feeling that your clients are more well-designed than mine - I don’t have much experience writing them in Clojure

roklenarcic19:11:20

Not really, your client looks fine and clean. Not to toot my own horn, but here's my lib for generating request maps: https://github.com/RokLenarcic/clj-rest-client

roklenarcic19:11:04

I am happy to get any feedback