{% extends "basedocumentation.html" %} {% block title %}API Help{% endblock %} {% block doccontent %}
Some of the data from Unglue It is avaiable via a JSON API. You will need a key and username to be able to use the API.
{% if user.is_authenticated %}Welcome {{user.username}}. Your API key is {{api_key}}.
{% else %}Please sign in first.
{% endif %}JSON to get data on all campaigns
{{base_url}}/api/v1/campaign/?format=json&api_key={api_key}&username={username}JSON to get work/edition data for an isbn
{{base_url}}/api/v1/identifier/?format=json&api_key={api_key}&ype=isbn&value=9780441012039In addition to isbn, you can use 'goog' if you have a google books id, and 'oclc' for oclc numbers.
{% endif %}You don't need a key to embed campaign (HTML) widgets.
{% if campaign %} Here's a sample widget for the book {{campaign.name}} with ISBN {{campaign_isbn}}: {{base_url}}{% url widget campaign_isbn %} {% else %}Since there are currently no campaigns, there are no corresponding widgets.
{% endif %} {% endblock %}