[ckan-dev] API docs update
Sean Hammond
sean.hammond at okfn.org
Fri Feb 8 09:59:56 UTC 2013
> If ckanclient only supports the v1/2 APIs (not 100% sure if this is
> true, I'll check later) then maybe a link to it should just be added on
> the Legacy APIs page? But not on the Action API page. In other words
> ckanclient would become "legacy" and deprecated, at least until somone
> turns it into an Action API client.
I had a very quick look and I think, unless someone really disagrees,
I'm going to remove ckanclient from the docs entirely. It played its
part well once, but now there's just too much code in there that looks
it has probably become misleading/unhelpful as ckan has changed over
time. It uses the old rest and search APIs, supports the old
elasticsearch datastore API but not the new one, contains code for
reading google spreadsheets, API error message hiding, etc.
It does have a few lines of code for supporting the action API (about
three lines, in fact!), which is actually probably most of the code
you'd need for a a complete action api client.
It's also just a *lot* more code than we really need to be maintaining
for a CKAN API client.
I'll add a page to the wiki with links to ckanclient and the other
language clients.
I would love to work on ckanclient as I think it'd be easy to write a
few lines of Python code that would let you post a python dict to any
action api function and get a python dict back, with just a single
python function call (https://gist.github.com/seanh/4130567A), which
would be a really convenient way to use the CKAN API, and then you could
do cool stuff with it like implement an interactive CKAN API shell.
You could also build all sorts of convenient functions on top of it,
e.g. the current ckanclient has a function for dumping a CKAN site to
CSV resource-by-resource, we've talked recently about the need for a
function for counting the number of datasets on a list of known CKAN
sites and adding them up, etc. etc.
This would need to a chunnk of dev time to be allocated in a sprint. (It
could also be a good task for an outside-of-OKFN contributor to take
on.)
More information about the ckan-dev
mailing list