Skip to main content

MYNIGHT

Description

The My Night endpoint returns the events which are associated with the user as a REQUESTED or higher position that happen the next 7 days. A user is absolutely necessary to perform the request. The returned data is user bound.

Endpoint

GET https://api.thenights.app/event_manager/user_events?request_type=MYNIGHT

Request

Headers

KeyValue
Content-Typeapplication/json

Body

ParameterTypeRequiredDescription
request_typeStringyesSet which event endpoint is contactes should be MYNIGHT.

Response

Response depends on the data currently within the data base that satisfies the set conditions.

Success Response

Code: 200 OK

ParameterTypeDescription
resultsListList of MYNIGHT events.
nextStringdirect url link used for pagination. Returns the next 8 events of my night.

Example Response Body

{
"results": [
{
"event_id": "945388d4-27f7-45ae-ac6b-b8592a74712b",
"event_name": "Techno City",
"event_type": "PARTY",
"event_public_status": "PUBLIC",
"event_description_short": "Dive into the pulsating beats and hypnotic sounds of techno at Techno City, an immersive festival experience featuring world-renowned DJs, immersive stage designs, and non-stop dancing.",
"event_startdatetime": "2023-09-07T15:22:58.322000Z",
"event_enddatetime": "2023-09-07T21:22:58.316000Z",
"event_rating": 0,
"event_likecount": 0,
"event_created": "2023-09-07T15:22:58.322000Z",
"event_status": "UPCOMING",
"event_age": 18,
"event_image": "https://api.thenights.app/media/images/default/event12.jpg",
"event_longitude": "19.005645218027310000",
"event_latitude": "50.254350840095650000",
"event_nrattendees": 1,
"event_hasMedia": false,
"event_story_thumb": null,
"event_location": {
"event_street_name": "3 Maja 18",
"event_postal_name": "Katowice",
"event_postal_code": "40-096",
"event_state_long": "MOCK State",
"event_state_short": "MOCK",
"event_country_long": "Poland",
"event_country_short": "PL"
},
"event_partner_logo": null,
"event_club_id": null,
"event_club_name": null,
},
{
"event_id": "7f816ece-0df7-4b37-b8bb-f171f88372d6",
"event_name": "Katowice Street Dance Festival",
"event_type": "PARTY",
"event_public_status": "PUBLIC",
"event_description_short": "Experience the electrifying energy of street dance at the Katowice Street Dance Festival, featuring dance battles, showcases, workshops, and performances by world-renowned dancers.",
"event_startdatetime": "2023-09-07T15:22:58.608000Z",
"event_enddatetime": "2023-09-07T21:22:58.603000Z",
"event_rating": 0,
"event_likecount": 0,
"event_created": "2023-09-07T15:22:58.608000Z",
"event_status": "UPCOMING",
"event_age": 18,
"event_image": "https://api.thenights.app/media/images/default/event10.jpg",
"event_longitude": "19.006247780348210000",
"event_latitude": "50.255664633792240000",
"event_nrattendees": 1,
"event_hasMedia": false,
"event_story_thumb": null,
"event_location": {
"event_street_name": "3 Maja 18",
"event_postal_name": "Katowice",
"event_postal_code": "40-096",
"event_state_long": "MOCK State",
"event_state_short": "MOCK",
"event_country_long": "Poland",
"event_country_short": "PL"
},
"event_partner_logo": null,
"event_club_id": null,
"event_club_name": null,
}
],
"next": null
}

Error Response

Code: 400 Bad Request

ParameterTypeDescription
detailStringoccurs when parameter are missing or an invalid request_type was provided

Technical

The endpoint uses elasticsearch to retrieve the id's of all events that have the user in their attendee list within a given time frame. The events from the id's are fetched.It then makes use of the JSON cached events. And, returns them as a list.