You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was fetching some posts with their corresponding insights data from the Facebook graph API into my Laravel app and wanted to generate their DTO's, but the result is missing some DTO's.
Here is the response for the facebook call
{
"data": [
{
"insights": {
"data": [
{
"name": "post_impressions",
"period": "lifetime",
"values": [
{
"value": 614
}
],
"title": "Lifetime Post Total Impressions",
"description": "Lifetime: The number of times your Page's post entered a person's screen. Posts include statuses, photos, links, videos and more. (Total Count)"
}
],
"paging": {
"previous": "xxxxxxxxxxxxxxx",
"next": "yyyyyyyyyyyyyyy"
}
},
"created_time": "2021-10-13T16:11:55 0000",
"message": "Very important message"
}
],
"paging": {
"cursors": {
"before": "xxxxxxxxxxxxxxx",
"after": "yyyyyyyyyyyyyyy"
},
"next": "zzzzzzzzzz"
}
}
As you can see, there is paging for the data and paging for the insights, but the general response contains "data" aswell as the insights. When generating nested DTO's we only get 1 paging and 1 data DTO, while we expect 2.
Maybe we can keep track of the parent key and store children in their own folder/namespace?
The text was updated successfully, but these errors were encountered:
I was fetching some posts with their corresponding insights data from the Facebook graph API into my Laravel app and wanted to generate their DTO's, but the result is missing some DTO's.
Here is the response for the facebook call
As you can see, there is paging for the data and paging for the insights, but the general response contains "data" aswell as the insights. When generating nested DTO's we only get 1 paging and 1 data DTO, while we expect 2.
Maybe we can keep track of the parent key and store children in their own folder/namespace?
The text was updated successfully, but these errors were encountered: