@robinpath/box 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# @robinpath/box
|
|
2
|
+
|
|
3
|
+
> Box module for RobinPath.
|
|
4
|
+
|
|
5
|
+
   
|
|
6
|
+
|
|
7
|
+
## Why use this module?
|
|
8
|
+
|
|
9
|
+
The `box` module lets you:
|
|
10
|
+
|
|
11
|
+
- listFolderItems
|
|
12
|
+
- getFolderInfo
|
|
13
|
+
- createFolder
|
|
14
|
+
- deleteFolder
|
|
15
|
+
- getFileInfo
|
|
16
|
+
|
|
17
|
+
All functions are callable directly from RobinPath scripts with a simple, consistent API.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @robinpath/box
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
**1. Set up credentials**
|
|
28
|
+
|
|
29
|
+
```robinpath
|
|
30
|
+
box.setCredentials "your-credentials"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**2. listFolderItems**
|
|
34
|
+
|
|
35
|
+
```robinpath
|
|
36
|
+
box.listFolderItems
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Available Functions
|
|
40
|
+
|
|
41
|
+
| Function | Description |
|
|
42
|
+
|----------|-------------|
|
|
43
|
+
| `box.setCredentials` | Configure box credentials. |
|
|
44
|
+
| `box.listFolderItems` | listFolderItems |
|
|
45
|
+
| `box.getFolderInfo` | getFolderInfo |
|
|
46
|
+
| `box.createFolder` | createFolder |
|
|
47
|
+
| `box.deleteFolder` | deleteFolder |
|
|
48
|
+
| `box.getFileInfo` | getFileInfo |
|
|
49
|
+
| `box.downloadFile` | downloadFile |
|
|
50
|
+
| `box.deleteFile` | deleteFile |
|
|
51
|
+
| `box.copyFile` | copyFile |
|
|
52
|
+
| `box.moveFile` | moveFile |
|
|
53
|
+
| `box.uploadFile` | uploadFile |
|
|
54
|
+
| `box.searchContent` | searchContent |
|
|
55
|
+
| `box.createSharedLink` | createSharedLink |
|
|
56
|
+
| `box.getSharedLink` | getSharedLink |
|
|
57
|
+
| `box.listCollaborations` | listCollaborations |
|
|
58
|
+
| `box.addCollaboration` | addCollaboration |
|
|
59
|
+
| `box.getUser` | getUser |
|
|
60
|
+
| `box.updateFileInfo` | updateFileInfo |
|
|
61
|
+
| `box.lockFile` | lockFile |
|
|
62
|
+
|
|
63
|
+
## Examples
|
|
64
|
+
|
|
65
|
+
### listFolderItems
|
|
66
|
+
|
|
67
|
+
```robinpath
|
|
68
|
+
box.listFolderItems
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### getFolderInfo
|
|
72
|
+
|
|
73
|
+
```robinpath
|
|
74
|
+
box.getFolderInfo
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### createFolder
|
|
78
|
+
|
|
79
|
+
```robinpath
|
|
80
|
+
box.createFolder
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Integration with RobinPath
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
import { RobinPath } from "@wiredwp/robinpath";
|
|
87
|
+
import Module from "@robinpath/box";
|
|
88
|
+
|
|
89
|
+
const rp = new RobinPath();
|
|
90
|
+
rp.registerModule(Module.name, Module.functions);
|
|
91
|
+
rp.registerModuleMeta(Module.name, Module.functionMetadata);
|
|
92
|
+
|
|
93
|
+
const result = await rp.executeScript(`
|
|
94
|
+
box.setCredentials "your-credentials"
|
|
95
|
+
box.listFolderItems
|
|
96
|
+
`);
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Full API Reference
|
|
100
|
+
|
|
101
|
+
See [MODULE.md](./MODULE.md) for complete documentation including all parameters, return types, error handling, and advanced examples.
|
|
102
|
+
|
|
103
|
+
## Related Modules
|
|
104
|
+
|
|
105
|
+
- [`@robinpath/s3`](../s3) — Amazon S3 module for complementary functionality
|
|
106
|
+
- [`@robinpath/dropbox`](../dropbox) — Dropbox module for complementary functionality
|
|
107
|
+
- [`@robinpath/onedrive`](../onedrive) — OneDrive module for complementary functionality
|
|
108
|
+
- [`@robinpath/google-drive`](../google-drive) — Google Drive module for complementary functionality
|
|
109
|
+
- [`@robinpath/json`](../json) — JSON module for complementary functionality
|
|
110
|
+
|
|
111
|
+
## License
|
|
112
|
+
|
|
113
|
+
MIT
|