33
44from office365 .runtime .client_result import ClientResult
55from office365 .runtime .client_value_collection import ClientValueCollection
6+ from office365 .runtime .http .http_method import HttpMethod
7+ from office365 .runtime .http .request_options import RequestOptions
68from office365 .runtime .paths .resource_path import ResourcePath
9+ from office365 .runtime .paths .service_operation import ServiceOperationPath
710from office365 .runtime .paths .v3 .entity import EntityPath
811from office365 .runtime .queries .service_operation import ServiceOperationQuery
912from office365 .sharepoint .attachments .collection import AttachmentCollection
@@ -396,9 +399,16 @@ def set_compliance_tag_with_hold(self, compliance_tag):
396399
397400 def get_comments (self ):
398401 """Retrieve ListItem comments"""
399- return_type = CommentCollection (self .context )
402+ return_type = CommentCollection (
403+ self .context , ServiceOperationPath ("GetComments" , [], self .resource_path )
404+ )
400405 qry = ServiceOperationQuery (self , "GetComments" , [], None , None , return_type )
401- self .context .add_query (qry )
406+
407+ def _create_request (request ):
408+ # type: (RequestOptions) -> None
409+ request .method = HttpMethod .Get
410+
411+ self .context .add_query (qry ).before_query_execute (_create_request )
402412 return return_type
403413
404414 def override_policy_tip (self , user_action , justification ):
@@ -495,6 +505,17 @@ def effective_base_permissions(self):
495505
496506 return self .properties .get ("EffectiveBasePermissions" , BasePermissions ())
497507
508+ @property
509+ def effective_base_permissions_for_ui (self ):
510+ """Specifies the effective base permissions for the current user, as they SHOULD be displayed in the user
511+ interface (UI). If the list is not in read-only UI mode, the value of EffectiveBasePermissionsForUI
512+ MUST be the same as the value of EffectiveBasePermissions (section 3.2.5.87.1.1.2).
513+ If the list is in read-only UI mode, the value of EffectiveBasePermissionsForUI MUST be a subset of the
514+ value of EffectiveBasePermissions."""
515+ from office365 .sharepoint .permissions .base_permissions import BasePermissions
516+
517+ return self .properties .get ("EffectiveBasePermissionsForUI" , BasePermissions ())
518+
498519 @property
499520 def field_values (self ):
500521 # type: () -> Optional[dict]
@@ -513,12 +534,41 @@ def file_system_object_type(self):
513534 """Gets a value that specifies whether the list item is a file or a list folder"""
514535 return self .properties .get ("FileSystemObjectType" , None )
515536
537+ @property
538+ def icon_overlay (self ):
539+ # type: () -> Optional[str]
540+ """This is an overlay icon for the item. If the parent list of the item does not already have the IconOverlay
541+ field and The user setting the property does not have rights to add the field to the list then the property
542+ will not be set for the item."""
543+ return self .properties .get ("IconOverlay" , None )
544+
516545 @property
517546 def id (self ):
518547 # type: () -> Optional[int]
519548 """Gets a value that specifies the list item identifier."""
520549 return self .properties .get ("Id" , None )
521550
551+ @property
552+ def server_redirected_embed_uri (self ):
553+ # type: () -> Optional[str]
554+ """Returns the path for previewing a document in the browser, often in an interactive way, if
555+ that feature exists."""
556+ return self .properties .get ("ServerRedirectedEmbedUri" , None )
557+
558+ @property
559+ def server_redirected_embed_url (self ):
560+ # type: () -> Optional[str]
561+ """Returns the URL for previewing a document in the browser, often in an interactive way, if that feature
562+ exists. This is currently used in the hovering panel of search results and document library.
563+ """
564+ return self .properties .get ("ServerRedirectedEmbedUri" , None )
565+
566+ @property
567+ def client_title (self ):
568+ # type: () -> Optional[str]
569+ """ """
570+ return self .properties .get ("Client_Title" , None )
571+
522572 @property
523573 def compliance_info (self ):
524574 return self .properties .get ("ComplianceInfo" , ListItemComplianceInfo ())
@@ -589,6 +639,7 @@ def get_property(self, name, default_value=None):
589639 "ComplianceInfo" : self .compliance_info ,
590640 "OData__dlc_DocIdUrl" : self .doc_id_url ,
591641 "EffectiveBasePermissions" : self .effective_base_permissions ,
642+ "EffectiveBasePermissionsForUI" : self .effective_base_permissions_for_ui ,
592643 "GetDlpPolicyTip" : self .get_dlp_policy_tip ,
593644 "FieldValuesAsHtml" : self .field_values_as_html ,
594645 "LikedByInformation" : self .liked_by_information ,
0 commit comments