Events

Fields

cid
event's project-wide unique identifier number
comments-count
event's number of comments
title
event's title string
all-day
flag that marks an event as all-day. If set will automatically make the start date at 0:00 and the end date at 23:59
start-date
event's start time
end-date
event's last end time
created-at
event's creation time
updated-at
event's last update time
author_id
event's author identifier number - only when returning an array of events
author
See User's Fields - only when returning the specific event
comments
an array of comments. See Comment's Fields - only when returning the specific event
tags
an array of tags. Only has the name field
ref_tags
an array of tags. Only has the name field

Methods

get_all

returns all events in a project

Parameters

  • project: PROJECT_ALIAS (alias of a specific project) - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/project_alias/api/events/get_all 
http://company_alias.goplanapp.com/api/events/get_all?format=json&callback;=handlerFunction&project;=project_alias

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <events type="array">
    <event>
    <all-day type="integer">1</all-day>
    <author-id>1</author-id>
    <cid type="integer">2</cid>
    <comments-count type="integer">0</comments-count>
    <created-at type="datetime">2009-03-17T16:25:08+00:00</created-at>
    <end-date type="datetime">2009-03-25T23:59:59+00:00</end-date>
    <start-date type="datetime">2009-03-25T00:00:00+00:00</start-date>
    <title>single</title>
    <updated-at type="datetime">2009-03-17T16:25:08+00:00</updated-at>
    <ref-tags type="array"/>
    <tags type="array"/>
    </event>
    <event>
    <all-day type="integer">1</all-day>
    <author-id>1</author-id>
    <cid type="integer">10</cid>
    <comments-count type="integer">0</comments-count>
    <created-at type="datetime">2009-03-19T19:06:58+00:00</created-at>
    <end-date type="datetime">2009-03-20T23:59:00+00:00</end-date>
    <start-date type="datetime">2009-03-19T00:00:00+00:00</start-date>
    <title>gaggg</title>
    <updated-at type="datetime">2009-03-20T18:51:42+00:00</updated-at>
    <ref-tags type="array"/>
    <tags type="array">
    <tag>
    <name>ssss</name>
    </tag>
    </tags>
    </event>
    <event>
    <all-day type="integer">1</all-day>
    <author-id>1</author-id>
    <cid type="integer">11</cid>
    <comments-count type="integer">0</comments-count>
    <created-at type="datetime">2009-03-19T19:07:01+00:00</created-at>
    <end-date type="datetime">2009-03-27T23:59:59+00:00</end-date>
    <start-date type="datetime">2009-03-26T00:00:00+00:00</start-date>
    <title>ssss</title>
    <updated-at type="datetime">2009-03-19T19:07:01+00:00</updated-at>
    <ref-tags type="array"/>
    <tags type="array"/>
    </event>
    </events>
  • JSON

    
    [{"event": {"start_date": "2009/03/25 00:00:00 +0000", "created_at": "2009/03/17 16:25:08 +0000", "title": "single", "ref_tags": [], "updated_at": "2009/03/17 16:25:08 +0000", "comments_count": 0, "cid": 2, "author_id": "1", "tags": [], "end_date": "2009/03/25 23:59:59 +0000", "all_day": 1}}, {"event": {"start_date": "2009/03/11 00:00:00 +0000", "created_at": "2009/03/17 19:48:50 +0000", "title": "gagaggbvv", "ref_tags": [], "updated_at": "2009/03/17 19:48:50 +0000", "comments_count": 0, "cid": 6, "author_id": "1", "tags": [], "end_date": "2009/03/18 23:59:59 +0000", "all_day": 1}}, {"event": {"start_date": "2009/03/22 00:00:00 +0000", "created_at": "2009/03/19 19:06:54 +0000", "title": "afafa", "ref_tags": [], "updated_at": "2009/03/19 19:06:54 +0000", "comments_count": 0, "cid": 9, "author_id": "1", "tags": [], "end_date": "2009/03/23 23:59:59 +0000", "all_day": 1}}, {"event": {"start_date": "2009/03/19 00:00:00 +0000", "created_at": "2009/03/19 19:06:58 +0000", "title": "gaggg", "ref_tags": [], "updated_at": "2009/03/20 18:51:42 +0000", "comments_count": 0, "cid": 10, "author_id": "1", "tags": [{"name": "ssss"}], "end_date": "2009/03/20 23:59:00 +0000", "all_day": 1}}, {"event": {"start_date": "2009/03/26 00:00:00 +0000", "created_at": "2009/03/19 19:07:01 +0000", "title": "ssss", "ref_tags": [], "updated_at": "2009/03/19 19:07:01 +0000", "comments_count": 0, "cid": 11, "author_id": "1", "tags": [], "end_date": "2009/03/27 23:59:59 +0000", "all_day": 1}}, {"event": {"start_date": "2009/03/24 00:00:00 +0000", "created_at": "2009/03/19 19:07:07 +0000", "title": "agaag", "ref_tags": [], "updated_at": "2009/03/19 19:07:07 +0000", "comments_count": 0, "cid": 13, "author_id": "1", "tags": [], "end_date": "2009/03/24 23:59:59 +0000", "all_day": 1}}]
    		

