Skip to content

Badge names/descriptions are not returned when calling get_user_data #6

Description

@GoogleCodeExporter
When a call is made to the API requesting user data, a list of badge IDs is 
returned however the descriptions, image-paths and names are not.

The badges dict that is returned at 
https://code.google.com/p/userinfuser/source/browse/trunk/serverside/api/api.py#
255 should probably contain a structure similar to the following:

badges [
 { "name" : "First Badge",
   "id" : "badges-firstbadge-private",
   "img_src": "proto://server/path/to/image.ext"
 },
 { "name" : "Badge Two",
   "id" : "badges-badgetwo-private",
   "img_src": "proto://server/path/to/image.ext"
 },
 { "name" : "Another Badge",
   "id" : "badges-anotherbadge-private",
   "img_src": "proto://server/path/to/image.ext"
 }
]

this way you could do (jinja2 template used as an example because it's what I 
know!)

<ul>
{% for badge in badges %}
  <li>
    <img src="{{badge.img_src}}">{{badge.name}}
  </li>
{% endfor %}
</ul>

Thanks.

Original issue reported on code.google.com by m...@lunchtimetrains.co.uk on 11 Apr 2014 at 10:37

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions