r0man / oauth-clj

Clojure OAuth library
95 stars 27 forks source link

please put imports in your README example #23

Closed fommil closed 8 years ago

fommil commented 8 years ago

as somebody who is learning clojure, I do not understand your README because it is using functions that I do not have in scope.

r0man commented 8 years ago

Hey @fommil, what do you mean by imports? There's a (use 'oauth.twitter) form at the very top of the README that makes all functions from the oauth.twitter namespace available.

I re-checked the README and found a typo. When building the clj-http client at the end of the README the :oauth-token-secret of the access token should be used, not the :oauth-verifier.

This should be fixed now: https://github.com/r0man/oauth-clj/commit/a75dea17ad4dbe57806101bc2224bb6cd1f3fde8

If the docs are not clear enough, I'm happy to take pull requests.

fommil commented 8 years ago

ok, I see. Everything else I've seen so far has used :as which makes it more explicit what comes from where. I've actually got it working with clj-oauth (although that library does a lot more than it should do IMHO). Can I ask why you created this library? What does it do that clj-oauth doesn't do? From my perspective I'd be interested in having an OAuth library that is agnostic of HTTP implementation... I'm building something with core.async channels and async HTTP so the reliance on blocking transitive dependencies is somewhat wasteful.

r0man commented 8 years ago

@fommil I can't remember exactly, but back in the day when I created this library clj-oauth used to work a bit different than today and I needed something that worked with clj-http.

I have limited use for this library at the moment and just update the dependencies from time to time.

Also, these days I have seen a new OAuth library for Clojure. I think it addresses your concerns and is a bit more modern: https://github.com/jcf/oauth

I hope that helps, Roman.