@@ -282,12 +282,12 @@ class UserStatus(TwitterModel):
282
282
""" A class representing the UserStatus structure. This is an abbreviated
283
283
form of the twitter.User object. """
284
284
285
- connections = {'following' : False ,
286
- 'followed_by' : False ,
287
- 'following_received' : False ,
288
- 'following_requested' : False ,
289
- 'blocking' : False ,
290
- 'muting' : False }
285
+ _connections = {'following' : False ,
286
+ 'followed_by' : False ,
287
+ 'following_received' : False ,
288
+ 'following_requested' : False ,
289
+ 'blocking' : False ,
290
+ 'muting' : False }
291
291
292
292
def __init__ (self , ** kwargs ):
293
293
self .param_defaults = {
@@ -307,10 +307,19 @@ def __init__(self, **kwargs):
307
307
setattr (self , param , kwargs .get (param , default ))
308
308
309
309
if 'connections' in kwargs :
310
- for param in self .connections :
310
+ for param in self ._connections :
311
311
if param in kwargs ['connections' ]:
312
312
setattr (self , param , True )
313
313
314
+ @property
315
+ def connections (self ):
316
+ return {'following' : self .following ,
317
+ 'followed_by' : self .followed_by ,
318
+ 'following_received' : self .following_received ,
319
+ 'following_requested' : self .following_requested ,
320
+ 'blocking' : self .blocking ,
321
+ 'muting' : self .muting }
322
+
314
323
def __repr__ (self ):
315
324
connections = [param for param in self .connections if getattr (self , param )]
316
325
return "UserStatus(ID={uid}, ScreenName={sn}, Connections=[{conn}])" .format (
0 commit comments