Google Cloud Endpoints: How to parse array-style GET query string?

33 views
Skip to first unread message

Benjamin Crom

unread,
Dec 10, 2013, 7:28:02 PM12/10/13
to google-a...@googlegroups.com

I am building a Google Cloud Endpoints API which receives the following query string via GET:

?count=10&page=1&sorting[title_column]=desc

Unfortunately when creating a resource container there is no dictionary data type in the Message.messages class. I cannot access either the key or value of the 'sorting' dictionary in the GET query string. This resource container does not work:

REQUEST_RESOURCE_CONTAINER = endpoints.ResourceContainer(
    message_types.VoidMessage,
    count=messages.IntegerField(2),
    page=messages.IntegerField(3),
    sorting=messages.StringField(4)
)

Are there any suggestions? I can't change the way the client program accesses this API and I really wanted to implement this using Google Cloud Endpoints.

Reply all
Reply to author
Forward
0 new messages