forked from O365/python-o365
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.html
More file actions
1282 lines (1072 loc) · 77.6 KB
/
Copy pathutils.html
File metadata and controls
1282 lines (1072 loc) · 77.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Utils — O365 documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="prev" title="Sharepoint" href="sharepoint.html" />
<script src="../_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="../index.html" class="icon icon-home"> O365
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../usage.html">Detailed Usage</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../api.html">O365 API</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="account.html">Account</a></li>
<li class="toctree-l2"><a class="reference internal" href="address_book.html">Address Book</a></li>
<li class="toctree-l2"><a class="reference internal" href="attachment.html">Attachment</a></li>
<li class="toctree-l2"><a class="reference internal" href="calendar.html">Calendar</a></li>
<li class="toctree-l2"><a class="reference internal" href="connection.html">Connection</a></li>
<li class="toctree-l2"><a class="reference internal" href="drive.html">One Drive</a></li>
<li class="toctree-l2"><a class="reference internal" href="mailbox.html">Mailbox</a></li>
<li class="toctree-l2"><a class="reference internal" href="message.html">Message</a></li>
<li class="toctree-l2"><a class="reference internal" href="sharepoint.html">Sharepoint</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Utils</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">O365</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html">Docs</a> »</li>
<li><a href="../api.html">O365 API</a> »</li>
<li>Utils</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/api/utils.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="breadcrumb navigation">
<a href="sharepoint.html" class="btn btn-neutral" title="Sharepoint" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="module-O365.utils.utils">
<span id="utils"></span><h1>Utils<a class="headerlink" href="#module-O365.utils.utils" title="Permalink to this headline">¶</a></h1>
<dl class="py class">
<dt id="O365.utils.utils.ApiComponent">
<em class="property">class </em><code class="sig-prename descclassname">O365.utils.utils.</code><code class="sig-name descname">ApiComponent</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">protocol</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">main_resource</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#ApiComponent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.ApiComponent" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Base class for all object interactions with the Cloud Service API</p>
<p>Exposes common access methods to the api protocol within all Api objects</p>
<dl class="py method">
<dt id="O365.utils.utils.ApiComponent.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">protocol</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">main_resource</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#ApiComponent.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.ApiComponent.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Object initialization</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>protocol</strong> (<a class="reference internal" href="connection.html#O365.connection.Protocol" title="O365.connection.Protocol"><em>Protocol</em></a>) – A protocol class or instance to be used with
this connection</p></li>
<li><p><strong>main_resource</strong> (<em>str</em>) – main_resource to be used in these API
communications</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.ApiComponent.build_base_url">
<code class="sig-name descname">build_base_url</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">resource</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#ApiComponent.build_base_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.ApiComponent.build_base_url" title="Permalink to this definition">¶</a></dt>
<dd><p>Builds the base url of this ApiComponent
:param str resource: the resource to build the base url</p>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.ApiComponent.build_url">
<code class="sig-name descname">build_url</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">endpoint</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#ApiComponent.build_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.ApiComponent.build_url" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a url for a given endpoint using the protocol
service url</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>endpoint</strong> (<em>str</em>) – endpoint to build the url for</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>final url</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>str</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.ApiComponent.new_query">
<code class="sig-name descname">new_query</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attribute</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#ApiComponent.new_query"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.ApiComponent.new_query" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new query to filter results</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>attribute</strong> (<em>str</em>) – attribute to apply the query for</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>new Query</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.ApiComponent.q">
<code class="sig-name descname">q</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attribute</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#O365.utils.utils.ApiComponent.q" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new query to filter results</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>attribute</strong> (<em>str</em>) – attribute to apply the query for</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>new Query</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.ApiComponent.set_base_url">
<code class="sig-name descname">set_base_url</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">resource</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#ApiComponent.set_base_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.ApiComponent.set_base_url" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the base urls for this ApiComponent
:param str resource: the resource to build the base url</p>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt id="O365.utils.utils.CaseEnum">
<em class="property">class </em><code class="sig-prename descclassname">O365.utils.utils.</code><code class="sig-name descname">CaseEnum</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#CaseEnum"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.CaseEnum" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">enum.Enum</span></code></p>
<p>A Enum that converts the value to a snake_case casing</p>
<dl class="py method">
<dt id="O365.utils.utils.CaseEnum.from_value">
<em class="property">classmethod </em><code class="sig-name descname">from_value</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#CaseEnum.from_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.CaseEnum.from_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets a member by a snaked-case provided value</p>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt id="O365.utils.utils.ChainOperator">
<em class="property">class </em><code class="sig-prename descclassname">O365.utils.utils.</code><code class="sig-name descname">ChainOperator</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#ChainOperator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.ChainOperator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">enum.Enum</span></code></p>
<p>An enumeration.</p>
<dl class="py attribute">
<dt id="O365.utils.utils.ChainOperator.AND">
<code class="sig-name descname">AND</code><em class="property"> = 'and'</em><a class="headerlink" href="#O365.utils.utils.ChainOperator.AND" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="O365.utils.utils.ChainOperator.OR">
<code class="sig-name descname">OR</code><em class="property"> = 'or'</em><a class="headerlink" href="#O365.utils.utils.ChainOperator.OR" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="py class">
<dt id="O365.utils.utils.HandleRecipientsMixin">
<em class="property">class </em><code class="sig-prename descclassname">O365.utils.utils.</code><code class="sig-name descname">HandleRecipientsMixin</code><a class="reference internal" href="../_modules/O365/utils/utils.html#HandleRecipientsMixin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.HandleRecipientsMixin" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
</dd></dl>
<dl class="py class">
<dt id="O365.utils.utils.ImportanceLevel">
<em class="property">class </em><code class="sig-prename descclassname">O365.utils.utils.</code><code class="sig-name descname">ImportanceLevel</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#ImportanceLevel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.ImportanceLevel" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#O365.utils.utils.CaseEnum" title="O365.utils.utils.CaseEnum"><code class="xref py py-class docutils literal notranslate"><span class="pre">O365.utils.utils.CaseEnum</span></code></a></p>
<p>An enumeration.</p>
<dl class="py attribute">
<dt id="O365.utils.utils.ImportanceLevel.High">
<code class="sig-name descname">High</code><em class="property"> = 'high'</em><a class="headerlink" href="#O365.utils.utils.ImportanceLevel.High" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="O365.utils.utils.ImportanceLevel.Low">
<code class="sig-name descname">Low</code><em class="property"> = 'low'</em><a class="headerlink" href="#O365.utils.utils.ImportanceLevel.Low" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="O365.utils.utils.ImportanceLevel.Normal">
<code class="sig-name descname">Normal</code><em class="property"> = 'normal'</em><a class="headerlink" href="#O365.utils.utils.ImportanceLevel.Normal" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="py class">
<dt id="O365.utils.utils.OneDriveWellKnowFolderNames">
<em class="property">class </em><code class="sig-prename descclassname">O365.utils.utils.</code><code class="sig-name descname">OneDriveWellKnowFolderNames</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#OneDriveWellKnowFolderNames"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.OneDriveWellKnowFolderNames" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">enum.Enum</span></code></p>
<p>An enumeration.</p>
<dl class="py attribute">
<dt id="O365.utils.utils.OneDriveWellKnowFolderNames.APP_ROOT">
<code class="sig-name descname">APP_ROOT</code><em class="property"> = 'approot'</em><a class="headerlink" href="#O365.utils.utils.OneDriveWellKnowFolderNames.APP_ROOT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="O365.utils.utils.OneDriveWellKnowFolderNames.ATTACHMENTS">
<code class="sig-name descname">ATTACHMENTS</code><em class="property"> = 'attachments'</em><a class="headerlink" href="#O365.utils.utils.OneDriveWellKnowFolderNames.ATTACHMENTS" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="O365.utils.utils.OneDriveWellKnowFolderNames.CAMERA_ROLL">
<code class="sig-name descname">CAMERA_ROLL</code><em class="property"> = 'cameraroll'</em><a class="headerlink" href="#O365.utils.utils.OneDriveWellKnowFolderNames.CAMERA_ROLL" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="O365.utils.utils.OneDriveWellKnowFolderNames.DOCUMENTS">
<code class="sig-name descname">DOCUMENTS</code><em class="property"> = 'documents'</em><a class="headerlink" href="#O365.utils.utils.OneDriveWellKnowFolderNames.DOCUMENTS" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="O365.utils.utils.OneDriveWellKnowFolderNames.MUSIC">
<code class="sig-name descname">MUSIC</code><em class="property"> = 'music'</em><a class="headerlink" href="#O365.utils.utils.OneDriveWellKnowFolderNames.MUSIC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="O365.utils.utils.OneDriveWellKnowFolderNames.PHOTOS">
<code class="sig-name descname">PHOTOS</code><em class="property"> = 'photos'</em><a class="headerlink" href="#O365.utils.utils.OneDriveWellKnowFolderNames.PHOTOS" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="py class">
<dt id="O365.utils.utils.OutlookWellKnowFolderNames">
<em class="property">class </em><code class="sig-prename descclassname">O365.utils.utils.</code><code class="sig-name descname">OutlookWellKnowFolderNames</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#OutlookWellKnowFolderNames"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.OutlookWellKnowFolderNames" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">enum.Enum</span></code></p>
<p>An enumeration.</p>
<dl class="py attribute">
<dt id="O365.utils.utils.OutlookWellKnowFolderNames.ARCHIVE">
<code class="sig-name descname">ARCHIVE</code><em class="property"> = 'Archive'</em><a class="headerlink" href="#O365.utils.utils.OutlookWellKnowFolderNames.ARCHIVE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="O365.utils.utils.OutlookWellKnowFolderNames.DELETED">
<code class="sig-name descname">DELETED</code><em class="property"> = 'DeletedItems'</em><a class="headerlink" href="#O365.utils.utils.OutlookWellKnowFolderNames.DELETED" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="O365.utils.utils.OutlookWellKnowFolderNames.DRAFTS">
<code class="sig-name descname">DRAFTS</code><em class="property"> = 'Drafts'</em><a class="headerlink" href="#O365.utils.utils.OutlookWellKnowFolderNames.DRAFTS" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="O365.utils.utils.OutlookWellKnowFolderNames.INBOX">
<code class="sig-name descname">INBOX</code><em class="property"> = 'Inbox'</em><a class="headerlink" href="#O365.utils.utils.OutlookWellKnowFolderNames.INBOX" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="O365.utils.utils.OutlookWellKnowFolderNames.JUNK">
<code class="sig-name descname">JUNK</code><em class="property"> = 'JunkEmail'</em><a class="headerlink" href="#O365.utils.utils.OutlookWellKnowFolderNames.JUNK" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="O365.utils.utils.OutlookWellKnowFolderNames.OUTBOX">
<code class="sig-name descname">OUTBOX</code><em class="property"> = 'Outbox'</em><a class="headerlink" href="#O365.utils.utils.OutlookWellKnowFolderNames.OUTBOX" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="O365.utils.utils.OutlookWellKnowFolderNames.SENT">
<code class="sig-name descname">SENT</code><em class="property"> = 'SentItems'</em><a class="headerlink" href="#O365.utils.utils.OutlookWellKnowFolderNames.SENT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="py class">
<dt id="O365.utils.utils.Pagination">
<em class="property">class </em><code class="sig-prename descclassname">O365.utils.utils.</code><code class="sig-name descname">Pagination</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">parent</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">data</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">constructor</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">next_link</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">limit</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Pagination"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Pagination" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#O365.utils.utils.ApiComponent" title="O365.utils.utils.ApiComponent"><code class="xref py py-class docutils literal notranslate"><span class="pre">O365.utils.utils.ApiComponent</span></code></a></p>
<p>Utility class that allows batching requests to the server</p>
<dl class="py method">
<dt id="O365.utils.utils.Pagination.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">parent</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">data</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">constructor</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">next_link</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">limit</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Pagination.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Pagination.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns an iterator that returns data until it’s exhausted.
Then will request more data (same amount as the original request)
to the server until this data is exhausted as well.
Stops when no more data exists or limit is reached.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>parent</strong> – the parent class. Must implement attributes:
con, api_version, main_resource</p></li>
<li><p><strong>data</strong> – the start data to be return</p></li>
<li><p><strong>constructor</strong> – the data constructor for the next batch.
It can be a function.</p></li>
<li><p><strong>next_link</strong> (<em>str</em>) – the link to request more data to</p></li>
<li><p><strong>limit</strong> (<em>int</em>) – when to stop retrieving more data</p></li>
<li><p><strong>kwargs</strong> – any extra key-word arguments to pass to the
construtctor.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt id="O365.utils.utils.Query">
<em class="property">class </em><code class="sig-prename descclassname">O365.utils.utils.</code><code class="sig-name descname">Query</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attribute</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">protocol</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Helper to conform OData filters</p>
<dl class="py method">
<dt id="O365.utils.utils.Query.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attribute</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">protocol</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Build a query to apply OData filters
<a class="reference external" href="https://docs.microsoft.com/en-us/graph/query-parameters">https://docs.microsoft.com/en-us/graph/query-parameters</a></p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>attribute</strong> (<em>str</em>) – attribute to apply the query for</p></li>
<li><p><strong>protocol</strong> (<a class="reference internal" href="connection.html#O365.connection.Protocol" title="O365.connection.Protocol"><em>Protocol</em></a>) – protocol to use for connecting</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.all">
<code class="sig-name descname">all</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">collection</span></em>, <em class="sig-param"><span class="n">word</span></em>, <em class="sig-param"><span class="n">attribute</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">func</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">operation</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.all" title="Permalink to this definition">¶</a></dt>
<dd><p>Performs a filter with the OData ‘all’ keyword on the collection</p>
<p>For example:
q.any(collection=’email_addresses’, attribute=’address’,
operation=’eq’, <a class="reference external" href="mailto:word='george%40best.com">word=’george<span>@</span>best<span>.</span>com</a>’)</p>
<p>will transform to a filter such as:</p>
<p>emailAddresses/all(a:a/address eq ‘george@best.com’)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection</strong> (<em>str</em>) – the collection to apply the any keyword on</p></li>
<li><p><strong>word</strong> (<em>str</em>) – the word to check</p></li>
<li><p><strong>attribute</strong> (<em>str</em>) – the attribute of the collection to check</p></li>
<li><p><strong>func</strong> (<em>str</em>) – the logical function to apply to the attribute
inside the collection</p></li>
<li><p><strong>operation</strong> (<em>str</em>) – the logical operation to apply to the
attribute inside the collection</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.any">
<code class="sig-name descname">any</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">collection</span></em>, <em class="sig-param"><span class="n">word</span></em>, <em class="sig-param"><span class="n">attribute</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">func</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">operation</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.any"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.any" title="Permalink to this definition">¶</a></dt>
<dd><p>Performs a filter with the OData ‘any’ keyword on the collection</p>
<p>For example:
q.any(collection=’email_addresses’, attribute=’address’,
operation=’eq’, <a class="reference external" href="mailto:word='george%40best.com">word=’george<span>@</span>best<span>.</span>com</a>’)</p>
<p>will transform to a filter such as:</p>
<p>emailAddresses/any(a:a/address eq ‘george@best.com’)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>collection</strong> (<em>str</em>) – the collection to apply the any keyword on</p></li>
<li><p><strong>word</strong> (<em>str</em>) – the word to check</p></li>
<li><p><strong>attribute</strong> (<em>str</em>) – the attribute of the collection to check</p></li>
<li><p><strong>func</strong> (<em>str</em>) – the logical function to apply to the attribute
inside the collection</p></li>
<li><p><strong>operation</strong> (<em>str</em>) – the logical operation to apply to the
attribute inside the collection</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.as_params">
<code class="sig-name descname">as_params</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.as_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.as_params" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the filters, orders, select, expands and search as query parameters</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>dict</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.chain">
<code class="sig-name descname">chain</code><span class="sig-paren">(</span><em class="sig-param">operation=<ChainOperator.AND: 'and'></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.chain"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.chain" title="Permalink to this definition">¶</a></dt>
<dd><p>Start a chain operation</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>str operation</strong> (<a class="reference internal" href="#O365.utils.utils.ChainOperator" title="O365.utils.utils.ChainOperator"><em>ChainOperator</em></a><em>,</em>) – how to combine with a new one</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.clear">
<code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.clear" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear everything</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.clear_filters">
<code class="sig-name descname">clear_filters</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.clear_filters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.clear_filters" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear filters</p>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.clear_order">
<code class="sig-name descname">clear_order</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.clear_order"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.clear_order" title="Permalink to this definition">¶</a></dt>
<dd><p>Clears any order commands</p>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.close_group">
<code class="sig-name descname">close_group</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.close_group"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.close_group" title="Permalink to this definition">¶</a></dt>
<dd><p>Closes a grouping for previous filters</p>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.contains">
<code class="sig-name descname">contains</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">word</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.contains"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.contains" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a contains word check</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>word</strong> (<em>str</em>) – word to check</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.endswith">
<code class="sig-name descname">endswith</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">word</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.endswith"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.endswith" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a endswith word check</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>word</strong> (<em>str</em>) – word to check</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.equals">
<code class="sig-name descname">equals</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">word</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.equals"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.equals" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a equals check</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>word</strong> – word to compare with</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.expand">
<code class="sig-name descname">expand</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">relationships</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.expand"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.expand" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds the relationships (e.g. “event” or “attachments”)
that should be expanded with the $expand parameter
Important: The ApiComponent using this should know how to handle this relationships.</p>
<blockquote>
<div><p>eg: Message knows how to handle attachments, and event (if it’s an EventMessage).</p>
</div></blockquote>
<p>Important: When using expand on multi-value relationships a max of 20 items will be returned.
:param str relationships: the relationships tuple to expand.
:rtype: Query</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.function">
<code class="sig-name descname">function</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">function_name</span></em>, <em class="sig-param"><span class="n">word</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.function"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.function" title="Permalink to this definition">¶</a></dt>
<dd><p>Apply a function on given word</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>function_name</strong> (<em>str</em>) – function to apply</p></li>
<li><p><strong>word</strong> (<em>str</em>) – word to apply function on</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.get_expands">
<code class="sig-name descname">get_expands</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.get_expands"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.get_expands" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the result expand clause</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>str or None</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.get_filters">
<code class="sig-name descname">get_filters</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.get_filters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.get_filters" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the result filters</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>str or None</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.get_order">
<code class="sig-name descname">get_order</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.get_order"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.get_order" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the result order by clauses</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>str or None</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.get_selects">
<code class="sig-name descname">get_selects</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.get_selects"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.get_selects" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the result select clause</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>str or None</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.greater">
<code class="sig-name descname">greater</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">word</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.greater"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.greater" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a greater than check</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>word</strong> – word to compare with</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.greater_equal">
<code class="sig-name descname">greater_equal</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">word</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.greater_equal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.greater_equal" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a greater than or equal to check</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>word</strong> – word to compare with</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.has_expands">
<em class="property">property </em><code class="sig-name descname">has_expands</code><a class="headerlink" href="#O365.utils.utils.Query.has_expands" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether the query has relationships that should be expanded or not</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>bool</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.has_filters">
<em class="property">property </em><code class="sig-name descname">has_filters</code><a class="headerlink" href="#O365.utils.utils.Query.has_filters" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether the query has filters or not</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>bool</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.has_order">
<em class="property">property </em><code class="sig-name descname">has_order</code><a class="headerlink" href="#O365.utils.utils.Query.has_order" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether the query has order_by or not</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>bool</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.has_selects">
<em class="property">property </em><code class="sig-name descname">has_selects</code><a class="headerlink" href="#O365.utils.utils.Query.has_selects" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether the query has select filters or not</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>bool</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.iterable">
<code class="sig-name descname">iterable</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">iterable_name</span></em>, <em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">collection</span></em>, <em class="sig-param"><span class="n">word</span></em>, <em class="sig-param"><span class="n">attribute</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">func</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">operation</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.iterable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.iterable" title="Permalink to this definition">¶</a></dt>
<dd><p>Performs a filter with the OData ‘iterable_name’ keyword
on the collection</p>
<p>For example:
q.iterable(‘any’, collection=’email_addresses’, attribute=’address’,
operation=’eq’, <a class="reference external" href="mailto:word='george%40best.com">word=’george<span>@</span>best<span>.</span>com</a>’)</p>
<p>will transform to a filter such as:
emailAddresses/any(a:a/address eq ‘george@best.com’)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>iterable_name</strong> (<em>str</em>) – the OData name of the iterable</p></li>
<li><p><strong>collection</strong> (<em>str</em>) – the collection to apply the any keyword on</p></li>
<li><p><strong>word</strong> (<em>str</em>) – the word to check</p></li>
<li><p><strong>attribute</strong> (<em>str</em>) – the attribute of the collection to check</p></li>
<li><p><strong>func</strong> (<em>str</em>) – the logical function to apply to the attribute inside
the collection</p></li>
<li><p><strong>operation</strong> (<em>str</em>) – the logical operation to apply to the attribute
inside the collection</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.less">
<code class="sig-name descname">less</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">word</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.less"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.less" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a less than check</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>word</strong> – word to compare with</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.less_equal">
<code class="sig-name descname">less_equal</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">word</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.less_equal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.less_equal" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a less than or equal to check</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>word</strong> – word to compare with</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.logical_operator">
<code class="sig-name descname">logical_operator</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">operation</span></em>, <em class="sig-param"><span class="n">word</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.logical_operator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.logical_operator" title="Permalink to this definition">¶</a></dt>
<dd><p>Apply a logical operator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>operation</strong> (<em>str</em>) – how to combine with a new one</p></li>
<li><p><strong>word</strong> – other parameter for the operation
(a = b) would be like a.logical_operator(‘eq’, ‘b’)</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.negate">
<code class="sig-name descname">negate</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.negate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.negate" title="Permalink to this definition">¶</a></dt>
<dd><p>Apply a not operator</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.new">
<code class="sig-name descname">new</code><span class="sig-paren">(</span><em class="sig-param">attribute</em>, <em class="sig-param">operation=<ChainOperator.AND: 'and'></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.new"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.new" title="Permalink to this definition">¶</a></dt>
<dd><p>Combine with a new query</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>attribute</strong> (<em>str</em>) – attribute of new query</p></li>
<li><p><strong>operation</strong> (<a class="reference internal" href="#O365.utils.utils.ChainOperator" title="O365.utils.utils.ChainOperator"><em>ChainOperator</em></a>) – operation to combine to new query</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.on_attribute">
<code class="sig-name descname">on_attribute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attribute</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.on_attribute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.on_attribute" title="Permalink to this definition">¶</a></dt>
<dd><p>Apply query on attribute, to be used along with chain()</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>attribute</strong> (<em>str</em>) – attribute name</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.on_list_field">
<code class="sig-name descname">on_list_field</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">field</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.on_list_field"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.on_list_field" title="Permalink to this definition">¶</a></dt>
<dd><p>Apply query on a list field, to be used along with chain()</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>field</strong> (<em>str</em>) – field name (note: name is case sensitive)</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.open_group">
<code class="sig-name descname">open_group</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.open_group"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.open_group" title="Permalink to this definition">¶</a></dt>
<dd><p>Applies a precedence grouping in the next filters</p>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.order_by">
<code class="sig-name descname">order_by</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">attribute</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">ascending</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.order_by"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.order_by" title="Permalink to this definition">¶</a></dt>
<dd><p>Applies a order_by clause</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>attribute</strong> (<em>str</em>) – attribute to apply on</p></li>
<li><p><strong>ascending</strong> (<em>bool</em>) – should it apply ascending order or descending</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="#O365.utils.utils.Query" title="O365.utils.utils.Query">Query</a></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This method is part of fluent api and can be chained</p>
</div>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.remove_filter">
<code class="sig-name descname">remove_filter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">filter_attr</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.remove_filter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.remove_filter" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a filter given the attribute name</p>
</dd></dl>
<dl class="py method">
<dt id="O365.utils.utils.Query.search">
<code class="sig-name descname">search</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">text</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/utils/utils.html#Query.search"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#O365.utils.utils.Query.search" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform a search.
Not from graph docs:</p>
<blockquote>
<div><p>You can currently search only message and person collections.
A $search request returns up to 250 results.
You cannot use $filter or $orderby in a search request.</p>
</div></blockquote>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>text</strong> (<em>str</em>) – the text to search</p>
</dd>