Review type is not exposed in the API:
In [1]: p = launchpad.people["ubuntu-branches"]
In [2]: a = p.getRequestedReviews(status="Needs review")
In [3]: p[0].type --------------------------------------------------------------------------- TypeError Traceback (most recent call last)
/home/daniel/bzr/sponsoring/<ipython console> in <module>()
TypeError: 'Entry' object does not support indexing
In [4]: p[0]. .bzr .sponsors-page.py.swp
In [4]: a[0]. .bzr .sponsors-page.py.swp
In [4]: a[0].type --------------------------------------------------------------------------- AttributeError Traceback (most recent call last)
/usr/lib/pymodules/python2.6/lazr/restfulclient/resource.pyc in __getattr__(self, name) 591 if name in self._dirty_attributes: 592 return self._dirty_attributes[name] --> 593 return super(Entry, self).__getattr__(name) 594 595 def __setattr__(self, name, value):
/usr/lib/pymodules/python2.6/lazr/restfulclient/resource.pyc in __getattr__(self, attr) 307 except KeyError: 308 raise AttributeError("'%s' object has no attribute '%s'" --> 309 % (self.__class__.__name__, attr)) 310 311 def lp_values_for(self, param_name):
AttributeError: 'Entry' object has no attribute 'type'
In [5]: r = a[0]
In [6]: r. r.FIND_ATTRIBUTES r.__module__ r._root r.lp_entries r.queued_revno r.FIND_COLLECTIONS r.__ne__ r._transform_resources_to_links r.lp_get_named_operation r.queuer r.FIND_ENTRIES r.__new__ r._wadl_resource r.lp_get_parameter r.registrant r.JSON_MEDIA_TYPE r.__reduce__ r.address r.lp_has_parameter r.resource_type_link r.__class__ r.__reduce_ex__ r.all_comments r.lp_operations r.reviewed_revno r.__delattr__ r.__repr__ r.commit_message r.lp_refresh r.reviewer r.__dict__ r.__setattr__ r.createComment r.lp_save r.self_link r.__doc__ r.__sizeof__ r.date_created r.lp_values_for r.setStatus r.__eq__ r.__str__ r.date_merged r.merge_reporter r.source_branch r.__format__ r.__subclasshook__ r.date_queued r.merged_revno r.superseded_by r.__getattr__ r.__weakref__ r.date_review_requested r.nominateReviewer r.supersedes r.__getattribute__ r._create_bound_resource r.date_reviewed r.prerequisite_branch r.target_branch r.__hash__ r._dirty_attributes r.getComment r.preview_diff r.updatePreviewDiff r.__init__ r._ensure_representation r.http_etag r.private r.votes r.__members__ r._get_external_param_name r.lp_attributes r.queue_position r.__methods__ r._get_parameter_names r.lp_collections r.queue_status
In [6]: r.address Out[6]: <email address hidden>'
In [7]: r.queue_status Out[7]: u'Needs review'
In [8]: r.registrant Out[8]: <person at https://api.edge.launchpad.net/beta/~james-w>
In [9]: r.resource_type_link Out[9]: u'https://api.edge.launchpad.net/beta/#branch_merge_proposal'
In [10]: r.lp_ r.lp_attributes r.lp_get_parameter r.lp_save r.lp_collections r.lp_has_parameter r.lp_values_for r.lp_entries r.lp_operations r.lp_get_named_operation r.lp_refresh
In [10]: r.lp_attributes Out[10]: ['self_link', 'resource_type_link', 'http_etag', 'queue_status', 'private', 'date_reviewed', 'date_review_requested', 'commit_message', 'queue_position', 'date_merged', 'reviewed_revno', 'address', 'queued_revno', 'date_queued', 'merged_revno', 'date_created']
In [11]: r.lp_entries Out[11]: ['queuer', 'source_branch', 'reviewer', 'registrant', 'target_branch', 'preview_diff', 'supersedes', 'prerequisite_branch', 'superseded_by', 'merge_reporter']
In [12]: r.lp_collections Out[12]: ['votes', 'all_comments']
In [13]: r.lp_operations Out[13]: ['getComment', 'nominateReviewer', 'updatePreviewDiff', 'createComment', 'setStatus']
In [14]:
Review type is not exposed in the API:
In [1]: p = launchpad. people[ "ubuntu- branches" ]
In [2]: a = p.getRequestedR eviews( status= "Needs review")
In [3]: p[0].type ------- ------- ------- ------- ------- ------- ------- ------- ------- -----
-------
TypeError Traceback (most recent call last)
/home/daniel/ bzr/sponsoring/ <ipython console> in <module>()
TypeError: 'Entry' object does not support indexing
In [4]: p[0]. page.py. swp
.bzr .sponsors-
In [4]: p[0]. page.py. swp
.bzr .sponsors-
In [4]: a[0]. page.py. swp
.bzr .sponsors-
In [4]: a[0]. page.py. swp
.bzr .sponsors-
In [4]: a[0].type ------- ------- ------- ------- ------- ------- ------- ------- ------- -----
-------
AttributeError Traceback (most recent call last)
/home/daniel/ bzr/sponsoring/ <ipython console> in <module>()
/usr/lib/ pymodules/ python2. 6/lazr/ restfulclient/ resource. pyc in __getattr__(self, name) attributes: attributes[ name] _getattr_ _(name)
591 if name in self._dirty_
592 return self._dirty_
--> 593 return super(Entry, self)._
594
595 def __setattr__(self, name, value):
/usr/lib/ pymodules/ python2. 6/lazr/ restfulclient/ resource. pyc in __getattr__(self, attr) "'%s' object has no attribute '%s'" _class_ _.__name_ _, attr))
307 except KeyError:
308 raise AttributeError(
--> 309 % (self._
310
311 def lp_values_for(self, param_name):
AttributeError: 'Entry' object has no attribute 'type'
In [5]: r = a[0]
In [6]: r. resources_ to_links r.lp_get_ named_operation r.queuer type_link review_ requested r.nominateReviewer r.supersedes bound_resource r.date_reviewed r.prerequisite_ branch r.target_branch representation r.http_etag r.private r.votes external_ param_name r.lp_attributes r.queue_position parameter_ names r.lp_collections r.queue_status
r.FIND_ATTRIBUTES r.__module__ r._root r.lp_entries r.queued_revno
r.FIND_COLLECTIONS r.__ne__ r._transform_
r.FIND_ENTRIES r.__new__ r._wadl_resource r.lp_get_parameter r.registrant
r.JSON_MEDIA_TYPE r.__reduce__ r.address r.lp_has_parameter r.resource_
r.__class__ r.__reduce_ex__ r.all_comments r.lp_operations r.reviewed_revno
r.__delattr__ r.__repr__ r.commit_message r.lp_refresh r.reviewer
r.__dict__ r.__setattr__ r.createComment r.lp_save r.self_link
r.__doc__ r.__sizeof__ r.date_created r.lp_values_for r.setStatus
r.__eq__ r.__str__ r.date_merged r.merge_reporter r.source_branch
r.__format__ r.__subclasshook__ r.date_queued r.merged_revno r.superseded_by
r.__getattr__ r.__weakref__ r.date_
r.__getattribute__ r._create_
r.__hash__ r._dirty_attributes r.getComment r.preview_diff r.updatePreviewDiff
r.__init__ r._ensure_
r.__members__ r._get_
r.__methods__ r._get_
In [6]: r. resources_ to_links r.lp_get_ named_operation r.queuer type_link review_ requested r.nominateReviewer r.supersedes bound_resource r.date_reviewed r.prerequisite_ branch r.target_branch representation r.http_etag r.private r.votes external_ param_name r.lp_attributes r.queue_position parameter_ names r.lp_collections r.queue_status
r.FIND_ATTRIBUTES r.__module__ r._root r.lp_entries r.queued_revno
r.FIND_COLLECTIONS r.__ne__ r._transform_
r.FIND_ENTRIES r.__new__ r._wadl_resource r.lp_get_parameter r.registrant
r.JSON_MEDIA_TYPE r.__reduce__ r.address r.lp_has_parameter r.resource_
r.__class__ r.__reduce_ex__ r.all_comments r.lp_operations r.reviewed_revno
r.__delattr__ r.__repr__ r.commit_message r.lp_refresh r.reviewer
r.__dict__ r.__setattr__ r.createComment r.lp_save r.self_link
r.__doc__ r.__sizeof__ r.date_created r.lp_values_for r.setStatus
r.__eq__ r.__str__ r.date_merged r.merge_reporter r.source_branch
r.__format__ r.__subclasshook__ r.date_queued r.merged_revno r.superseded_by
r.__getattr__ r.__weakref__ r.date_
r.__getattribute__ r._create_
r.__hash__ r._dirty_attributes r.getComment r.preview_diff r.updatePreviewDiff
r.__init__ r._ensure_
r.__members__ r._get_
r.__methods__ r._get_
In [6]: r.address
Out[6]: <email address hidden>'
In [7]: r.queue_status
Out[7]: u'Needs review'
In [8]: r.registrant /api.edge. launchpad. net/beta/ ~james- w>
Out[8]: <person at https:/
In [9]: r.resource_ type_link /api.edge. launchpad. net/beta/ #branch_ merge_proposal'
Out[9]: u'https:/
In [10]: r.lp_ named_operation r.lp_refresh
r.lp_attributes r.lp_get_parameter r.lp_save
r.lp_collections r.lp_has_parameter r.lp_values_for
r.lp_entries r.lp_operations
r.lp_get_
In [10]: r.lp_attributes type_link' , review_ requested' ,
Out[10]:
['self_link',
'resource_
'http_etag',
'queue_status',
'private',
'date_reviewed',
'date_
'commit_message',
'queue_position',
'date_merged',
'reviewed_revno',
'address',
'queued_revno',
'date_queued',
'merged_revno',
'date_created']
In [11]: r.lp_entries branch' ,
Out[11]:
['queuer',
'source_branch',
'reviewer',
'registrant',
'target_branch',
'preview_diff',
'supersedes',
'prerequisite_
'superseded_by',
'merge_reporter']
In [12]: r.lp_collections
Out[12]: ['votes', 'all_comments']
In [13]: r.lp_operations wer', Diff',
Out[13]:
['getComment',
'nominateRevie
'updatePreview
'createComment',
'setStatus']
In [14]: