Forum Discussion
Gunjan Datta
Sep 02, 2016Copper Contributor
Easy Way To Develop Against REST in SharePoint
I rewrote my first REST library, presented at SPFest DC this year, in TypeScript and wanted to share the latest. It helps construct the url and transforms it if you are in the app web and reduces the...
Tobias Zimmergren
Sep 07, 2016Iron Contributor
Nice tip Gunjan Datta. Would you mind elaborating what the main benefits or differences are between your library and for example the perhaps more widely used Office PnP libraries for JS Core? (https://github.com/OfficeDev/PnP-JS-Core).
If there's things in your library that the JS core doesn't cover, perhaps there's an opportunity to enhance the core with some logic from your side as well.
Cheers :-)
Tobias.
Gunjan Datta
Sep 08, 2016Copper Contributor
There is a demo project I'm working on to give an example of using the library here: https://github.com/gunjandatta/sprest-list
The main script file is located here: https://github.com/gunjandatta/sprest-list/blob/master/Scripts/list.js
I tend to comment more than I code, so hopefully it's easy to read. I wanted to give examples of creating list/items, updating items and getting them. It's not 100% complete, but has examples of the 1 line code/requests to get the data for you app.
If this can help the PnP-JS-Core library in any way, that's a win in my book.
Thanks,
Gunjan
The main script file is located here: https://github.com/gunjandatta/sprest-list/blob/master/Scripts/list.js
I tend to comment more than I code, so hopefully it's easy to read. I wanted to give examples of creating list/items, updating items and getting them. It's not 100% complete, but has examples of the 1 line code/requests to get the data for you app.
If this can help the PnP-JS-Core library in any way, that's a win in my book.
Thanks,
Gunjan