Global Variable

Global Variable

The gd-sprest library will add a $REST global variable to the DOM. The $REST variable contains the following properties and helper libraries, shown below.

Properties

Name Type Description
__ver number The version number of the library.
ContextInfo IContextInfo A reference to the _spPageContextInfo global variable.
DefaultRequestToHostFl boolean Flag to target the app-web or host web for requests. (false by default)

Library

Class Name Description
Helper Helper classes for developing against SharePoint.
Helper.App Helper class for creating a SharePoint Add-In.
Helper.Dependencies Helper class for loading the default SharePoint core libraries.
Helper.FieldSchemaXML Helper class for generating a field schema xml.
Helper.JSLink Helper class for creating a custom JSLink solution.
Helper.ListForm Helper class for getting list form information.
Helper.ListFormField Helper class for getting the list form field information.
Helper.Loader Helper class for waiting until the core SharePoint core libraries are loaded.
Helper.parse Static method for converting the JSON string to object.
Helper.RibbonLink Helper class for creating links in the top ribbon bar.
Helper.SP SharePoint core library references.
Helper.SPConfig Helper class for creating SharePoint assets.
Helper.SuiteBarLink Helper class for creating links in the suite bar.
Helper.Taxonomy Helper class for getting information from the taxonomy term store.
Helper.WebPart Helper class for creating modern webparts in SharePoint 2013/Online (Classic) solutions.
List Library for developing against the /_api/web/lists/getByTitle(‘[List Name]’) api endpoint.
Navigation Library for developing against the /_api/navigation api endpoint.
PeopleManager Library for developing against the /_api/SP.UserProfiles.PeopleManage api endpoint.
PeoplePicker Library for developing against the /_api/SP.UI.ApplicationPages.ClientPeoplePickerWebServiceInterface api endpoint.
ProfileLoader Library for developing against the /_api/SP.UserProfiles.ProfileLoader.GetProfileLoader api endpoint.
Search Library for developing against the /_api/search api endpoint.
Site Library for developing against the /_api/site api endpoint.
SocialFeed Library for developing against the /_api/social.feed api endpoint.
SPTypes The SharePoint enumerators.
UserProfile Library for developing against the /_api/SP.UserProfiles.ProfileLoader.getProfileLoader/getUserProfile api endpoint.
Utility Library for developing against the /_api/SP.Utilities.Utility api endpoint.
Web Library for developing against the /_api/web api endpoint.

Version Control

The __ver number is used to ensure the latest library is loaded as the global variable.