TotSpot

Journal

Formats

Both "json" and "xml" formats are available and can be chosen by sending the "format" parameter in the request.

Available Methods

The "create" method

The "create" method expects a "title" and "text" for the Journal Entry to be created. The method will return the Journal Entry object that was just created on TotSpot.

Request

To create a journal, you should make a HTTP request to "http://totspot.com/api/journal/create". The following parameters are accepted and mandatory:
  • "title" - This will be the title of the new Journal Entry
  • "text" - This will be the body of the Entry

Response

Your response should look like this one:

<?xml version="1.0" encoding="UTF-8"?>
<journal-entry>
  <created-at type="datetime">2008-08-22T18:23:21+01:00</created-at>
  <id type="integer">13</id>
  <text>Lorem ipsum dolor sit amet.</text>
  <title>This is a Journal Entry created using the API</title>
  <updated-at type="datetime">2008-08-22T18:23:21+01:00</updated-at>
</journal-entry>
If you happen to send in the "format" parameter as "json", you should get this output:

{"journal_entry": {"updated_at": "2008-08-22T18:23:21+01:00", "title": "This is a Journal Entry created using the API", "text": "Lorem ipsum dolor sit amet.", "id": 13, "created_at": "2008-08-22T18:23:21+01:00"}}

The "get_all" method

This method will get all of the Journal Entries from a given user.

Request

You just need to make a HTTP request to "http://totspothome.com/api/journal/get_all". This method requires no parameters but the "format" one.

Response

Again, if everything goes as it should, this is the response you can expect:

<?xml version="1.0" encoding="UTF-8"?>
<journal-entries type="array">
  <journal-entry>
    <created-at type="datetime">2008-08-18T16:15:42+01:00</created-at>
    <id type="integer">12</id>
    <text>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</text>
    <title>Lorem Ipsum</title>
    <updated-at type="datetime">2008-08-18T16:15:42+01:00</updated-at>
  </journal-entry>
  <journal-entry>
    <created-at type="datetime">2008-08-22T18:23:21+01:00</created-at>
    <id type="integer">13</id>
    <text>Lorem ipsum dolor sit amet.</text>
    <title>This is a Journal Entry created using the API</title>
    <updated-at type="datetime">2008-08-22T18:23:21+01:00</updated-at>
  </journal-entry>
</journal-entries>

The "get" method

This method will get all of the Journal Entries from a given user.

Request

You just need to make a HTTP request to "http://totspothome.com/api/journal/get/_id_". This method requires no parameters but the "format" one.

Response

You should get something along these lines as your response:

<?xml version="1.0" encoding="UTF-8"?>
<journal-entry>
  <created-at type="datetime">2008-08-22T18:23:21+01:00</created-at>
  <id type="integer">13</id>
  <text>Lorem ipsum dolor sit amet.</text>
  <title>This is a Journal Entry created using the API</title>
  <updated-at type="datetime">2008-08-22T18:23:21+01:00</updated-at>
</journal-entry>

Please Login or Signup to the developer section to manage your applications.

API Documentation

© TotSpot - All rights reserved. | Contact us