SETUP
Description
This API endpoint is intended for the initial setup of the app or webpage. It fetches the information of the event endpoints NEAR, STATUS & MYNIGHT. It is used to either setup or update the frontpage of the application. It definitely requires a user!
Endpoint
GET https://api.thenights.app/event_manager/user_events?request_type=SETUP&paginated=TRUE&longitude=18.990621&latitude=50.254416&dist=10
Request
Headers
| Key | Value |
|---|---|
| Content-Type | application/json |
Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| request_type | String | yes | Set which event endpoint is contactes should be SETUP. |
| longitude | Float | yes | current longitude of the center point. |
| latitude | Float | yes | current latitude of the center point. |
| dist | Integer | yes | the distance one wants to fetch. In this case radiues of the circle. |
| paginated | Boolean | no | Should the events be paginated. Not necessary. |
Response
Response depends on the data currently within the data base that satisfies the set conditions.
Success Response
Code: 200 OK
| Parameter | Type | Description |
|---|---|---|
| near | Object | the NEAR event objects with a list of near events and the corresponding next pagination url. |
| status | Object | the STATUS event reel objects with a list of events which have a status as well as their media objects and the corresponding next pagination url. |
| nights | Object | the MYNIGHT event objects with a list of events which are either upcoming in the next 7 days or currently running and the user is part of. The corresponding next pagination url. |
Example Response Body
{
"near": {
"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_isLiked": false,
"event_likedid": null
},
],
"next": null
},
"status": {
"results": [
{
"event_id": "229f43ee-52e4-47d7-ade6-9e9d48a55bd3",
"event_name": "Amsterdam Street Art Festival",
"event_type": "PARTY",
"event_public_status": "PUBLIC",
"event_description_short": "Experience the vibrant street art scene of Amsterdam as talented artists transform public spaces into captivating works of art.",
"event_startdatetime": "2023-09-07T06:14:24.185000Z",
"event_enddatetime": "2023-09-07T12:14:24.180000Z",
"event_rating": 0,
"event_likecount": 1,
"event_created": "2023-09-07T06:14:24.185000Z",
"event_status": "RUNNING",
"event_age": 18,
"event_image": "https://api.thenights.app/media/images/default/event16.jpg",
"event_longitude": "4.897829445559270000",
"event_latitude": "52.367748113094280000",
"event_nrattendees": 1,
"event_hasMedia": true,
"event_story_thumb": "https://api.thenights.app/media/2023/9/7/c0a6c1d5-89a6-4407-98c5-c46e4fa2ae37.webp",
"event_location": {
"event_street_name": "Oudezijds Achterburgwal",
"event_postal_name": "Amsterdam",
"event_postal_code": "00",
"event_state_long": "MOCK State",
"event_state_short": "MOCK",
"event_country_long": "Netherland",
"event_country_short": "NL"
},
"event_partner_logo": null,
"event_club_id": null,
"event_club_name": null,
"event_media": [
{
"event_media_id": "355ef778-2099-4897-b9ab-c5b391fdd359",
"event_media_media": "https://api.thenights.app/media/2023/9/7/2b46e4d6-5705-48f4-b1f3-293dea8461b6.mp4",
"event_media_type": "VIDEO",
"event_media_format": "PORTRAIT",
"event_media_formtype": "mp4",
"event_media_creator": "ac3d3851-daaf-4ad2-b42f-1509bdc0b12f",
"event_media_created_at": "2023-09-07T08:26:46.654000Z",
"event_media_thumb": "https://api.thenights.app/media/2023/9/7/c0a6c1d5-89a6-4407-98c5-c46e4fa2ae37.webp",
"event_media_flames": null,
"event_media_event_id": "229f43ee-52e4-47d7-ade6-9e9d48a55bd3"
},
{
"event_media_id": "f855b26a-69dc-4ea9-af15-075ffb1a4b42",
"event_media_media": "https://api.thenights.app/media/2023/9/7/fc27f50b-3e32-4128-a115-dd35482711c7.4C6A2BE5-0E59-456E-B6DF-2BCFDE4A697D.jpg",
"event_media_type": "IMAGE",
"event_media_format": "UNDEFINED",
"event_media_formtype": "4C6A2BE5-0E59-456E-B6DF-2BCFDE4A697D.jpg",
"event_media_creator": "ac3d3851-daaf-4ad2-b42f-1509bdc0b12f",
"event_media_created_at": "2023-09-07T08:26:53.418000Z",
"event_media_thumb": "https://api.thenights.app/media/2023/9/7/fc27f50b-3e32-4128-a115-dd35482711c7.4C6A2BE5-0E59-456E-B6DF-2BCFDE4A697D.jpg",
"event_media_flames": null,
"event_media_event_id": "229f43ee-52e4-47d7-ade6-9e9d48a55bd3"
},
{
"event_media_id": "a9dbd10f-c023-439b-b455-a54cd1c9f6b6",
"event_media_media": null,
"event_media_type": "IMAGE",
"event_media_format": "UNDEFINED",
"event_media_formtype": "D649DF2D-F95C-4CE0-B3F9-D276F0A0A2B6.jpg",
"event_media_creator": "ac3d3851-daaf-4ad2-b42f-1509bdc0b12f",
"event_media_created_at": "2023-09-07T08:42:18.662050Z",
"event_media_thumb": null,
"event_media_flames": null,
"event_media_event_id": "229f43ee-52e4-47d7-ade6-9e9d48a55bd3"
},
{
"event_media_id": "3e74717f-4be7-4947-a6b7-8fdf7c36efc9",
"event_media_media": null,
"event_media_type": "IMAGE",
"event_media_format": "UNDEFINED",
"event_media_formtype": "530ABB8D-77BB-49F9-A680-C5B662463B34.jpg",
"event_media_creator": "ac3d3851-daaf-4ad2-b42f-1509bdc0b12f",
"event_media_created_at": "2023-09-07T09:11:57.218959Z",
"event_media_thumb": null,
"event_media_flames": null,
"event_media_event_id": "229f43ee-52e4-47d7-ade6-9e9d48a55bd3"
}
]
},
{
"event_id": "47e528ef-6f78-47ec-a6eb-31dab2094b35",
"event_name": "Amsterdam Film Festival",
"event_type": "PARTY",
"event_public_status": "PUBLIC",
"event_description_short": "Embark on a cinematic journey as the Amsterdam Film Festival showcases a diverse selection of compelling films from around the world.",
"event_startdatetime": "2023-09-07T06:14:23.988000Z",
"event_enddatetime": "2023-09-07T12:14:23.983000Z",
"event_rating": 0,
"event_likecount": 0,
"event_created": "2023-09-07T06:14:23.988000Z",
"event_status": "RUNNING",
"event_age": 18,
"event_image": "https://api.thenights.app/media/images/default/event01.jpg",
"event_longitude": "4.899488094884950000",
"event_latitude": "52.370000039078090000",
"event_nrattendees": 1,
"event_hasMedia": true,
"event_story_thumb": "https://api.thenights.app/media/2023/9/7/6ad245a1-61c2-4132-9d62-01603126beca.C4EA5B68-4C7C-468C-87E2-4EB68060541D.jpg",
"event_location": {
"event_street_name": "Oudezijds Achterburgwal",
"event_postal_name": "Amsterdam",
"event_postal_code": "00",
"event_state_long": "MOCK State",
"event_state_short": "MOCK",
"event_country_long": "Netherland",
"event_country_short": "NL"
},
"event_partner_logo": null,
"event_club_id": null,
"event_club_name": null,
"event_media": [
{
"event_media_id": "1205f119-ad46-4480-8014-c2e08fa463eb",
"event_media_media": "https://api.thenights.app/media/2023/9/7/6ad245a1-61c2-4132-9d62-01603126beca.C4EA5B68-4C7C-468C-87E2-4EB68060541D.jpg",
"event_media_type": "IMAGE",
"event_media_format": "UNDEFINED",
"event_media_formtype": "C4EA5B68-4C7C-468C-87E2-4EB68060541D.jpg",
"event_media_creator": "ac3d3851-daaf-4ad2-b42f-1509bdc0b12f",
"event_media_created_at": "2023-09-07T09:26:25.662888Z",
"event_media_thumb": "https://api.thenights.app/media/2023/9/7/6ad245a1-61c2-4132-9d62-01603126beca.C4EA5B68-4C7C-468C-87E2-4EB68060541D.jpg",
"event_media_flames": null,
"event_media_event_id": "47e528ef-6f78-47ec-a6eb-31dab2094b35"
}
]
}
],
"next": null
},
"nights": {
"results": [],
"next": null
}
}
Error Response
Code: 400 Bad Request
| Parameter | Type | Description |
|---|---|---|
| detail | String | occurs when parameter are missing or an invalid request_type was provided |
Technical
The endpoint makes use of the handleStatus, handleNear & handleMyNight function. For futher information check the documentation on these endpoint functionalities.