0.1.10 • Published 5 years ago

@paulholden/sharepoint v0.1.10

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

sharepoint

Promise-based library for interacting with SharePoint Online.

Getting Started

const Sharepoint = require('@paulholden2/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 VariableValue
SHAREPOINT_URLYour test/sandbox SharePoint site https://example.sharepoint.com/sites/YourSite/.
SHAREPOINT_USERNAMEUser Principal Name of the user you wish to test with, e.g. john.doe@example.com.
SHAREPOINT_PASSWORDPassword for your SHAREPOINT_USERNAME.
SHAREPOINT_DIR_PATHPath to where the files are. e.g. /Shared Documents/General.
SHAREPOINT_LISTAn existing list that can be tested against.
  • Alternatively, you can edit a /.env file if you prefer (as per dotenv)

Then, run:

npm run test

License

MIT

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago