@tomsd/sharepointrest
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@tomsd/sharepointrest

Installation

npm install @tomsd/sharepointrest

Usage

You can script in your HTML page placed on your SharePoint site.

// with bundler
import SharePointRest from "@tomsd/sharepointrest";
const siteurl = "https://[sharepoint.yoursite.com]/";
const sp = new SharePointRest(siteurl);
sp.getLists().then((lists) => console.log(lists));

sp.getList(listId).then((list) => console.log(list));

sp.getCurrentUser().then((user) => console.log(user));

sp.addList("listTitle").then((list) => {
  sp.deleteList(list.Id);
});

sp.addList("listTitle").then((list) => {
  sp.addField(list.Id, "text", "textField");
});

sp.getCurrentUser().then((user) => {
  sp.sendMail(user.Email, [user.Email], "subject", "this is a test");
});

/@tomsd/sharepointrest/

    Package Sidebar

    Install

    npm i @tomsd/sharepointrest

    Weekly Downloads

    0

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    30.6 kB

    Total Files

    4

    Last publish

    Collaborators

    • tomsd