0.0.16 • Published 9 years ago

sharepoint-promise v0.0.16

Weekly downloads
4
License
MIT
Repository
github
Last release
9 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

9 years ago

0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago