3
3
4
4
from office365 .runtime .client_result import ClientResult
5
5
from 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
6
8
from office365 .runtime .paths .resource_path import ResourcePath
9
+ from office365 .runtime .paths .service_operation import ServiceOperationPath
7
10
from office365 .runtime .paths .v3 .entity import EntityPath
8
11
from office365 .runtime .queries .service_operation import ServiceOperationQuery
9
12
from office365 .sharepoint .attachments .collection import AttachmentCollection
@@ -396,9 +399,16 @@ def set_compliance_tag_with_hold(self, compliance_tag):
396
399
397
400
def get_comments (self ):
398
401
"""Retrieve ListItem comments"""
399
- return_type = CommentCollection (self .context )
402
+ return_type = CommentCollection (
403
+ self .context , ServiceOperationPath ("GetComments" , [], self .resource_path )
404
+ )
400
405
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 )
402
412
return return_type
403
413
404
414
def override_policy_tip (self , user_action , justification ):
@@ -495,6 +505,17 @@ def effective_base_permissions(self):
495
505
496
506
return self .properties .get ("EffectiveBasePermissions" , BasePermissions ())
497
507
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
+
498
519
@property
499
520
def field_values (self ):
500
521
# type: () -> Optional[dict]
@@ -513,12 +534,41 @@ def file_system_object_type(self):
513
534
"""Gets a value that specifies whether the list item is a file or a list folder"""
514
535
return self .properties .get ("FileSystemObjectType" , None )
515
536
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
+
516
545
@property
517
546
def id (self ):
518
547
# type: () -> Optional[int]
519
548
"""Gets a value that specifies the list item identifier."""
520
549
return self .properties .get ("Id" , None )
521
550
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
+
522
572
@property
523
573
def compliance_info (self ):
524
574
return self .properties .get ("ComplianceInfo" , ListItemComplianceInfo ())
@@ -589,6 +639,7 @@ def get_property(self, name, default_value=None):
589
639
"ComplianceInfo" : self .compliance_info ,
590
640
"OData__dlc_DocIdUrl" : self .doc_id_url ,
591
641
"EffectiveBasePermissions" : self .effective_base_permissions ,
642
+ "EffectiveBasePermissionsForUI" : self .effective_base_permissions_for_ui ,
592
643
"GetDlpPolicyTip" : self .get_dlp_policy_tip ,
593
644
"FieldValuesAsHtml" : self .field_values_as_html ,
594
645
"LikedByInformation" : self .liked_by_information ,
0 commit comments