I'm trying to integrate with an API (Context.IO) using Clojure. Context.IO uses OAuth 1, which requires to inform consumer key and consumer secret credentials to integrate with.
I've manage to work with Context.IO with Node.JS in the past, using request library (https://github.com/request/request). It turn out to be quite simple, just filled consumer_key and consumer_secret in an object and passed it in oauth parameter in the request.
var oauth =
{
consumer_key: 'dsfdfssdf',
consumer_secret: 'dasfsafdsf'
};
request.post( { url:url, oauth:oauth } )
Now I'm trying to accomplish the same using clj-oauth https://github.com/mattrepl/clj-oauth, but I'm kinda lost, because it requires too different parameters (for more complex use cases I guess), and I'm having a hard time trying to figure out how to do the simple.
To add more information, Context IO uses OAuth only for API Authentication, not user Authorization. So it doesn't require tokens to be informed, neither provides one. It only requires the consumer key and signature (the same described here: dev.twitter.com/oauth/overview/creating-signatures).
Can someone give an example similar to what I accomplished in Node using Clojure or clj-oauth (or any other library)? I haven't found a way to do so.
Thanks!
I signed up for context io to give this a go. First, in leiningen I set up
as my dependencies. There are two examples below. One calls a url without any parameters, the other calls the same url, but with parameters.