Skip to content
This repository was archived by the owner on Jan 18, 2021. It is now read-only.

Commit 0068667

Browse files
committed
lots of general updates
1 parent dc0c403 commit 0068667

File tree

1 file changed

+35
-29
lines changed

1 file changed

+35
-29
lines changed

README.md

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44

55
## SharePoint REST Web Services JavaScript Library
66
Provides a concise, promise-based API that simplifies asynchronous REST interaction with SharePoint. Easily read/write List
7-
items, execute ad-hoc REST calls, interact with files and folders, gather site properties, and query user information. Enables rapid development of SharePoint Apps/Add-ins using the JavaScript SharePoint App Model.
7+
items, execute REST calls, interact with files and folders, gather site properties, and query user information. Enables rapid development of SharePoint Apps/Add-ins using the JavaScript SharePoint App Model.
88

99
### Library Features:
1010
* Simple - Most SharePoint web service calls are a few lines of code
11-
* Modern - Lightweight, pure JavaScript solution with zero dependencies
11+
* Modern - Lightweight, pure JavaScript solution with no other dependencies
1212
* Elegant - Utilizes the new [ES6 Promise](http://www.datchley.name/es6-promises/) architecture for asynchronous operations
1313
* Robust - Built for [SharePoint 2013 API](https://msdn.microsoft.com/en-us/library/office/jj860569.aspx) and [OData v3](http://www.odata.org/documentation/odata-version-3-0/)
1414

1515
### SharePoint Interfaces:
16-
* List Methods - Create, read, update, and delete (CRUD) List/Library items with a single line of code
16+
* List Methods - Create, read, update, and delete (CRUD) List/Library items, including support for paging/next
1717
* User Methods - Get User information: Basic (ID, Email, LoginName, etc.) and UserProfile (Manager, 100+ Properties)
1818
* Site Methods - Get Site information (Lists, Groups, Users, Roles, Subsites and Permissions)
19-
* File/Folder Methods - Get File/Folder properties, permissions. Download files and get a folder's items.
20-
* REST Methods - Run ad-hoc REST API calls against any available [SharePoint REST API](https://msdn.microsoft.com/en-us/library/office/dn268594.aspx) endpoint
19+
* File/Folder Methods - Get File/Folder properties and permissions. Download files and get a folder's items.
20+
* REST Methods - Run REST API calls against any available [SharePoint REST API](https://msdn.microsoft.com/en-us/library/office/dn268594.aspx) endpoint
2121
* Form Population - Populate form elements using data-bind declarative binding system like Knockout or AngluarJS
2222

2323
### Supported Environments:
@@ -31,38 +31,38 @@ items, execute ad-hoc REST calls, interact with files and folders, gather site p
3131
* `sprLib.rest(options)` - Returns the results of a given REST call to any [SharePoint REST API](https://msdn.microsoft.com/en-us/library/office/dn268594.aspx)
3232

3333
## List/Library
34-
* `sprLib.list(listName).items(options)` - Returns an array of item objects using a variety of possible options
34+
* `sprLib.list(listName).items(options)` - Returns an array of `SP.ListItem` objects using a variety of query options
3535
* `sprLib.list(listName).create(item)` - Create a new list item using JSON data
3636
* `sprLib.list(listName).update(item)` - Update an existing item using JSON data
3737
* `sprLib.list(listName).delete(item)` - Delete an existing item using JSON data (permanently delete)
3838
* `sprLib.list(listName).recycle(item)` - Recycle an existing item using JSON data (move to Recycle Bin)
39-
* `sprLib.list(listName).cols()` - Returns an array of column objects with useful info (name, datatype, etc.)
40-
* `sprLib.list(listName).info()` - Returns list/library properties (GUID, lastModified, numberOfItems, etc.)
41-
* `sprLib.list(listName).perms()` - Returns an array of the list's Member/Roles objects
39+
* `sprLib.list(listName).cols()` - Returns an array of column properties (datatype, default values, etc.)
40+
* `sprLib.list(listName).info()` - Returns `SP.List` properties (last modified, number of items, etc.)
41+
* `sprLib.list(listName).perms()` - Returns an array of the list's Member Role assignments
4242

4343
## File
4444
* `sprLib.file(fileName).get()` - Returns a file (binary/text) as a blob which can be saved
45-
* `sprLib.file(fileName).info()` - Returns file properties (Created, GUID, HasUniquePerms, etc.)
46-
* `sprLib.file(fileName).perms()` - Returns an array of the file's Member/Roles objects
45+
* `sprLib.file(fileName).info()` - Returns `SP.File` properties (Created, GUID, HasUniquePerms, etc.)
46+
* `sprLib.file(fileName).perms()` - Returns an array of the file's Member Role assignments
4747

4848
## Folder
4949
* `sprLib.folder(folderName).files()` - Returns an array of file objects contained in the folder
5050
* `sprLib.folder(folderName).folders()` - Returns an array of folder objects contained in the folder
51-
* `sprLib.folder(folderName).info()` - Returns folder properties (Created, GUID, HasUniqueRoleAssignments, etc.)
52-
* `sprLib.folder(folderName).perms()` - Returns an array of the folder's Member/Roles objects
51+
* `sprLib.folder(folderName).info()` - Returns `SP.Folder` properties (Created, GUID, HasUniquePerms, etc.)
52+
* `sprLib.folder(folderName).perms()` - Returns an array of the folder's Member Role assignments
5353

5454
## Site Collection/Subsite
5555
* `sprLib.site(siteUrl).groups()` - Returns an array of the site's Groups and Members
56-
* `sprLib.site(siteUrl).info()` - Returns over a dozen site properties (ID, Owner, Language, Logo, etc.)
56+
* `sprLib.site(siteUrl).info()` - Returns `SP.Web` site properties (ID, Owner, Language, Logo, etc.)
5757
* `sprLib.site(siteUrl).lists()` - Returns an array of the site's Lists/Libraries
5858
* `sprLib.site(siteUrl).perms()` - Returns an array of the site's Member/Roles objects
5959
* `sprLib.site(siteUrl).roles()` - Returns an array of the site's Roles
6060
* `sprLib.site(siteUrl).subsites()` - Returns an array of the site's Subsites
6161
* `sprLib.site(siteUrl).users()` - Returns an array of the site's Users and their base permissions
6262

6363
## User Groups/Info/Profile
64-
* `sprLib.user(options).groups()` - Returns an object with `SP.Group` group properties (Id, Owner, Title, etc.)
65-
* `sprLib.user(options).info()` - Returns an object with `SP.User` user properties (Id, Email, Login, Title, etc.)
64+
* `sprLib.user(options).groups()` - Returns `SP.Group` group properties (Id, Owner, Title, etc.)
65+
* `sprLib.user(options).info()` - Returns `SP.User` user properties (Id, Email, Login, Title, etc.)
6666
* `sprLib.user(options).profile()` - Returns `SP.UserProfile.PersonProperties` (DirectReports, PictureUrl, etc.)
6767

6868
## Utility Methods
@@ -84,15 +84,16 @@ items, execute ad-hoc REST calls, interact with files and folders, gather site p
8484
- [Client-Side](#client-side)
8585
- [Include Local Scripts](#include-local-scripts)
8686
- [Include Bundle Script](#include-bundle-script)
87+
- [Use CDN](#use-cdn)
8788
- [Install With Bower](#install-with-bower)
8889
- [Node.js](#nodejs)
8990
- [Method Reference](#method-reference)
9091
- [REST API Methods](#rest-api-methods)
91-
- [List/Library Methods (`SPList`)](#listlibrary-methods-splist)
92-
- [File Methods (`SPFile`)](#file-methods-spfile)
93-
- [Folder Methods (`SPFolder`)](#folder-methods-spfolder)
94-
- [Site Methods (`SPSite`)](#site-methods-spsite)
95-
- [User Methods](#user-methods)
92+
- [List/Library Methods (`SP.List`)](#listlibrary-methods-splist)
93+
- [File Methods (`SP.File`)](#file-methods-spfile)
94+
- [Folder Methods (`SP.Folder`)](#folder-methods-spfolder)
95+
- [Site Methods (`SP.Web`)](#site-methods-spweb)
96+
- [User Methods (`SP.User`)](#user-methods-spuser)
9697
- [Utility Methods](#utility-methods)
9798
- [Form Binding (SpRestLib UI)](#form-binding-sprestlib-ui)
9899
- [Library Features and Notes](#library-features-and-notes)
@@ -140,20 +141,25 @@ sprLib.site().lists().then( arrLists => (console.table ? console.table(arrLists)
140141

141142
### Include Local Scripts
142143
```javascript
143-
<script lang="javascript" src="https://yourhost.com/subsite/SiteAssets/js/sprestlib.js"></script>
144+
<script src="https://yourhost.com/subsite/SiteAssets/js/sprestlib.js"></script>
144145
```
145146
* *IE11 support requires a Promises polyfill as well (included in the `libs` folder)*
146147

147148
### Include Bundle Script
148149
```javascript
149-
<script lang="javascript" src="https://yourhost.com/subsite/SiteAssets/js/sprestlib.bundle.js"></script>
150+
<script src="https://yourhost.com/subsite/SiteAssets/js/sprestlib.bundle.js"></script>
150151
```
151152
* *`sprestlib.bundle.js` includes all required libraries (SpRestLib + Promises)*
152153
```javascript
153-
<script lang="javascript" src="https://yourhost.com/subsite/SiteAssets/js/sprestlib-ui.bundle.js"></script>
154+
<script src="https://yourhost.com/subsite/SiteAssets/js/sprestlib-ui.bundle.js"></script>
154155
```
155156
* *`sprestlib-ui.bundle.js` includes all required libraries plus UI (SpRestLib and SpRestLib-UI + jQuery and Promises)*
156157

158+
### Use CDN
159+
```javascript
160+
<script src="https://cdn.rawgit.com/gitbrent/SpRestLib/master/dist/sprestlib.bundle.js"></script>
161+
```
162+
157163
### Install With Bower
158164
```javascript
159165
bower install sprestlib
@@ -174,19 +180,19 @@ var sprLib = require("sprestlib");
174180
## REST API Methods
175181
[REST API Methods](https://gitbrent.github.io/SpRestLib/docs/api-rest.html)
176182

177-
## List/Library Methods (`SPList`)
183+
## List/Library Methods (`SP.List`)
178184
[List/Library Methods](https://gitbrent.github.io/SpRestLib/docs/api-list.html)
179185

180-
## File Methods (`SPFile`)
186+
## File Methods (`SP.File`)
181187
[Site Methods](https://gitbrent.github.io/SpRestLib/docs/api-file.html)
182188

183-
## Folder Methods (`SPFolder`)
189+
## Folder Methods (`SP.Folder`)
184190
[Site Methods](https://gitbrent.github.io/SpRestLib/docs/api-folder.html)
185191

186-
## Site Methods (`SPSite`)
192+
## Site Methods (`SP.Web`)
187193
[Site Methods](https://gitbrent.github.io/SpRestLib/docs/api-site.html)
188194

189-
## User Methods
195+
## User Methods (`SP.User`)
190196
[User Methods](https://gitbrent.github.io/SpRestLib/docs/api-user.html)
191197

192198
## Utility Methods

0 commit comments

Comments
 (0)