question

Thiago Lopes Rosa avatar image
Thiago Lopes Rosa asked

​How should I interpret the content from a List?

How should I interpret the content from a List<LocationModel> received from a player profile with more than one item? Is this ordered? Newest or oldest first? What does it mean exactly?

Player Data
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.

Thiago Lopes Rosa avatar image Thiago Lopes Rosa commented ·

For some reason, the subject/question is not complete, it should read: "How should I interpret the content from a List<LocationModel>?"

1 Like 1 ·

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

Hi @PinkPointer,

>>How should I interpret the content from a List<LocationModel> received from a player profile with more than one item?

If there are multiple items in List<LocationModel> returned from a player profile, it generally means the player logged in different locations, each LocationModel represents a location’s info, like the following format:

"Locations": [

{

"ContinentCode": "AS",

"CountryCode": "SG",

"City": "Singapore",

"Latitude": 1.2931,

"Longitude": 103.8558

}

]

You should interpret it as a set of the player’s locations he used to log in.

>>Is this ordered? Newest or oldest first?

According to the public docs, I am not sure it’s ordered or not, or newest or oldest first. It may be chronological or alphabetical, or any other orders.

>>What does it mean exactly?

It means a set of the player’s locations he used to log in.

4 comments
10 |1200

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

Thiago Lopes Rosa avatar image Thiago Lopes Rosa commented ·

Thank you! It is only missing the answer about the order, I need that to know what should I display to the players, let's wait if someone else knows!

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Thiago Lopes Rosa commented ·

You can run a simple test to have a player log in at different locations and analyze the result to see if it's ordered or not.

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Thiago Lopes Rosa commented ·

@PinkPointer OK, it turns out that Locations in PlayerProfileModel only returns the last location (last login) for now. You can check this thread: https://community.playfab.com/questions/26091/current-location-in-playerprofilemodel-locations-l.html

0 Likes 0 ·
Thiago Lopes Rosa avatar image Thiago Lopes Rosa Citrus Yan commented ·

Thank you!

0 Likes 0 ·

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.