New API

I’m in the process of designing an API for MP3-Sermons.com. It will be XML-RPC. Post an XML to the addresses, and get an XML response back, or JSON, if desired. Here is how I’m approaching this:

POST and XML to: apiServer.php?type=XML

<method_call>

<method name=”get_sermon_ids”>

<parameter name=”username”>gfc</parameter>

<parameter name=”password”>****</parameter>

<parameter name=”limit”>5</parameter>

<parameter name=”sortOrder”>desc</parameter>

</method>

</method_call>

RESPONSE:

<result>

<sermons>

<sermon_id>5</sermon_id>

<sermon_id>7</sermon_id>

</sermons>

</result>

OR – JSON:

{“SERMONS”: [5,7]}

Users then can call methods like get_details(int id) and fetch all of the information about the sermon!

Leave a Reply

Your email address will not be published. Required fields are marked *