sp-list-query

0.0.2 • Public • Published

sp-list-query

Query list items among multiple SharePoint list.

Installation

npm install sp-list-query --save

Usage

var listQuery = require('sp-list-query');

var options = {
    'webUrl': 'web url',
    'useAppContextSite': false,
    'listFilters': {
        'baseTemplate': 100 // Or baseType
    },
    'camlQuery': new SP.CamlQuery(),
    'includes': 'Include(Title)'
};

listQuery(options, function (listItems) {
    // Do something
}, function (sender, args) {
    // Error
});

// Or pass a function to options.filters
var options = {
    'webUrl': 'web url',
    'useAppContextSite': false,
    'listFilters': function (list) {
        return list.get_baseType() === 0;
    },
    'camlQuery': new SP.CamlQuery(),
    'includes': 'Include(Title)'
};

License

MIT.

Readme

Keywords

Package Sidebar

Install

npm i sp-list-query

Weekly Downloads

2

Version

0.0.2

License

MIT

Last publish

Collaborators

  • frederick-s