Netdocuments
A Ruby wrapper for accessing Netdocuments api.
Official API documentation available here
Installation
gem install netdocuments
Usage Examples
Setup the configs
Netdocuments.configure do |config|
config.client_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
config.refresh_token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
config.log_path = '/path/you/want' #defaults to current_path/log/netdocuments.log
end
# Cabinet
# ==================================================
cabinet = Netdocuments::Cabinet.new(id: 'NG-2QORXCL4')
# Cabinet folders
cabinet.folders
# Cabinet info
cabinet.info
# Folder
# =======================================================
folder = Netdocuments::Folder.new(id: '4815-5113-1938')
# Subfolders
folder.subfolders
# info
folder.info
# folder content
folder.folder_content
# update info
folder.update_info(query: {})
# Creating a folder
folder = Netdocuments::Folder.new(name: 'Foo folder',parent: '4815-5113-1938')
folder.create
# Documents
# ===================================================================================
document = Netdocuments::Document.new(id: '4824-5093-9170')
#info
document.info
#update info
document.update_info(query: {})