|
ownCloud#
0.2.0
C# client library for ownCloud
|
ownCloud OCS and DAV access client More...
Public Member Functions | |
| Client (string url, string user_id, string password) | |
| Initializes a new instance of the owncloudsharp.Client class. More... | |
| List< ResourceInfo > | List (string path) |
| List the specified remote path. More... | |
| ResourceInfo | GetResourceInfo (string path) |
| Gets the resource info for the remote path. More... | |
| Stream | Download (string path) |
| Download the specified file. More... | |
| bool | Upload (string path, Stream data, string contentType) |
| Upload the specified file to the specified path. More... | |
| bool | Exists (string path) |
| Checks if the specified remote path exists. More... | |
| bool | CreateDirectory (string path) |
| Creates a new directory at remote path. More... | |
| bool | Delete (string path) |
| Delete resource at the specified remote path. More... | |
| bool | Copy (string source, string destination) |
| Copy the specified source to destination. More... | |
| bool | Move (string source, string destination) |
| Move the specified source and destination. More... | |
| Stream | DownloadDirectoryAsZip (string path) |
| Downloads a remote directory as zip. More... | |
| object | ListOpenRemoteShare () |
| List all remote shares. More... | |
| bool | AcceptRemoteShare (int shareId) |
| Accepts a remote share More... | |
| bool | DeclineRemoteShare (int shareId) |
| Declines a remote share. More... | |
| bool | DeleteShare (int shareId) |
| Unshares a file or directory. More... | |
| bool | UpdateShare (int shareId, int perms=-1, string password=null, OcsBoolParam public_upload=OcsBoolParam.None) |
| Updates a given share. NOTE: Only one of the update parameters can be specified at once. More... | |
| PublicShare | ShareWithLink (string path, int perms=-1, string password=null, OcsBoolParam public_upload=OcsBoolParam.None) |
| Shares a remote file with link. More... | |
| UserShare | ShareWithUser (string path, string username, int perms=-1, OcsBoolParam remoteUser=OcsBoolParam.None) |
| Shares a remote file with specified user. More... | |
| GroupShare | ShareWithGroup (string path, string groupName, int perms=-1) |
| Shares a remote file with specified group. More... | |
| bool | IsShared (string path) |
| Checks whether a path is already shared. More... | |
| List< Share > | GetShares (string path, OcsBoolParam reshares=OcsBoolParam.None, OcsBoolParam subfiles=OcsBoolParam.None) |
Gets all shares for the current user when path is not set, otherwise it gets shares for the specific file or folder More... | |
| bool | CreateUser (string username, string initialPassword) |
| Create a new user with an initial password via provisioning API. More... | |
| bool | DeleteUser (string username) |
| Deletes a user via provisioning API. More... | |
| bool | UserExists (string username) |
| Checks a user via provisioning API. More... | |
| List< string > | SearchUsers (string username) |
| Searches for users via provisioning API. More... | |
| User | GetUserAttributes (string username) |
| Gets the user's attributes. More... | |
| bool | SetUserAttribute (string username, OCSUserAttributeKey key, string value) |
| Sets a user attribute. See https://doc.owncloud.com/server/7.0EE/admin_manual/configuration_auth_backends/user_provisioning_api.html#users-edituser for reference. More... | |
| bool | AddUserToGroup (string username, string groupName) |
| Adds a user to a group. More... | |
| List< string > | GetUserGroups (string username) |
| Get a list of groups associated to a user. More... | |
| bool | IsUserInGroup (string username, string groupName) |
| Check if a user is in a group. More... | |
| bool | RemoveUserFromGroup (string username, string groupName) |
| Removes a user from a group. More... | |
| bool | AddUserToSubAdminGroup (string username, string groupName) |
| Adds a user to a subadmin group. More... | |
| List< string > | GetUserSubAdminGroups (string username) |
| Get a list of subadmin groups associated to a user. More... | |
| bool | IsUserInSubAdminGroup (string username, string groupNname) |
| Check if a user is in a subadmin group. More... | |
| bool | RemoveUserFromSubAdminGroup (string username, string groupName) |
| Removes the user from sub admin group. More... | |
| bool | CreateGroup (string groupName) |
| Create a new group via provisioning API. More... | |
| bool | DeleteGroup (string groupName) |
| Deletes the group. More... | |
| bool | GroupExists (string groupName) |
| Checks a group via provisioning API. More... | |
| List< string > | SearchGroups (string name) |
| Searches for groups via provisioning API. More... | |
| Config | GetConfig () |
| Returns ownCloud config information. More... | |
| List< AppAttribute > | GetAttribute (string app="", string key="") |
| Returns an application attribute More... | |
| bool | SetAttribute (string app, string key, string value) |
| Sets an application attribute. More... | |
| bool | DeleteAttribute (string app, string key) |
| Deletes an application attribute. More... | |
| List< string > | GetApps () |
| List all enabled apps through the provisioning api. More... | |
| AppInfo | GetApp (string appName) |
| Gets information about the specified app. More... | |
| bool | EnableApp (string appName) |
| Enable an app through provisioning_api. More... | |
| bool | DisableApp (string appName) |
| Disable an app through provisioning_api More... | |
Static Public Attributes | |
| static string [] | OCSUserAttributeKeyName |
| Provides the string values for the OCSUserAttributeKey enum More... | |
ownCloud OCS and DAV access client
| owncloudsharp.Client.Client | ( | string | url, |
| string | user_id, | ||
| string | password | ||
| ) |
Initializes a new instance of the owncloudsharp.Client class.
| url | ownCloud instance URL. |
| user_id | User identifier. |
| password | Password. |
| bool owncloudsharp.Client.AcceptRemoteShare | ( | int | shareId | ) |
Accepts a remote share
true, if remote share was accepted, false otherwise.| shareId | Share identifier. |
| bool owncloudsharp.Client.AddUserToGroup | ( | string | username, |
| string | groupName | ||
| ) |
Adds a user to a group.
true, if user was added to group, false otherwise.| username | name of user to be added. |
| groupName | name of group user is to be added to. |
| bool owncloudsharp.Client.AddUserToSubAdminGroup | ( | string | username, |
| string | groupName | ||
| ) |
Adds a user to a subadmin group.
true, if user was added to sub admin group, false otherwise.| username | name of user to be added to subadmin group. |
| groupName | name of subadmin group. |
| bool owncloudsharp.Client.Copy | ( | string | source, |
| string | destination | ||
| ) |
Copy the specified source to destination.
| source | Source resoure path. |
| destination | Destination resource path. |
true, if resource was copied, false otherwise.| bool owncloudsharp.Client.CreateDirectory | ( | string | path | ) |
Creates a new directory at remote path.
true, if directory was created, false otherwise.| path | remote Path. |
| bool owncloudsharp.Client.CreateGroup | ( | string | groupName | ) |
Create a new group via provisioning API.
true, if group was created, false otherwise.| groupName | name of group to be created. |
| bool owncloudsharp.Client.CreateUser | ( | string | username, |
| string | initialPassword | ||
| ) |
Create a new user with an initial password via provisioning API.
true, if user was created, false otherwise.| username | name of user to be created. |
| initialPassword | password for user being created. |
| bool owncloudsharp.Client.DeclineRemoteShare | ( | int | shareId | ) |
Declines a remote share.
true, if remote share was declined, false otherwise.| shareId | Share identifier. |
| bool owncloudsharp.Client.Delete | ( | string | path | ) |
Delete resource at the specified remote path.
| path | remote Path. |
true, if resource was deleted, false otherwise.| bool owncloudsharp.Client.DeleteAttribute | ( | string | app, |
| string | key | ||
| ) |
Deletes an application attribute.
true, if attribute was deleted, false otherwise.| app | application id. |
| key | key of the attribute to delete. |
| bool owncloudsharp.Client.DeleteGroup | ( | string | groupName | ) |
Deletes the group.
true, if group was deleted, false otherwise.| groupName | Group name. |
| bool owncloudsharp.Client.DeleteShare | ( | int | shareId | ) |
Unshares a file or directory.
true, if share was deleted, false otherwise.| shareId | Share identifier. |
| bool owncloudsharp.Client.DeleteUser | ( | string | username | ) |
Deletes a user via provisioning API.
true, if user was deleted, false otherwise.| username | name of user to be deleted. |
| bool owncloudsharp.Client.DisableApp | ( | string | appName | ) |
Disable an app through provisioning_api
true, if app was disabled, false otherwise.| appName | Name of app to be disabled. |
| Stream owncloudsharp.Client.Download | ( | string | path | ) |
Download the specified file.
| path | File remote Path. |
| Stream owncloudsharp.Client.DownloadDirectoryAsZip | ( | string | path | ) |
Downloads a remote directory as zip.
| path | path to the remote directory to download. |
| bool owncloudsharp.Client.EnableApp | ( | string | appName | ) |
Enable an app through provisioning_api.
true, if app was enabled, false otherwise.| appName | Name of app to be enabled. |
| bool owncloudsharp.Client.Exists | ( | string | path | ) |
Checks if the specified remote path exists.
| path | remote Path. |
true, if remote path exists, false otherwise.| AppInfo owncloudsharp.Client.GetApp | ( | string | appName | ) |
Gets information about the specified app.
| appName | App name. |
| List<string> owncloudsharp.Client.GetApps | ( | ) |
List all enabled apps through the provisioning api.
| List<AppAttribute> owncloudsharp.Client.GetAttribute | ( | string | app = "", |
| string | key = "" |
||
| ) |
Returns an application attribute
| app | application id. |
| key | attribute key or None to retrieve all values for the given application. |
| Config owncloudsharp.Client.GetConfig | ( | ) |
Returns ownCloud config information.
| ResourceInfo owncloudsharp.Client.GetResourceInfo | ( | string | path | ) |
Gets the resource info for the remote path.
| path | remote Path. |
| List<Share> owncloudsharp.Client.GetShares | ( | string | path, |
| OcsBoolParam | reshares = OcsBoolParam.None, |
||
| OcsBoolParam | subfiles = OcsBoolParam.None |
||
| ) |
Gets all shares for the current user when path is not set, otherwise it gets shares for the specific file or folder
| path | (optional) path to the share to be checked. |
| reshares | (optional) returns not only the shares from the current user but all shares from the given file. |
| subfiles | (optional) returns all shares within a folder, given that path defines a folder. |
| User owncloudsharp.Client.GetUserAttributes | ( | string | username | ) |
Gets the user's attributes.
| username | Username. |
| List<string> owncloudsharp.Client.GetUserGroups | ( | string | username | ) |
Get a list of groups associated to a user.
| username | name of user to list groups. |
| List<string> owncloudsharp.Client.GetUserSubAdminGroups | ( | string | username | ) |
Get a list of subadmin groups associated to a user.
| username | name of user. |
| bool owncloudsharp.Client.GroupExists | ( | string | groupName | ) |
Checks a group via provisioning API.
true, if group exists, false otherwise.| groupName | name of group to be checked. |
| bool owncloudsharp.Client.IsShared | ( | string | path | ) |
Checks whether a path is already shared.
true if this instance is shared the specified path; otherwise, false.| path | path to the share to be checked. |
| bool owncloudsharp.Client.IsUserInGroup | ( | string | username, |
| string | groupName | ||
| ) |
Check if a user is in a group.
true, if user is in group, false otherwise.| username | name of user. |
| groupName | name of group. |
| bool owncloudsharp.Client.IsUserInSubAdminGroup | ( | string | username, |
| string | groupNname | ||
| ) |
Check if a user is in a subadmin group.
true, if user is in sub admin group, false otherwise.| username | name of user. |
| groupNname | name of subadmin group. |
| List<ResourceInfo> owncloudsharp.Client.List | ( | string | path | ) |
List the specified remote path.
| path | remote Path. |
| object owncloudsharp.Client.ListOpenRemoteShare | ( | ) |
List all remote shares.
| bool owncloudsharp.Client.Move | ( | string | source, |
| string | destination | ||
| ) |
Move the specified source and destination.
| source | Source resource path. |
| destination | Destination resource path. |
true, if resource was moved, false otherwise.| bool owncloudsharp.Client.RemoveUserFromGroup | ( | string | username, |
| string | groupName | ||
| ) |
Removes a user from a group.
true, if user was removed from group, false otherwise.| username | name of user to be removed. |
| groupName | name of group user is to be removed from. |
| bool owncloudsharp.Client.RemoveUserFromSubAdminGroup | ( | string | username, |
| string | groupName | ||
| ) |
Removes the user from sub admin group.
true, if user from sub admin group was removed, false otherwise.| username | Username. |
| groupName | Group name. |
| List<string> owncloudsharp.Client.SearchGroups | ( | string | name | ) |
Searches for groups via provisioning API.
| name | name of group to be searched for. |
| List<string> owncloudsharp.Client.SearchUsers | ( | string | username | ) |
Searches for users via provisioning API.
| username | name of user to be searched for. |
| bool owncloudsharp.Client.SetAttribute | ( | string | app, |
| string | key, | ||
| string | value | ||
| ) |
Sets an application attribute.
true, if attribute was set, false otherwise.| app | application id. |
| key | key of the attribute to set. |
| value | value to set. |
| bool owncloudsharp.Client.SetUserAttribute | ( | string | username, |
| OCSUserAttributeKey | key, | ||
| string | value | ||
| ) |
Sets a user attribute. See https://doc.owncloud.com/server/7.0EE/admin_manual/configuration_auth_backends/user_provisioning_api.html#users-edituser for reference.
true, if user attribute was set, false otherwise.| username | name of user to modify. |
| key | key of the attribute to set. |
| value | value to set. |
| GroupShare owncloudsharp.Client.ShareWithGroup | ( | string | path, |
| string | groupName, | ||
| int | perms = -1 |
||
| ) |
Shares a remote file with specified group.
| path | path to the remote file to share. |
| groupName | name of the group whom we want to share a file/folder. |
| perms | permissions of the shared object. |
| PublicShare owncloudsharp.Client.ShareWithLink | ( | string | path, |
| int | perms = -1, |
||
| string | password = null, |
||
| OcsBoolParam | public_upload = OcsBoolParam.None |
||
| ) |
Shares a remote file with link.
| path | path to the remote file to share. |
| perms | (optional) permission of the shared object. |
| password | (optional) sets a password. |
| public_upload | (optional) allows users to upload files or folders. |
| UserShare owncloudsharp.Client.ShareWithUser | ( | string | path, |
| string | username, | ||
| int | perms = -1, |
||
| OcsBoolParam | remoteUser = OcsBoolParam.None |
||
| ) |
Shares a remote file with specified user.
| path | path to the remote file to share. |
| username | name of the user whom we want to share a file/folder. |
| perms | permissions of the shared object. |
| remoteUser | Remote user. |
| bool owncloudsharp.Client.UpdateShare | ( | int | shareId, |
| int | perms = -1, |
||
| string | password = null, |
||
| OcsBoolParam | public_upload = OcsBoolParam.None |
||
| ) |
Updates a given share. NOTE: Only one of the update parameters can be specified at once.
true, if share was updated, false otherwise.| shareId | Share identifier. |
| perms | (optional) update permissions. |
| password | (optional) updated password for public link Share. |
| public_upload | (optional) If set to true enables public upload for public shares. |
| bool owncloudsharp.Client.Upload | ( | string | path, |
| Stream | data, | ||
| string | contentType | ||
| ) |
Upload the specified file to the specified path.
| path | remote Path. |
| data | File contents. |
| contentType | File content type. |
true, if upload successful, false otherwise.| bool owncloudsharp.Client.UserExists | ( | string | username | ) |
Checks a user via provisioning API.
true, if exists was usered, false otherwise.| username | name of user to be checked. |
|
static |
Provides the string values for the OCSUserAttributeKey enum