From pablofernandezmoniz at gmail.com Tue May 10 14:30:48 2016 From: pablofernandezmoniz at gmail.com (=?UTF-8?Q?Pablo_Fern=C3=A1ndez_Moniz?=) Date: Tue, 10 May 2016 13:30:48 +0100 Subject: [Fiware-developer-experience] Doubt about update reviews Message-ID: Hi! We are adapting the client to the new data model and we have a doubt about how to update a review. We were using the following data format to update a review: data = { 'reviewBody': '' + reviewBody, 'reviewRating': { '@type': 'Rating', 'ratingValue': parseInt(ratingValue, 10) } }; In spite of returning a 204 successful code, it corrupts the value (). So we have taken a look again to the API definition http://docs.tourguide.apiary.io/#reference/api-especification-for-tourguide/review/update-reviewand we found that the expected data format is: { "reviewRating": { "ratingValue": 3 } } We have tried it, and the data corruption remains. [data_before_update.png] shows how the data was before perform the update. [patch_request.png] illustrates the performed request in the Firefox developer tools. Regards, FIWAREULPGC, -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: data_after_update.png Type: image/png Size: 101723 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: data_before_update.png Type: image/png Size: 94824 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: patch_request.png Type: image/png Size: 100688 bytes Desc: not available URL: From alberto.martin at bitergia.com Tue May 10 17:38:30 2016 From: alberto.martin at bitergia.com (=?UTF-8?Q?Alberto_Mart=C3=ADn_Casado?=) Date: Tue, 10 May 2016 17:38:30 +0200 Subject: [Fiware-developer-experience] Doubt about update reviews In-Reply-To: References: Message-ID: Hi Pablo, I've been testing this and you were right, the behavior was unexpected. After checking how we PATCH the review's entities and the new model, I've just found that, 'reviewRating' is being stored in Orion model without using 'ratingValue'. As the PATCH is being done with the 'keyValues' option enabled, the review rating should be updated like: { "reviewRating": 3 } I'll update now the API specification. Sorry for the inconvenience! Best, Alberto Mart?n On Tue, May 10, 2016 at 2:30 PM, Pablo Fern?ndez Moniz < pablofernandezmoniz at gmail.com> wrote: > Hi! > > We are adapting the client to the new data model and we have a doubt about > how to update a review. > > We were using the following data format to update a review: > > data = { > 'reviewBody': '' + reviewBody, > 'reviewRating': { > '@type': 'Rating', > 'ratingValue': parseInt(ratingValue, 10) > } > }; > > In spite of returning a 204 successful code, it corrupts the value (). > > So we have taken a look again to the API definition > http://docs.tourguide.apiary.io/#reference/api-especification-for-tourguide/review/update-reviewand > we found that the expected data format is: > > { > "reviewRating": { > "ratingValue": 3 > } > } > > We have tried it, and the data corruption remains. > > [data_before_update.png] shows how the data was before perform the update. > [patch_request.png] illustrates the performed request in the Firefox > developer tools. > > > Regards, > > FIWAREULPGC, > > _______________________________________________ > Fiware-developer-experience mailing list > Fiware-developer-experience at lists.fiware.org > https://lists.fiware.org/listinfo/fiware-developer-experience > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablofernandezmoniz at gmail.com Wed May 11 18:22:39 2016 From: pablofernandezmoniz at gmail.com (=?UTF-8?Q?Pablo_Fern=C3=A1ndez_Moniz?=) Date: Wed, 11 May 2016 17:22:39 +0100 Subject: [Fiware-developer-experience] Doubt about update reviews In-Reply-To: References: Message-ID: Hi, It seems to be working now. Thank you! Regards El 10/5/2016 16:39, "Alberto Mart?n Casado" escribi?: > Hi Pablo, > > I've been testing this and you were right, the behavior was unexpected. > After checking how we PATCH the review's entities and the new model, I've > just found that, 'reviewRating' is being stored in Orion model without > using 'ratingValue'. As the PATCH is being done with the 'keyValues' option > enabled, the review rating should be updated like: > > { > "reviewRating": 3 > } > > I'll update now the API specification. Sorry for the inconvenience! > > Best, > > > Alberto Mart?n > > On Tue, May 10, 2016 at 2:30 PM, Pablo Fern?ndez Moniz < > pablofernandezmoniz at gmail.com> wrote: > >> Hi! >> >> We are adapting the client to the new data model and we have a doubt >> about how to update a review. >> >> We were using the following data format to update a review: >> >> data = { >> 'reviewBody': '' + reviewBody, >> 'reviewRating': { >> '@type': 'Rating', >> 'ratingValue': parseInt(ratingValue, 10) >> } >> }; >> >> In spite of returning a 204 successful code, it corrupts the value (). >> >> So we have taken a look again to the API definition >> http://docs.tourguide.apiary.io/#reference/api-especification-for-tourguide/review/update-reviewand >> we found that the expected data format is: >> >> { >> "reviewRating": { >> "ratingValue": 3 >> } >> } >> >> We have tried it, and the data corruption remains. >> >> [data_before_update.png] shows how the data was before perform the update. >> [patch_request.png] illustrates the performed request in the Firefox >> developer tools. >> >> >> Regards, >> >> FIWAREULPGC, >> >> _______________________________________________ >> Fiware-developer-experience mailing list >> Fiware-developer-experience at lists.fiware.org >> https://lists.fiware.org/listinfo/fiware-developer-experience >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jaisiel at gmail.com Thu May 12 12:07:52 2016 From: jaisiel at gmail.com (Jaisiel Santana) Date: Thu, 12 May 2016 11:07:52 +0100 Subject: [Fiware-developer-experience] [Fiware/tutorials.TourGuide-App] Unexpected occupancyLevels date when retrieving a restaurany by date. Message-ID: Hi! we have found an unexpected behaviour when we try to retrieve a restaurant by date as specified at : http://docs.tourguide.apiary.io/#reference/api-especification-for-tourguide/restaurant/get-restaurant-with-a-given-date For example if we request: GET http://tourguide/api/orion/restaurant/Uriarte/date/2016-05-31T15:00:00.000Z we get a response such as: [ { "@context": "http://schema.org", "@type": "Restaurant", "additionalProperty": [ { "value": 80, "name": "capacity", "@type": "PropertyValue" }, { "value": 0, "name": "occupancyLevels", "@type": "PropertyValue", *"timestamp": "2016-05-12T07:02:27.852Z"* } ], ......... We have noticed that the returned timestamp is the actual timestamp. Regards, FIWAREULPGC. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: unexpected_occupancy_levels.png Type: image/png Size: 159343 bytes Desc: not available URL: From alberto.martin at bitergia.com Fri May 13 00:25:29 2016 From: alberto.martin at bitergia.com (=?UTF-8?Q?Alberto_Mart=C3=ADn_Casado?=) Date: Fri, 13 May 2016 00:25:29 +0200 Subject: [Fiware-developer-experience] [Fiware/tutorials.TourGuide-App] Unexpected occupancyLevels date when retrieving a restaurany by date. In-Reply-To: References: Message-ID: Hi Jaisiel, Thanks for the feedback. I've opened an issue to work on it. Best, Alberto Mart?n On Thu, May 12, 2016 at 12:07 PM, Jaisiel Santana wrote: > Hi! > > we have found an unexpected behaviour when we try to retrieve a restaurant > by date as specified at : > http://docs.tourguide.apiary.io/#reference/api-especification-for-tourguide/restaurant/get-restaurant-with-a-given-date > > For example if we request: > > GET > http://tourguide/api/orion/restaurant/Uriarte/date/2016-05-31T15:00:00.000Z > > we get a response such as: > > [ > { > "@context": "http://schema.org", > "@type": "Restaurant", > "additionalProperty": > [ > { > "value": 80, > "name": "capacity", > "@type": "PropertyValue" > }, > { > "value": 0, > "name": "occupancyLevels", > "@type": "PropertyValue", > *"timestamp": "2016-05-12T07:02:27.852Z"* > } > ], > ......... > > > > We have noticed that the returned timestamp is the actual timestamp. > > Regards, > > FIWAREULPGC. > > > _______________________________________________ > Fiware-developer-experience mailing list > Fiware-developer-experience at lists.fiware.org > https://lists.fiware.org/listinfo/fiware-developer-experience > > -------------- next part -------------- An HTML attachment was scrubbed... URL: