Skip to content

Commit 42fc98a

Browse files
committed
Update README with detailed endpoint descriptions and usage examples
1 parent 4f78fd7 commit 42fc98a

File tree

1 file changed

+41
-7
lines changed

1 file changed

+41
-7
lines changed

README.md

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,52 @@ PowerShell module to interact with the [**Raindrop.io**](https://developer.raind
77
## Available Endpoints
88

99
### Authentication
10-
- **Get-RaindropAuthHeader**: Builds an authorization header for API requests.
10+
- **Get-RaindropAuthHeader**: Builds an authorization header for API requests using the provided API token.
1111

1212
### User
13-
- **Get-RaindropBackup**: Retrieves a list of backups for the authenticated user.
14-
-
13+
- **Get-RaindropUser**: Retrieves information about the authenticated user.
14+
1515
### Backup
16-
- **New-RaindropBackup**: Creates a new backup for the authenticated user. This requires some time.
17-
- **Get-RaindropBackup**: Retrieves a list of backups for the authenticated user.
18-
- **Save-RaindropBackup**: Saves a backup to a file in the specified format.
16+
- **New-RaindropBackup**: Initiates the creation of a new backup for the authenticated user. This process may take some time.
17+
- **Get-RaindropBackup**: Retrieves a list of available backups for the authenticated user.
18+
- **Save-RaindropBackup**: Downloads and saves a specific backup to a file in CSV or HTML format.
1919

2020
### Export
21-
- **Export-Raindrop**: Exports a collection of Raindrop bookmarks in the specified format.
21+
- **Export-Raindrop**: Exports a collection of Raindrop bookmarks in the specified format (CSV, HTML, ZIP, or TXT). Supports sorting by creation date, score, title, or domain, and filtering by search terms.
22+
23+
## Examples
24+
25+
```powershell
26+
# Import the module (adjust path as needed)
27+
Import-Module .\Raindrop.API\Raindrop.API.psm1 -Force
28+
29+
# Set your API token
30+
$ApiToken = 'YOUR_API_TOKEN'
31+
32+
# Get authenticated user info
33+
$user = Get-RaindropUser -ApiToken $ApiToken
34+
35+
# Export bookmarks to a TXT file (sorted & filtered)
36+
# Exports collection 0 (all) to .\export.txt, sorted by created desc, searching 'youtube'
37+
Export-Raindrop -ApiToken $ApiToken -collectionId 0 -format 'txt' -OutFile '.\export.txt' -Sort '-created' -Search 'youtube'
38+
39+
# Export bookmarks to CSV and convert to PS objects
40+
# When called without -OutFile, Export-Raindrop returns CSV text
41+
$csv = Export-Raindrop -ApiToken $ApiToken -collectionId 0 -format 'csv'
42+
43+
# List available backups
44+
Get-RaindropBackup -ApiToken $ApiToken
45+
46+
# Save a specific backup to CSV
47+
# Pick an ID from $backups and save it
48+
Save-RaindropBackup -ApiToken $ApiToken -id 67d6c08737249bbc09d0f54f -format 'csv' -OutFile ".\export.csv"
49+
50+
# Create a new backup (may take time)
51+
New-RaindropBackup -ApiToken $ApiToken
52+
53+
# Download an export as ZIP file
54+
Export-Raindrop -ApiToken $ApiToken -collectionId 0 -format 'zip' -OutFile '.\export-main.zip'
55+
```
2256

2357
## License
2458
[MIT License](LICENSE.md) © Alan Płócieniak

0 commit comments

Comments
 (0)