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

« Previous Version 3 Next »

event

GET /event

Browse events

Example URI

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

h3. Parameters

Parameter

Type

Require ?

Description

searchsearch

string

no

Keyword for searching

user_id

string

no

Browse by owner id

sort

string

no

Support sort return results, available options: latest, most-liked, most-talked

when

string

no

Browse events by start time, available options: all-time, this-month, this-week, today, upcoming, ongoing

limit

number

no

Limit return results

page

number

no

Paging return results

item_id

number

no

Support browse events on item (pages/groups)

module_id

string

no

Support search events on item (pages/groups)

category

number

no

Support search events by category id

view

string

no

Support some view mode: featured, pending, my, attending, may-attend, not-attending, invites

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

h3. Parameters

Parameter

Type

Require ?

Description

valcategory

id

no

Event category id

valtitle

string

yes

Event title

valdescription

string

no

Event description

valstart_hour

number

yes

Start hour

valstart_minute

number

yes

Start minute

valstart_month

number

yes

Start month

valstart_year

number

yes

Start year

valstart_day

number

yes

Start day

valend_hour

number

yes

End hour

valend_minute

number

yes

End minute

valend_day

number

yes

End day

valend_month

number

yes

End month

valend_year

number

yes

End year

vallocation

string

yes

Event location

valaddress

string

no

Address

valcity

string

no

City

valpostal_code

string

no

Postal Code

valcountry_iso

string

no

Country ISO

valcountry_child_id

number

no

State id/ Province id

valprivacy

number

yes

Event privacy

valprivacy_comment

number

yes

Share provicy

valmodule_id

string

no

parent module id, support post event on item (groups, pages...)

valitem_id

number

no

parent 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

h3. Parameters

Parameter

Type

Require ?

Description

id

number

yes

Event 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

h3. Parameters

Parameter

Type

Require ?

Description

id

number

yes

Event id

valcategory

number

no

Event category id

valtitle

string

no

Event title

valdescription

string

no

Event description

valstart_hour

number

no

Start hour

valstart_minute

number

no

Start minute

valstart_month

number

no

Start month

valstart_year

number

no

Start year

valstart_day

number

no

Start day

valend_hour

number

no

End hour

valend_minute

number

no

End minute

valend_day

number

no

End day

valend_month

number

no

End month

valend_year

number

no

End year

vallocation

string

bo

Event location

valaddress

string

no

Address

valcity

string

no

City

valpostal_code

string

no

Postal Code

valcountry_iso

string

no

Country ISO

valcountry_child_id

number

no

State id/ Province id

valprivacy

number

no

Event privacy

valprivacy_comment

number

no

Share provicy

valinvite[]

array

no

Friend id list to invite

valpersonal_message

number

no

Invite message

valemails

string

no

Email list to invite

valdelete_image

boolean

no

Remove event photo

image

file

no

Upload 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

h3. Parameters

Parameter

Type

Require ?

Description

id

number

yes

Event 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

h3. Parameters

Parameter

Type

Require ?

Description

id

number

yes

Event id

rsvp

number

yes

RSVP 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

h3. Parameters

Parameter

Type

Require ?

Description

id

number

yes

Event id

rsvp

number

no

RSVP id (default is 1 - attending)

limit

number

no

Limit return results

page

number

no

Paging 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