Changelog
Bug fixes:
- #524: determine and construct the list of properties (including navigation) to be retrieved of
QueryOptions.build
method, kudos to @jjloneman - #505: improved file addressing in SharePoint API by @fan-e-cae
- better support for
Sharing
namespace in SharePoint API - introduced support for
Site Designs and Site Scripts
in SharePoint API
Example: Share an anonymous access link with view permissions to a file
ctx = ClientContext(site_url).with_credentials(credentials)
file = ctx.web.get_file_by_server_relative_url(file_url)
result = target_file.share_link(SharingLinkKind.AnonymousView).execute_query()
Example: create a new site script that apply a custom theme
ctx = ClientContext(site_url).with_credentials(credentials)
site_script = {
"$schema": "schema.json",
"actions": [
{
"verb": "applyTheme",
"themeName": "Contoso Theme"
}
],
"bindata": {},
"version": 1
}
result = SiteScriptUtility.create_site_script(ctx, "Contoso theme script", "", site_script).execute_query()