get

returns a single event information

Parameters

  • id: event_CID (project-wide unique event identifier #) - mandatory
  • project: PROJECT_ALIAS (alias of a specific project) - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/projectalias/api/events/get/6
http://company_alias.goplanapp.com/api/events/get?id=6&project;=projectalias&format;=json&callback;=handler

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <event>
    <all-day type="integer">1</all-day>
    <author-id>1</author-id>
    <cid type="integer">10</cid>
    <comments-count type="integer">0</comments-count>
    <created-at type="datetime">2009-03-19T19:06:58+00:00</created-at>
    <end-date type="datetime">2009-03-20T23:59:00+00:00</end-date>
    <start-date type="datetime">2009-03-19T00:00:00+00:00</start-date>
    <title>gaggg</title>
    <updated-at type="datetime">2009-03-20T18:51:42+00:00</updated-at>
    <author>
    <alias>ganderson</alias>
    <created-at type="datetime">2009-03-17T15:05:51+00:00</created-at>
    <email>ganderson@my_email.com</email>
    <name>George Anderson</name>
    <picture-url>http://goplanapp.com/content/server.jpg</picture-url>
    <time-zone>Lisbon</time-zone>
    <updated-at type="datetime">2009-04-06T13:17:08+01:00</updated-at>
    <user-type type="integer">0</user-type>
    </author>
    <ref-tags type="array"/>
    <tags type="array">
    <tag>
    <name>ssss</name>
    </tag>
    </tags>
    <comments type="array"/>
    </event>
  • JSON

    
    testfun({"event": {"start_date": "2009/03/19 00:00:00 +0000", "created_at": "2009/03/19 19:06:58 +0000", "author": {"name": "George Anderson", "created_at": "2009/03/17 15:05:51 +0000", "updated_at": "2009/04/06 13:17:08 +0100", "picture_url": "http://goplanapp.com/content/server.jpg", "user_type": 0, "alias": "ganderson", "time_zone": "Lisbon", "email": "ganderson@my_email.com"}, "title": "gaggg", "ref_tags": [], "updated_at": "2009/03/20 18:51:42 +0000", "comments_count": 0, "cid": 10, "author_id": "1", "tags": [{"name": "ssss"}], "end_date": "2009/03/20 23:59:00 +0000", "comments": [], "all_day": 1}})
    		

create

creates a new event and returns it

Parameters

  • event[title]: event_TITLE (title of the new event) - mandatory
  • event[start_date]: event_START_DATE (starting time of the new event) - mandatory
  • event[end_date]: event_END_DATE (ending time of the new event) - mandatory
  • event[all_day]: event_ALL_DAY (marks the event as all-day if 1 or not if 0) - mandatory
  • tags[]: TAG_TEXT (use one tags[]=tagtext for each tag on the item. Specify project-wide hot-links with the notation ITEM_TYPE:ITEM_CID i.e.: event:3) - not mandatory
  • project: PROJECT_ALIAS (alias of a specific project) - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/project_alias/api/events/create - pass the other parameters by POST
http://company_alias.goplanapp.com/api/events/create?format=json&callback;=handlerfunction&project;=project_alias&event;[title]=design&event;[all_day]=0&event;[start_date]=Tue Apr 07 2009 19:08:36 GMT+0100 (CET)&event;[end_date]=Tue Apr 09 2009 19:08:36 GMT+0100 (CET) - date can be passed in any format that can be parsed by Ruby's Date.parse(). Javascript Date object .toString() is accepted.

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <event>
    <all-day type="integer">1</all-day>
    <author-id>1</author-id>
    <cid type="integer">10</cid>
    <comments-count type="integer">0</comments-count>
    <created-at type="datetime">2009-03-19T19:06:58+00:00</created-at>
    <end-date type="datetime">2009-03-20T23:59:00+00:00</end-date>
    <start-date type="datetime">2009-03-19T00:00:00+00:00</start-date>
    <title>gaggg</title>
    <updated-at type="datetime">2009-03-20T18:51:42+00:00</updated-at>
    </event>
  • JSON

    
    testfun({"event": {"start_date": "2009/03/19 00:00:00 +0000", "created_at": "2009/03/19 19:06:58 +0000", "author": {"name": "George Anderson", "created_at": "2009/03/17 15:05:51 +0000", "updated_at": "2009/04/06 13:17:08 +0100", "picture_url": "http://goplanapp.com/content/server.jpg", "user_type": 0, "alias": "ganderson", "time_zone": "Lisbon", "email": "ganderson@my_email.com"}, "title": "gaggg", "ref_tags": [], "updated_at": "2009/03/20 18:51:42 +0000", "comments_count": 0, "cid": 10, "author_id": "1", "tags": [{"name": "ssss"}], "end_date": "2009/03/20 23:59:00 +0000", "comments": [], "all_day": 1}})
    		

destroy

deletes a event from the project and returns it

Parameters

  • id: event_CID (project-wide unique event identifier #) - mandatory
  • project: PROJECT_ALIAS (alias of a specific project) - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/projectalias/api/events/destroy/6
http://company_alias.goplanapp.com/api/events/destroy?id=6&project;=projectalias&format;=json&callback;=handler

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <event>
    <all-day type="integer">1</all-day>
    <author-id>1</author-id>
    <cid type="integer">10</cid>
    <comments-count type="integer">0</comments-count>
    <created-at type="datetime">2009-03-19T19:06:58+00:00</created-at>
    <end-date type="datetime">2009-03-20T23:59:00+00:00</end-date>
    <start-date type="datetime">2009-03-19T00:00:00+00:00</start-date>
    <title>gaggg</title>
    <updated-at type="datetime">2009-03-20T18:51:42+00:00</updated-at>
    </event>
  • JSON

    
    testfun({"event": {"start_date": "2009/03/19 00:00:00 +0000", "created_at": "2009/03/19 19:06:58 +0000", "author": {"name": "George Anderson", "created_at": "2009/03/17 15:05:51 +0000", "updated_at": "2009/04/06 13:17:08 +0100", "picture_url": "http://goplanapp.com/content/server.jpg", "user_type": 0, "alias": "ganderson", "time_zone": "Lisbon", "email": "@my_email.com@my_email.com"}, "title": "gaggg", "ref_tags": [], "updated_at": "2009/03/20 18:51:42 +0000", "comments_count": 0, "cid": 10, "author_id": "1", "tags": [{"name": "ssss"}], "end_date": "2009/03/20 23:59:00 +0000", "comments": [], "all_day": 1}})
    		

update

updates an existing event and returns it

Parameters

  • id: event_CID (project-wide unique event identifier #) - mandatory
  • event[title]: event_TITLE (title of the new event) - mandatory
  • event[start_date]: event_START_DATE (starting time of the new event) - mandatory
  • event[end_date]: event_END_DATE (ending time of the new event) - mandatory
  • event[all_day]: event_ALL_DAY (marks the event as all-day if 1 or not if 0) - mandatory
  • tags[]: TAG_TEXT (use one tags[]=tagtext for each tag on the item. Specify project-wide hot-links with the notation ITEM_TYPE:ITEM_CID i.e.: event:3) - not mandatory
  • project: PROJECT_ALIAS (alias of a specific project) - mandatory
  • company: COMPANY_ALIAS (passed in as a subdomain) - mandatory
  • format: xml | json - not mandatory, defaults to the HTTP Accept header.
  • callback: JAVASCRIPT_FUNCTION (a javascript function identifier) - not mandatory, only used on json

Endpoint examples


	http://company_alias.goplanapp.com/project_alias/api/events/update/5 - pass the other parameters by POST
http://company_alias.goplanapp.com/api/events/update?id=5format=json&callback;=handlerfunction&project;=project_alias&event;[title]=design&event;[all_day]=0&event;[start_date]=Tue Apr 07 2009 19:08:36 GMT+0100 (CET)&event;[end_date]=Tue Apr 09 2009 19:08:36 GMT+0100 (CET) - date can be passed in any format that can be parsed by Ruby's Date.parse(). Javascript Date object .toString() is accepted.

Output Formats

  • XML

    
    <?xml version="1.0" encoding="UTF-8"?>
    <event>
    <all-day type="integer">1</all-day>
    <author-id>1</author-id>
    <cid type="integer">10</cid>
    <comments-count type="integer">0</comments-count>
    <created-at type="datetime">2009-03-19T19:06:58+00:00</created-at>
    <end-date type="datetime">2009-03-20T23:59:00+00:00</end-date>
    <start-date type="datetime">2009-03-19T00:00:00+00:00</start-date>
    <title>gaggg</title>
    <updated-at type="datetime">2009-03-20T18:51:42+00:00</updated-at>
    </event>
  • JSON

    
    testfun({"event": {"start_date": "2009/03/19 00:00:00 +0000", "created_at": "2009/03/19 19:06:58 +0000", "author": {"name": "ganderson", "created_at": "2009/03/17 15:05:51 +0000", "updated_at": "2009/04/06 13:17:08 +0100", "picture_url": "http://goplanapp.com/content/server.jpg", "user_type": 0, "alias": "ganderson", "time_zone": "Lisbon", "email": "ganderson@my_email.com"}, "title": "gaggg", "ref_tags": [], "updated_at": "2009/03/20 18:51:42 +0000", "comments_count": 0, "cid": 10, "author_id": "1", "tags": [{"name": "ssss"}], "end_date": "2009/03/20 23:59:00 +0000", "comments": [], "all_day": 1}})
    		

Follow us on Twitter and Facebook. Talk to us and Get Satisfaction.

Goplan is a product of Webreakstuff | Contact support | Terms of Service