I am working on an app to retrieve a list of messages in a users' unity inbox. I am using the ReST .net Unity SDK in C#. When I call the GetMessages method of the UserMessage class, I am specifying the page that I want returned and the number of messages per page that I want returned.
No matter what parameters I specify, GetMessages returns all the messages.
var res = UserMessage.GetMessages(connectionServerInbox, ObjectId, out oMessages, 1, 5, MessageSortOrder.NEWEST_FIRST, MessageFilter.None, MailboxFolder.inbox);
According to the API in this example oMessages should contain the first 5 messages for the user that I selected. Instead it has all 27 messages.
Any insight to what I'm doing wrong would be appreciated.
While I can't give you a solution.. the first thing I usually do if something doesn't work as expected is fire up fiddler, and look at what request is really sent over the wire, then compare that with the definition of the API. Extraction sounds like a GET so that's something you can even replay in the browser.
I will give that a try.
Please sign in to leave a comment.