Skip to content

Basic usage

Albert Moravec edited this page Mar 15, 2018 · 8 revisions

How to connect

public const string UserName = "superuser@keenmate.com";
public const string Password = "SuperSecretPassword";

var op = "https://keenmate.sharepoint.com/sites/demo/fluently-sharepoint/"
         .Create()
         .SetOnlineCredentials(UserName, Password)
         .Execute(); // Call execute first to load initial data
  
// ... do whatever you want ...
  
op.CreateList("My super cool documents", ListTemplate.DocumentLibrary)
  .Execute();

Retrieve all items

var data = op.LoadList("List #1")
             .GetItems(); // Returns ListItemCollection

Retrieve items using CAML query

var data = op.LoadList("List #1")
             .GetItems("<Query><Where><Eq><FieldRef Name='Group'/><Value Type='Text'>Managers</Value></Eq></Where></Query>");
Clone this wiki locally