up-and-down's blog

By up-and-down, history, 9 months ago, In English,

Hello.
While using Codeforces API I found out that method 'user.ratedList' returns names in English even with setting parameter 'lang' to 'ru'.

r = requests.get('//codeforces.com/api/user.ratedList', params = {'lang' : 'ru'})
users = json.loads(r.text)['result']
users[0]

{u'avatar': u'//userpic.codeforces.com/422/avatar/1d4e692d6695dfa6.jpg',
 u'city': u'\u0413\u043e\u043c\u0435\u043b\u044c',
 u'contribution': 185,
 u'country': u'\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u044c',
 u'firstName': u'Gennady',
 u'friendOfCount': 11908,
 u'handle': u'tourist',
 u'lastName': u'Korotkevich',
 u'lastOnlineTimeSeconds': 1516395740,
 u'maxRank': u'\u043b\u0435\u0433\u0435\u043d\u0434\u0430\u0440\u043d\u044b\u0439 \u0433\u0440\u043e\u0441\u0441\u043c\u0435\u0439\u0441\u0442\u0435\u0440',
 u'maxRating': 3739,
 u'organization': u'\u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442 \u0418\u0422\u041c\u041e',
 u'rank': u'\u043b\u0435\u0433\u0435\u043d\u0434\u0430\u0440\u043d\u044b\u0439 \u0433\u0440\u043e\u0441\u0441\u043c\u0435\u0439\u0441\u0442\u0435\u0440',
 u'rating': 3496,
 u'registrationTimeSeconds': 1265987288,
 u'titlePhoto': u'//userpic.codeforces.com/422/title/6dd5ba0df6a2f834.jpg'}
 
 
 
 
  • Vote: I like it  
  • +52
  • Vote: I do not like it  

»
9 months ago, # |
Rev. 7   Vote: I like it -40 Vote: I do not like it

Deleted