This repository was archived by the owner on Aug 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1949,7 +1949,8 @@ def GetDirectMessages(self,
19491949 count = None ,
19501950 include_entities = True ,
19511951 skip_status = False ,
1952- full_text = False ):
1952+ full_text = False ,
1953+ page = None ):
19531954 """Returns a list of the direct messages sent to the authenticating user.
19541955
19551956 The twitter.Api instance must be authenticated.
@@ -1978,6 +1979,11 @@ def GetDirectMessages(self,
19781979 full_text:
19791980 When set to True full message will be included in the returned message
19801981 object if message length is bigger than 140 characters. [Optional]
1982+ page:
1983+ If you want more than 200 messages, you can use this and get 20 messages
1984+ each time. You must recall it and increment the page value until it
1985+ return nothing. You can't use count option with it. First value is 1 and
1986+ not 0.
19811987
19821988 Returns:
19831989 A sequence of twitter.DirectMessage instances
@@ -2002,6 +2008,8 @@ def GetDirectMessages(self,
20022008 parameters ['skip_status' ] = 1
20032009 if full_text :
20042010 parameters ['full_text' ] = 'true'
2011+ if page :
2012+ parameters ['page' ] = page
20052013
20062014 json_data = self ._RequestUrl (url , 'GET' , data = parameters )
20072015 data = self ._ParseAndCheckTwitter (json_data .content )
You can’t perform that action at this time.
0 commit comments