julienXX / clj-slack

Use Slack REST API from Clojure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for conversations API

devth opened this issue · comments

Hi @devth it’s in progress. I think I may be able to release it next week.

Awesome!

@devth hey I just released 0.6.1 that adds support to the conversations API. Let me know if you have issues, suggestions...

Thanks! I'll try it out next week.

Playing with this now. Throws an exception if I pass any non-strings in optionals:

  (conversations/history
    (slack-config {:token "xoxb-lol"})
    "CLOLCHAN"
    {:latest "15222222222444300"
     :inclusive true
     :count 1})

Works if I make everything a string:

  (conversations/history
    (slack-config {:token "xoxb-lol"})
    "CLOLCHAN"
    {:latest "15222222222444300"
     :inclusive "true"
     :count "1"})

Exception:

java.lang.IllegalArgumentException: No matching method found: encode
        at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:80)
        at clojure.lang.Reflector.invokeStaticMethod(Reflector.java:207)
        at clj_slack.core$make_query_string$iter__16418__16422$fn__16423.invoke(core.clj:56)
        at clojure.lang.LazySeq.sval(LazySeq.java:40)
        at clojure.lang.LazySeq.seq(LazySeq.java:49)
        at clojure.lang.RT.seq(RT.java:528)
        at clojure.core$seq__5124.invokeStatic(core.clj:137)
        at clojure.core$interleave$fn__5950.invoke(core.clj:4282)
        at clojure.lang.LazySeq.sval(LazySeq.java:40)
        at clojure.lang.LazySeq.seq(LazySeq.java:49)
        at clojure.lang.Cons.next(Cons.java:39)
        at clojure.lang.RT.next(RT.java:706)
        at clojure.core$next__5108.invokeStatic(core.clj:64)
        at clojure.core$str$fn__5188.invoke(core.clj:557)
        at clojure.core$str.invokeStatic(core.clj:555)
        at clojure.core$str.doInvoke(core.clj:544)
        at clojure.lang.RestFn.applyTo(RestFn.java:139)
        at clojure.core$apply.invokeStatic(core.clj:657)
        at clojure.core$apply.invoke(core.clj:652)
        at clj_slack.core$make_query_string.invokeStatic(core.clj:58)
        at clj_slack.core$make_query_string.invoke(core.clj:52)
        at clj_slack.core$build_params.invokeStatic(core.clj:63)
        at clj_slack.core$build_params.invoke(core.clj:60)
        at clj_slack.core$slack_request.invokeStatic(core.clj:95)
        at clj_slack.core$slack_request.invoke(core.clj:90)
        at clj_slack.conversations$history.invokeStatic(conversations.clj:43)
        at clj_slack.conversations$history.invoke(conversations.clj:28)
        ...