SharePoint

public class Adapter : IDisposable

The SharePoint adapter provides a method with which a ClientContext can be created.

You can specify the URL and login data in the IYOPRO.SHAREPOINT.config. If no login data are specified, access is carried out as a service user.

You can find more information on the usage under the following links:

 Methods

Adapter()

The constructor

ClientContext GetContext(string url)

Get the client context for the specified URL

void Dispose()

Releases the resources used

Example

This example is the Python version of the example found via the link above and gets the title of a SharePoint website.

import clr
clr.AddReferenceToFileAndPath(Session.GetAdapterPath("IYOPRO.SHAREPOINT"))
from IYOPRO.SHAREPOINT import *

with Adapter() as sharepoint:
   ctx = sharepoint.GetContext("<URL>")
   web = ctx.Web
   ctx.Load(web)
   ctx.ExecuteQuery()
   print web.Title