# @tomsd/sharepoint

> SharePoint SOAP API wrapper

Latest version **3.1.0** (published 2020-10-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tomsd/sharepoint
pnpm add @tomsd/sharepoint
yarn add @tomsd/sharepoint
bun add @tomsd/sharepoint
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2020-10-23 |
| First published | 2020-01-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 94 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | tom |
| Maintainers | tomsd |
| Keywords | sharepoint |

## Links

- npm: https://www.npmjs.com/package/@tomsd/sharepoint
- npm.io page: https://npm.io/package/@tomsd/sharepoint

## Dependencies (1)

- [es6-promise](https://npm.io/package/es6-promise.md) ^4.2.8

## Recent versions

- 3.1.0 (latest) — 2020-10-23
- 3.0.0 — 2020-10-23
- 2.0.0 — 2020-10-23
- 1.2.0 — 2020-10-19
- 1.1.2 — 2020-10-07
- 1.1.1 — 2020-10-06
- 1.1.0 — 2020-10-06
- 1.0.1 — 2020-01-24
- 1.0.0 — 2020-01-08

## README

# @tomsd/sharepoint

## Installation
``` sh
npm install @tomsd/sharepoint
```

# Usage

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

``` js
import SharePoint from "@tomsd/sharepoint";
```

``` js
const siteurl = "https://[sharepoint.yoursite.com]/";
const sp = new SharePoint(siteurl);
```

``` js
sp.getLists().then(function(list){
  console.log(lists);
});
```

``` js
const listid = "xxxx-xxxx-xxxx-xxxx";
sp.getList(listid).then(function(list){
  console.log(list);
});
```

``` js
let spquery = sp.newquery().add("Eq","ID","Number",1).addviewfield("Title").setrowlimit(1);
sp.getListItems(listid, spquery).then(function(items){
  console.log(items);
});
```

``` js
// insert item
sp.upsertListItem(listid, {Title:"test"}).then(function(){
  console.log("inserted");
});
// update item with ID
sp.upsertListItem(listid, {ID:"1",Title:"updated title"}).then(function(){
  console.log("updated");
});
```

``` js
sp.removeListItem(listid, {ID:"1"}).then(function(){
  console.log("removed");
});
```

---
_Source: https://npm.io/package/@tomsd/sharepoint · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
