gd-sprest
Advanced tools
Comparing version 0.2.6 to 0.2.7
{ | ||
"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 { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
792811
11963
301