Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

GET /event

Browse events

Example URI

http://example.com/restful_api/event?search[search]=christmas&when=this-month

Parameters

ParameterTypeRequire ?Description
search[search]stringnoKeyword for searching
user_idstringnoBrowse by owner id
sortstringnoSupport sort return results, available options: latestmost-likedmost-talked
whenstringnoBrowse events by start time, available options: all-timethis-monththis-weektodayupcomingongoing
limitnumbernoLimit return results
pagenumbernoPaging return results
item_idnumbernoSupport browse events on item (pages/groups)
module_idstringnoSupport search events on item (pages/groups)
categorynumbernoSupport search events by category id
viewstringnoSupport some view mode: featuredpendingmyattendingmay-attendnot-attendinginvites

Response

{
  "status": "success",
  "data": [
    {
      "rsvp_id": "1",
      "event_id": "1",
      "view_id": "0",
      "is_featured": "0",
      "is_sponsor": "0",
      "privacy": "0",
      "privacy_comment": "0",
      "module_id": "event",
      "item_id": "0",
      "user_id": "1",
      "title": "Christmas Party",
      "location": "New York",
      "country_iso": "US",
      "country_child_id": "6",
      "postal_code": null,
      "city": null,
      "time_stamp": "1481856813",
      "start_time": "1482598800",
      "end_time": "1482618600",
      "image_path": null,
      "server_id": "0",
      "total_comment": "0",
      "total_like": "0",
      "gmap": null,
      "address": null,
      "description": "Celebrate Christmas 2016 and welcome New Year 2017!!!",
      "event_date": "Saturday, December 24, 2016 6:00 pm - 11:30 pm",
      "categories": [
        [
          "Party",
          "http://example.com/event/category/2/party/"
        ]
      ]
    }
  ],
  "messages": []
}

POST /event

Post new event

Example URI

http://example.com/restful_api/event

Parameters

ParameterTypeRequire ?Description
val[category]idnoEvent category id
val[title]stringyesEvent title
val[description]stringnoEvent description
val[start_hour]numberyesStart hour
val[start_minute]numberyesStart minute
val[start_month]numberyesStart month
val[start_year]numberyesStart year
val[start_day]numberyesStart day
val[end_hour]numberyesEnd hour
val[end_minute]numberyesEnd minute
val[end_day]numberyesEnd day
val[end_month]numberyesEnd month
val[end_year]numberyesEnd year
val[location]stringyesEvent location
val[address]stringnoAddress
val[city]stringnoCity
val[postal_code]stringnoPostal Code
val[country_iso]stringnoCountry ISO
val[country_child_id]numbernoState id/ Province id
val[privacy]numberyesEvent privacy
val[privacy_comment]numberyesShare provicy
val[module_id]stringnoparent module id, support post event on item (groups, pages...)
val[item_id]numbernoparent item id, support post event on item (groups, pages...)

Response

 {
  "status": "success",
  "data": {
    "rsvp_id": "1",
    "event_id": "3",
    "view_id": "0",
    "is_featured": "0",
    "is_sponsor": "0",
    "privacy": "1",
    "privacy_comment": "1",
    "module_id": "pages",
    "item_id": "2",
    "user_id": "1",
    "title": "December Offline (Year End party)",
    "location": "Lotus Restaurent",
    "country_iso": "US",
    "country_child_id": "0",
    "postal_code": null,
    "city": null,
    "time_stamp": "1481858333",
    "start_time": "1483075800",
    "end_time": "1483137000",
    "image_path": null,
    "server_id": "0",
    "total_comment": "0",
    "total_like": "0",
    "gmap": null,
    "address": null,
    "description": "Year End party",
    "event_date": "Friday, December 30, 2016 6:30 am - 11:30 pm",
    "categories": [
      [
        "Sports",
        "http://example.com/event/category/4/sports/"
      ]
    ]
  },
  "messages": [
    "Event successfully added."
  ]
}

GET /event/:id

Get information of a specific event

Example URI

http://example.com/restful_api/event/1

Parameters

ParameterTypeRequire ?Description
idnumberyesEvent id

