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
2f3c61ef
Commit
2f3c61ef
authored
May 15, 2015
by
Joshua Roesslein
Browse files
Merge pull request #596 from kimtree/add_setting_api
Adds API for account/settings
parents
b41b510c
c59a5a5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
tweepy/api.py
View file @
2f3c61ef
...
...
@@ -182,7 +182,7 @@ class API(object):
post_data
=
{}
if
media_ids
is
not
None
:
post_data
[
"media_ids"
]
=
list_to_csv
(
media_ids
)
return
bind_api
(
api
=
self
,
path
=
'/statuses/update.json'
,
...
...
@@ -586,6 +586,36 @@ class API(object):
'skip_status'
,
'include_user_entities'
]
)
@
property
def
get_settings
(
self
):
""" :reference: https://dev.twitter.com/rest/reference/get/account/settings
"""
return
bind_api
(
api
=
self
,
path
=
'/account/settings.json'
,
payload_type
=
'json'
,
use_cache
=
False
)
@
property
def
set_settings
(
self
):
""" :reference: https://dev.twitter.com/rest/reference/post/account/settings
:allowed_param:'sleep_time_enabled', 'start_sleep_time',
'end_sleep_time', 'time_zone', 'trend_location_woeid',
'allow_contributor_request', 'lang'
"""
return
bind_api
(
api
=
self
,
path
=
'/account/settings.json'
,
method
=
'POST'
,
payload_type
=
'json'
,
allowed_param
=
[
'sleep_time_enabled'
,
'start_sleep_time'
,
'end_sleep_time'
,
'time_zone'
,
'trend_location_woeid'
,
'allow_contributor_request'
,
'lang'
],
use_cache
=
False
)
def
verify_credentials
(
self
,
**
kargs
):
""" :reference: https://dev.twitter.com/rest/reference/get/account/verify_credentials
:allowed_param:'include_entities', 'skip_status'
...
...
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