0.0.16 • Published 8 years ago

sharepoint-promise v0.0.16

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

SharePoint Promise

A promise based wrapper around SharePoint's REST api

This project is under heavy development and is not recommended for use in production.

Installation

It's simple with npm:

npm i --save sharepoint-promise

Examples

Get a list

import SPPromise from 'sharepoint-promise'

SPPromise.getList('Contacts')
  .then((response) => {
    // do things
  })

Get list items

import SPPromise from 'sharepoint-promise'

SPPromise.getListItems('Contacts')
  .then((response) => {
    // do things
  })

Get a list item

import SPPromise from 'sharepoint-promise'

SPPromise.getListItemById('Contacts',1)
  .then((response) => {
    // do things
  })

Create a list item

import SPPromise from 'sharepoint-promise'

SPPromise.createListItem('Contacts',{Email:'test@example.com'})
  .then((response) => {
    // do things
  })

Update a list item

import SPPromise from 'sharepoint-promise'

SPPromise.updateListItem('Contacts',1,{Email:'newEmail@example.com'})
  .then((response) => {
    // do things
  })

Run a custom query

import SPPromise from 'sharepoint-promise'
// import some useful helper functions
import { json, log } from 'sharepoint-promise'

SPPromise.buildRequest('/some/api/path')
  .then(json) // gets the json body of the response
  .then(log) // logs the response
0.0.16

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago