Well actually I need to create an ical feed for events for my clients. Since I havenāt found a solid way to generate one in Bubble I am trying to output my events (including data from Things that are associated with the events) as json so I can use an external tool to convert the data to an ical feed.
So at the moment I am trying to generate output from my Bubble app (an event organization app) containing all relevant info about a list of events (specific to each client).
The data is set-up as follows (simplified):
Type:
Event
Fields:
StartDateTime - date
EndDateTime - date
Location: geographic address
Note - list of Notes
List of Event Items - List of Event Items
Client - User
Type:
Note
Fields:
Note - text
Creator - User
Type:
Event Item
Fields:
EventItemArticle - Article
EventItemStatus - Status
Creator - User
Type:
Article
Fields:
ArticleName - text
ArticleDescription - text
Type:
Status
Fields:
StatusName - text (ie. āConfirmedā, āRequestedā, etc.)
The JSON data is coming back from the API using Postman.
In essence I am trying to generate a full list of all events (in the form of JSON or any other useful format) for a specific client, where all nested data is shown. Something like:
Events for Client X:
- Event 1:
- StartDateTime: time
- EndDateTime: time
- Location: some address
- Notes:
- List of Event Items:
- Item 1
- Article:
- Article A
- ArticleName: Some article
- ArticleDescription: Some description
- Status: Confirmed
- Item 2
- Article
- Article B
- ArticleName: Some other article
- ArticleDescription: Some other description
- Status: Requested
- Event 2:
- StartDateTime: different time
- EndDateTime: different time
- Location: some other address
- Notes:
- List of Event Items:
- Item 1
- Article:
- Article A
- ArticleName: Some article
- ArticleDescription: Some description
- Status: Confirmed
For some reason I canāt seem to make the API endpoint (or data API for that matter) reply with the events including the nested data. eg. the output looks like (copied straight from the response in Postman):
{
"status": "success",
"response": {
"events": [
{
"Created Date": 1546683866298,
"Created By": "1546042074550x715081543363885000",
"Modified Date": 1547511656369,
"StartDateTime": 1547679600000,
"EventName": "Event Soandso",
"EndDateTime": 1547683200000,
"List of Event Items": [
"1546718578975x101170693216141310",
"1546718585024x909448081750098000",
"1546719654222x520787920184672260"
],
"Location": {
"address": "Vrouwensteeg 11, 2311 EB Leiden, Nederland",
"lat": 52.1600189,
"lng": 4.4884601
},
"_id": "1546683865578x284830606366867460",
"_type": "custom.event"
},.......
So it shows the idās for each Event Item associated with that particular event, but it doesnāt āexpandā the relevant data (ie. Articles, Status, etc.).
Hope this clarifies my problem and really hope you can help me out here!
Thank you so much for your time already!