Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

event

GET /event

Browse events

Example URI

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

...

Code Block
php
php
{
  "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

...

Code Block
php
php
{
  "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

...

Code Block
php
php
{
  "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

...

Code Block
php
php
{
  "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

...

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

PUT /event/:id/rsvp

Update RSVP on a specific event

...

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

GET /event/:id/guests

Get guests list of a specific event

...