Response

 {
  "status": "success",
  "data": {
    "rsvp_id": "1",
    "event_id": "1",
    "view_id": "0",
    "is_featured": "0",
    "is_sponsor": "0",
    "privacy": "0",
    "privacy_comment": "0",
    "module_id": "event",
    "item_id": "0",
    "user_id": "1",
    "title": "Christmas Party",
    "location": "New York",
    "country_iso": "US",
    "country_child_id": "6",
    "postal_code": null,
    "city": null,
    "time_stamp": "1481856813",
    "start_time": "1482598800",
    "end_time": "1482618600",
    "image_path": null,
    "server_id": "0",
    "total_comment": "0",
    "total_like": "0",
    "gmap": null,
    "address": null,
    "description": "Celebrate Christmas 2016 and welcome New Year 2017!!!",
    "event_date": "Saturday, December 24, 2016 6:00 pm - 11:30 pm",
    "categories": [
      [
        "Party",
        "http://example.com/event/category/2/party/"
      ]
    ]
  },
  "messages": []
}

PUT /event/:id

Update information for a specific event

Example URI

http://example.com/restful_api/event/1

Parameters

ParameterTypeRequire ?Description
idnumberyesEvent id
val[category]numbernoEvent category id
val[title]stringnoEvent title
val[description]stringnoEvent description
val[start_hour]numbernoStart hour
val[start_minute]numbernoStart minute
val[start_month]numbernoStart month
val[start_year]numbernoStart year
val[start_day]numbernoStart day
val[end_hour]numbernoEnd hour
val[end_minute]numbernoEnd minute
val[end_day]numbernoEnd day
val[end_month]numbernoEnd month
val[end_year]numbernoEnd year
val[location]stringboEvent location
val[address]stringnoAddress
val[city]stringnoCity
val[postal_code]stringnoPostal Code
val[country_iso]stringnoCountry ISO
val[country_child_id]numbernoState id/ Province id
val[privacy]numbernoEvent privacy
val[privacy_comment]numbernoShare provicy
val[invite][]arraynoFriend id list to invite
val[personal_message]numbernoInvite message
val[emails]stringnoEmail list to invite
val[delete_image]booleannoRemove event photo
imagefilenoUpload event photo

Response

 {
  "status": "success",
  "data": {
    "rsvp_id": "1",
    "event_id": "1",
    "view_id": "0",
    "is_featured": "0",
    "is_sponsor": "0",
    "privacy": "0",
    "privacy_comment": "0",
    "module_id": "event",
    "item_id": "0",
    "user_id": "1",
    "title": "Christmas Party",
    "location": "New York",
    "country_iso": "US",
    "country_child_id": "6",
    "postal_code": null,
    "city": null,
    "time_stamp": "1481856813",
    "start_time": "1482598800",
    "end_time": "1482618600",
    "image_path": null,
    "server_id": "0",
    "total_comment": "0",
    "total_like": "0",
    "gmap": null,
    "address": null,
    "description": "Celebrate Christmas 2016 and welcome New Year 2017!!!",
    "event_date": "Saturday, December 24, 2016 6:00 pm - 11:30 pm",
    "categories": null
  },
  "messages": [
    "Event successfully updated."
  ]
}

DELETE /event/:id

Delete a specific event

Example URI

http://example.com/restful_api/event/1

Parameters

ParameterTypeRequire ?Description
idnumberyesEvent id

Response

 {
  "status": "success",
  "data": [],
  "messages": [
    "Event successfully deleted."
  ]
}

PUT /event/:id/rsvp

Update RSVP on a specific event

Example URI

http://example.com/restful_api/event/1/rsvp

Parameters

ParameterTypeRequire ?Description
idnumberyesEvent id
rsvpnumberyesRSVP id, available values: 1(attending), 2(may be attending), 3(not attending)

Response

 {
  "status": "success",
  "data": [],
  "messages": [
    "RSVP successfully updated."
  ]
}

GET /event/:id/guests

Get guests list of a specific event

Example URI

http://example.com/restful_api/event/1/guests

Parameters

ParameterTypeRequire ?Description
idnumberyesEvent id
rsvpnumbernoRSVP id (default is 1 - attending)
limitnumbernoLimit return results
pagenumbernoPaging return results

Response

 {
  "status": "success",
  "data": [
    {
      "invite_id": "1",
      "event_id": "1",
      "rsvp_id": "1",
      "user_id": "1",
      "time_stamp": "1481859987",
      "user_name": "admin",
      "full_name": "Admin"
    }
  ],
  "messages": []
}
  • No labels