Sharepoint 2013 REST API client. Work in progress, not for the faint hearted.
Add this line to your application's Gemfile:
gem 'sharepoint', git: 'https://github.com/ifad/sharepoint.git'
And then execute:
bundle
You can instantiate a number of SharePoint clients in your application:
client = Sharepoint::Client.new({
authentication: "token",
client_id: "client_id",
client_secret: "client_secret",
tenant_id: "tenant_id",
cert_name: "cert_name",
auth_scope: "auth_scope",
uri: "http://sharepoint_url"
})
client = Sharepoint::Client.new({
authentication: "ntlm",
username: "username",
password: "password",
uri: "http://sharepoint_url"
})
client.documents_for path
client.upload filename, content, path
client.update_metadata filename, metadata, path
Create a .env file based on the env-example
and run
$ bundle exec rake