1.19.0 • Published 11 months ago
@wmfs/sharepoint v1.19.0
sharepoint
Adventures in uploading/listing/downloading documents in Microsoft SharePoint Online... using Node.js
Getting Started
const Sharepoint = require('@wmfs/sharepoint')
const sp = new Sharepoint('URL HERE')
sp.authenticate()
sp.getWebEndpoint()
sp.getContents(path)
sp.createFolder(path)
sp.deleteFolder(path)
sp.createFile(options) // options = { path, fileName, data }
sp.deleteFile(options) // options = { path, fileName }
sp.createFileChunked(options) // options = { path, fileName, stream, fileSize, chunkSize }
Test
First, set these to match your SharePoint environment:
Env Variable | Value |
---|---|
SHAREPOINT_URL | This is the site we're aiming for, so something like https://example.sharepoint.com/sites/YourSite/ |
SHAREPOINT_USERNAME | The username you want to connect to SharePoint with. Note this is the full username with an @ , so something like some.username@example.com |
SHAREPOINT_PASSWORD | And yup, the password to accompany SHAREPOINT_USERNAME . |
SHAREPOINT_DIR_PATH | Path to where the files are. e.g. /Shared Documents/General |
- Alternatively, you can edit a
/.env
file if you prefer (as per dotenv)
Then, run:
npm run test
License
1.19.0
11 months ago
1.18.0
1 year ago
1.15.0
1 year ago
1.14.0
1 year ago
1.12.2
2 years ago
1.13.0
1 year ago
1.12.1
2 years ago
1.17.0
1 year ago
1.16.0
1 year ago
1.12.0
2 years ago
1.11.0
2 years ago
1.10.0
3 years ago
1.9.0
3 years ago
1.8.0
3 years ago
1.7.0
3 years ago
1.6.0
4 years ago
1.5.0
4 years ago
1.4.1
4 years ago
1.4.0
4 years ago
1.3.0
4 years ago
1.2.0
4 years ago
1.1.0
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago