Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gd-sprest

Package Overview
Dependencies
Maintainers
1
Versions
841
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gd-sprest - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

2

package.json
{
"name": "gd-sprest",
"version": "0.2.6",
"version": "0.2.7",
"description": "An easy way to develop against the SharePoint REST API.",

@@ -5,0 +5,0 @@ "author": "Gunjan Datta <me@dattabase.com> (https://github.com/gunjandatta/sprest)",

# SharePoint 2013/Online REST Library
An easy way to develop against the SharePoint REST api.
*This library is still being tested...*
## Benefits:

@@ -13,2 +15,5 @@ * Constructors similar to the SSOM object model.

## Example Projects
[Bootstrap List](https://github.com/gunjandatta/sprest-list)
## Documentation:

@@ -15,0 +20,0 @@ ### Asynchronous/Synchronous requests

@@ -15,7 +15,20 @@ /// <reference path="../base.d.ts" />

// Get the Fields
var fields = new Fields(listName, this.targetInfo, false);
// Query for the field
return (new Fields(listName, this.targetInfo, false))["getByInternalNameOrTitle"](internalNameOrTitle);
return fields["getByInternalNameOrTitle"](internalNameOrTitle);
}
}
export class Field_Async extends Field {
/*********************************************************************************************************************************/
// Constructor
/*********************************************************************************************************************************/
constructor(internalNameOrTitle:string, listName:string, ...args) {
// Call the base constructor
super(internalNameOrTitle, listName, Base.getAsyncInputParmeters.apply(null, args));
}
}
/*********************************************************************************************************************************/

@@ -22,0 +35,0 @@ // Methods

@@ -134,3 +134,4 @@ /// <reference path="targetInfo.d.ts" />

// Append the start character for the query string
let endpoint = this.targetInfo.endpoint.indexOf("?") > 0 ? "&" : "?";
let endpoint = this.targetInfo.endpoint +
(this.targetInfo.endpoint.indexOf("?") > 0 ? "&" : "?");

@@ -140,3 +141,3 @@ // Set the request url

.replace(/{{Url}}/g, this.context["webAbsoluteUrl"])
.replace(/{{EndPoint}}/g, endpoint)
.replace(/{{EndPoint}}/g, "SP.AppContextSite(@target)/" + endpoint)
.replace(/{{TargetUrl}}/g, "@target='" + this.targetInfo.url + "'");

@@ -143,0 +144,0 @@ } else {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc