You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add support for include_hidden_folders query parameter in list folders endpoint (#426)
* feat: add support for include_hidden_folders query parameter in list folders endpoint
* Fix conflicts, synchronize tests
---------
Co-authored-by: Samuel Xavier <107475513+samuelpx@users.noreply.github.com>
Co-authored-by: Samuel Xavier <samuelxpp@gmail.com>
This example demonstrates how to use the `include_hidden_folders` query parameter when listing folders with the Nylas Python SDK.
4
+
5
+
## Overview
6
+
7
+
The `include_hidden_folders` parameter is Microsoft-specific and allows you to include hidden folders in the folder listing response. By default, this parameter is `False` and hidden folders are not included.
8
+
9
+
## Prerequisites
10
+
11
+
1. A Nylas application with Microsoft OAuth configured
12
+
2. A valid Nylas API key
13
+
3. A grant ID for a Microsoft account
14
+
15
+
## Setup
16
+
17
+
1. Set your environment variables:
18
+
```bash
19
+
export NYLAS_API_KEY="your_api_key_here"
20
+
export NYLAS_GRANT_ID="your_grant_id_here"
21
+
export NYLAS_API_URI="https://api.us.nylas.com"# Optional, defaults to US
22
+
```
23
+
24
+
2. Install the Nylas Python SDK:
25
+
```bash
26
+
pip install nylas
27
+
```
28
+
29
+
## Running the Example
30
+
31
+
```bash
32
+
python include_hidden_folders_example.py
33
+
```
34
+
35
+
## Code Explanation
36
+
37
+
The example demonstrates two scenarios:
38
+
39
+
1.**Default behavior**: Lists folders without hidden folders
40
+
```python
41
+
folders_response = nylas.folders.list(
42
+
identifier=grant_id,
43
+
query_params={"limit": 10}
44
+
)
45
+
```
46
+
47
+
2.**With hidden folders**: Lists folders including hidden folders (Microsoft only)
0 commit comments