Journalisted API - Overview
All requests take a number of parameters. output is optional, and defaults to js.
http://journalisted.com/api/function?output=output&other_variables
The current API is still in flux and subject to change and improvement! if this is likely to cause problems for you, please let us know so we can coordinate!
Outputs
The output argument can take any of the following values:
- xml
- php. Serialized PHP, that can be turned back into useful information with the unserialize() command. Quite useful in Python as well, using PHPUnserialize.
- js. A JavaScript object. You can provide a callback function with the callback variable, and then that function will be called with the data as its argument.
- rabx. "RPC over Anything But XML".
All text is encoded as UTF-8.
Errors
If there's an error, either in the arguments provided or in trying to perform the request, this is returned as a top-level error string.
- in XML:
<jl><error>ERROR</error></jl> - in JS:
{"error":"ERROR"} - in PHP and RABX: a serialised array containing one entry with key
error
API Functions
- Overview
- findArticles
Fetch a list of articles matching search criteria - findJournos
Look for journalists - getJourno
Get details about a single journalist - getJournoArticles
Fetch a list of articles attributed to a journalist