Cannot access the language API data anonymously
Bug #561355 reported by
David Planella
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Low
|
Adi Roiban |
Bug Description
I was trying to get some language data using the new languages API, but I didn't seem to be able to.
Here is what I tested:
>>> from launchpadlib.
>>> cachedir = "/home/
>>> launchpad = Launchpad.
>>> langs = launchpad.languages
>>> print len(langs)
383
>>> for lang in langs:
... print lang.code
...
>>>
I could neither get the list of all languages nor access specific language entries.
Related branches
lp:~adiroiban/launchpad/bug-561355
Merged
into
lp:launchpad
- Aaron Bentley (community): Approve
-
Diff: 74 lines (+19/-4)3 files modifiedlib/canonical/launchpad/security.py (+10/-0)
lib/lp/services/worlddata/interfaces/language.py (+6/-1)
lib/lp/services/worlddata/stories/webservice/xx-language.txt (+3/-3)
Changed in rosetta: | |
importance: | Undecided → Low |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in rosetta: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
hm....
I have tested on Karmic and it is working.
Since your session already recognized there are 383 languages, it should be working,
Also the JSON output looks good on all API versions: /launchpad. net/api/ 1.0/+languages /launchpad. net/api/ beta/+languages /launchpad. net/api/ devel/+ languages
https:/
https:/
https:/
here is my output.
----
>>> langs[0] /api.edge. launchpad. net/beta/ +languages/ ab>
<language at https:/
>>> langs[0].code
u'ab'
>>> for lang in langs:
... print lang.code
...
ab
ace
ach
ada
ALL_OTHER_LANGUAGES