Fork me on GitHub
#beginners
<
2016-12-02
>
mathpunk06:12:56

I updated the twitter-api library to fix(?) the problems I was having. Now, when I navigate to my /twitter/:id route, which should call the statuses-lookup function from said library, I get `java.lang.IllegalArgumentException: No value supplied for key: {:id "804503738966642688"} at clojure.lang.PersistentHashMap.create (PersistentHashMap.java:77) twitter.api.restful$statuses_lookup.invokeStatic (restful.clj:53) twitter.api.restful$statuses_lookup.doInvoke (restful.clj:53)...`

vandr0iy11:12:34

anybody knows how to check if an AssertionError gets thrown by a :pre or a :post condition using clojure.test?

thegeez12:12:01

@mathpunk from the readme for twitter-api it looks like the call to statuses-lookup should be (statuses-lookup :params {:id "...some-id.."}). Your code is missing the :params keyword

drewverlee12:12:38

There seems to be a lot of talk around clojure spec highlighting that we should treat maps a specific way. That a map is about its “keys” rather then its values. I feel i have read over this material once or twice but i haven’t had the ah ha moment, as evident by the fact i can’t adequately describe it. Anyone have a resource they can recommend?

drewverlee12:12:50

Related to what RIch is talking about here with keys and hats 🙂

roelofw15:12:48

Can I render a clojure object which is the outcome of a function , just like this ( render (function (arg))) with selmer ?