Clj-osf

The clj-osf Clojure API is a framework available to Clojure developers to help them generate queries to any OSF Web Service endpoint. Each of the OSF web service endpoint has its own clojure function. A series of function can be chained to generate a OSF query. That function is used to generate any query, to send it to be endpoint of a OSF Web Service instance and to get back a resultset. The resultset can then be manipulated by using the internal structEDN data structure.

How to use the API
Using this API is really simple. Developers have to:


 * 1) Use the clj-osf package in their project
 * 2) Declare the namespaces they want to use
 * 3) Configure their applications to use the   package by calling the   and   macros
 * 4) Use the appropriate function to send the query to a web service endpoint.

The first thing you have to do is to make sure you make you add clj-osf as a dependancy in your Leiningen project:

Then you have to declare the namespaces you want to use. Let's just declare all of them for this tutorial, but you should only use the ones you required in your application:

Finally you have to make sure that you configure the clj-osf library before starting to use it. This configuration is required to make the API aware of the OSF endpoints to query and to configure the credentials to be able to send queries to it: