Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
tweepy
Commits
09e60de8
Commit
09e60de8
authored
Dec 02, 2013
by
Joshua Roesslein
Browse files
Merge pull request #369 from govind-menon/master
Added supported languages from help/languages
parents
8516642d
fdfcafba
Changes
2
Show whitespace changes
Inline
Side-by-side
tests/test_api.py
View file @
09e60de8
...
...
@@ -317,6 +317,15 @@ class TweepyAPITests(TweepyTestCase):
self
.
assertTrue
(
place_name_in_list
(
'Austin, TX'
,
self
.
api
.
reverse_geocode
(
lat
=
30.267370168467806
,
long
=
-
97.74261474609375
)))
# Austin, TX, USA
def
testsupportedlanguages
(
self
):
languages
=
self
.
api
.
supported_languages
()
expected_dict
=
{
"name"
:
"English"
,
"code"
:
"en"
,
"status"
:
"production"
}
self
.
assertTrue
(
expected_dict
in
languages
)
class
TweepyCacheTests
(
unittest
.
TestCase
):
timeout
=
2.0
...
...
tweepy/api.py
View file @
09e60de8
...
...
@@ -666,6 +666,13 @@ class API(object):
allowed_param
=
[
'lat'
,
'long'
,
'name'
,
'contained_within'
]
)
""" help/languages.json """
supported_languages
=
bind_api
(
path
=
'/help/languages.json'
,
payload_type
=
'json'
,
require_auth
=
True
)
""" Internal use only """
@
staticmethod
def
_pack_image
(
filename
,
max_size
,
form_field
=
"image"
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment