File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff Large diffs are not rendered by default.
Load diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22
3+
34class TwitterError (Exception ):
4- ''' Base class for Twitter errors'''
5+ """ Base class for Twitter errors"""
56
6- @property
7- def message (self ):
8- '''Returns the first argument used to construct this error.'''
9- return self .args [0 ]
7+ @property
8+ def message (self ):
9+ '''Returns the first argument used to construct this error.'''
10+ return self .args [0 ]
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22
3- from twitter import TwitterError
43
54class Hashtag (object ):
6- ''' A class representing a twitter hashtag
7- '''
8- def __init__ (self ,
9- text = None ):
10- self .text = text
5+ """ A class representing a twitter hashtag """
116
12- @ staticmethod
13- def NewFromJsonDict ( data ):
14- '''Create a new instance based on a JSON dict.
7+ def __init__ ( self ,
8+ text = None ):
9+ self . text = text
1510
16- Args:
17- data:
18- A JSON dict, as converted from the JSON in the twitter API
11+ @ staticmethod
12+ def NewFromJsonDict ( data ) :
13+ """Create a new instance based on a JSON dict.
1914
20- Returns:
21- A twitter.Hashtag instance
22- '''
23- return Hashtag (text = data .get ('text' , None ))
15+ Args:
16+ data:
17+ A JSON dict, as converted from the JSON in the twitter API
18+
19+ Returns:
20+ A twitter.Hashtag instance
21+ """
22+ return Hashtag (text = data .get ('text' , None ))
You can’t perform that action at this time.
0 commit comments