question

autreras avatar image
autreras asked

Querying for rating using OData - SearchItems - Economy V2

Hello there,

I am trying to get all items published in UGC along with their ratings. The default query does not return the rating summary of each CatalogItem. I was trying to add rating to the select section of the request:

Request.Select = "rating";

Nevertheless, the response says Unsupported property 'rating' in select.

How should I ask for it? Is there any documentation on all fields that may be queried using OData?

apisIn-Game Economy
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

autreras avatar image autreras commented ·

I forgot to mention that we are currently using Unreal Engine

1 Like 1 ·
Neils Shi avatar image
Neils Shi answered

In fact, the default query is capable of returning the rating summary of each CatalogItem. The reason you didn't get a rating summary is that the rating system may have a delay of a few hours. For more information about timing in the ratings system, you can refer to Ratings design and caching. So, you can't get real-time ratings via SearchItems. Also, you can refer to this document about how to use OData select to query.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

autreras avatar image autreras commented ·

Thanks, but I tried after waiting that time and still I can't get it. I think I will try to use the Tag system. Is there a way to get real-time ratings? Maybe use the Tag System.

I also tried using the Display Properties system, and I can use it in the filter of the Game Manager, but I can't use it through the direct API.

Could not find a property named 'TotalDownloads' Correlation Id: 7dYj+hQnDE6cV1/POVV9Ow.0 - MS-CV: 7dYj+hQnDE6cV1/POVV9Ow.0

We created this property two days ago, and made sure the objects in the new catalog contain this property. Why could this be happening?

Thanks in advance

0 Likes 0 ·
Neils Shi avatar image
Neils Shi answered

I tried after waiting that time and still I can't get it. I think I will try to use the Tag system. Is there a way to get real-time ratings? Maybe use the Tag System.

Could you tell me if the Rating Overview is not showing in your Game Manager either? And how did you review the item? In my tests, I used several test accounts to review items through the API ReviewItem. After a few hours, I can successfully call the API SearchItems to return Rating. The Rating Overview can also be displayed on the Game Manager too. Since only the creator is eligible to modify the item's tag and up to 32 tags can be added to an item, It does not apply to the rating systems.

I also tried using the Display Properties system, and I can use it in the filter of the Game Manager, but I can't use it through the direct API.

You need to set certain properties in the Display property mappings section, then you can use searches, filters, and orderings when using the SearchItems API. For more details, you can refer to Display Properties.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

autreras avatar image
autreras answered

Could you tell me if the Rating Overview is not showing in your Game Manager either?

The Rating Overview is showing in the Game Manager. Maybe I should ask: The pfRating we will get is going to be null if there are no ratings yet? I would expect a pfRating to have 0 stars, but not a null instance.

You need to set certain properties in the Display property mappings section, then you can use searches, filters, and orderings when using the SearchItems API. For more details, you can refer to Display Properties.

I did, I can even see the Display Property I am searching for in the GameManager, but when I try searching for it in OData, it is not being shown.

I have read all the documentation, but the results I have are not correlated to the documentation. I recommend you putting real examples in your documentation, that way, any new user could check and develop better :) A good example would be to create a DisplayProperty and then ask for using using a request, showing how to use it in a Filter, Select and/or OrderBy (Just a feedback :) )

Here is what I have:

5792-image.png

In my request, I was writing:

Request.OrderBy = "TotalDownloads desc";

The examples that are given in PlayFab work for me, but they are not using DisplayProperties.

It would be very helpful if we could access the PlayFab OData DataModel or diagram :) Like in PostgreSQL when we read tables or use the \d command, that way, we could test it better!

Thank you in advance


image.png (24.3 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

autreras avatar image
autreras answered

I would like to add the property mapping was already there 5793-image.png


image.png (23.7 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

autreras avatar image
autreras answered

Dear Neils

Writing "DisplayProperties/TotalDownloads desc"

fixed the issue

Thank you :)

I would like to leave as feedback that it would be very useful to have some kind of data model to check if the changes of DisplayProperties were correctly added

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Neils Shi avatar image Neils Shi commented ·

Thank you for your feedback.

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.