I'm trying to write a wrapper for telegram api[1]. Responses from the api
are either successful,
which would then have a `{"ok": true, result: ...}` shape, or error with
the shape of `{"ok": false, description: "..."}`.
Also, I'm using aleph to call the api. So, the responses are deferreds [2].
Now, I want to write spec for my functions like get-messages, etc. But the
problem is I have no clue how I can model something like this.
It appears to me that I want to model something like generics of other
languages. i.e. IDeref<Message>. But I can't see any straight forward way
to do so using clojure.spec.
What would you say be the idiomatic approach to model this.
[1]: https://core.telegram.org/bots/api
[2]: http://aleph.io/manifold/deferreds.html
BR.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.