本文整理汇总了C#中ShareFile.Api.Client.Requests.ShareFile.Api.Client.Requests.Query.Action方法的典型用法代码示例。如果您正苦于以下问题:C# ShareFile.Api.Client.Requests.Query.Action方法的具体用法?C# ShareFile.Api.Client.Requests.Query.Action怎么用?C# ShareFile.Api.Client.Requests.Query.Action使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShareFile.Api.Client.Requests.ShareFile.Api.Client.Requests.Query
的用法示例。
在下文中一共展示了ShareFile.Api.Client.Requests.Query.Action方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetPreferences
/// <summary>
/// Get Account Preferences
/// </summary>
/// <returns>
/// Account preferences
/// </returns>
public IQuery<AccountPreferences> GetPreferences()
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<AccountPreferences>(Client);
sfApiQuery.From("Accounts");
sfApiQuery.Action("Preferences");
sfApiQuery.HttpMethod = "GET";
return sfApiQuery;
}
示例2: GetRecurring
/// <summary>
/// Get recurring reports
/// </summary>
/// <remarks>
/// Returns all recurring reports for the current account.
/// </remarks>
/// <returns>
/// List of reports
/// </returns>
public IQuery<ODataFeed<Report>> GetRecurring()
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<Report>>(Client);
sfApiQuery.From("Reports");
sfApiQuery.Action("Recurring");
sfApiQuery.HttpMethod = "GET";
return sfApiQuery;
}
示例3: GetRun
/// <summary>
/// Run Report
/// </summary>
/// <remarks>
/// Run a report and get the run id.
/// </remarks>
/// <returns>
/// ReportRecord
/// </returns>
public IQuery<ReportRecord> GetRun(Uri url)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ReportRecord>(Client);
sfApiQuery.Action("Run");
sfApiQuery.Uri(url);
sfApiQuery.HttpMethod = "GET";
return sfApiQuery;
}
示例4: GetByItem
/// <summary>
/// Get AccessControl List By Item
/// </summary>
/// <remarks>
/// Retrieves the Access Control List for a given Item.
/// </remarks>
/// <param name="url"></param>
/// <returns>
/// Access Control List of the given object ID.
/// </returns>
public IQuery<ODataFeed<AccessControl>> GetByItem(Uri url)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<AccessControl>>(Client);
sfApiQuery.Action("AccessControls");
sfApiQuery.Uri(url);
sfApiQuery.HttpMethod = "GET";
return sfApiQuery;
}
示例5: UpdateByItem
/// <summary>
/// Update AccessControl
/// </summary>
/// <example>
/// {
/// "Principal":{"Email":"[email protected]"},
/// "CanUpload":true,
/// "CanDownload":true,
/// "CanView":true,
/// "CanDelete":true,
/// "CanManagePermissions":true
/// }
/// </example>
/// <remarks>
/// Updates an existing Access Controls of a given Item. The Principal element cannot be modified, it is provided
/// in the Body to identity the AccessControl element to be modified. You can provide an ID, Email or URL on the
/// Principal object.
/// </remarks>
/// <param name="url"></param>
/// <param name="accessControl"></param>
/// <param name="recursive"></param>
/// <returns>
/// the created or modified AccessControl instance
/// </returns>
public IQuery<AccessControl> UpdateByItem(Uri url, AccessControl accessControl, bool recursive = false)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<AccessControl>(Client);
sfApiQuery.Action("AccessControls");
sfApiQuery.Uri(url);
sfApiQuery.QueryString("recursive", recursive);
sfApiQuery.Body = accessControl;
sfApiQuery.HttpMethod = "PATCH";
return sfApiQuery;
}
示例6: CreateByZone
/// <summary>
/// Create StorageCenter
/// </summary>
/// <example>
/// {
/// "ExternalAddress":"https://server/",
/// "Version":"4.12.20",
/// "HostName":"hostname"
/// }
/// </example>
/// <remarks>
/// Creates a new Storage Center associated with a specific zone
/// </remarks>
/// <param name="url"></param>
/// <param name="storageCenter"></param>
/// <returns>
/// The new storage center
/// </returns>
public IQuery<StorageCenter> CreateByZone(Uri url, StorageCenter storageCenter)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<StorageCenter>(Client);
sfApiQuery.Action("StorageCenters");
sfApiQuery.Uri(url);
sfApiQuery.Body = storageCenter;
sfApiQuery.HttpMethod = "POST";
return sfApiQuery;
}
示例7: GetMetadata
/// <summary>
/// Get StorageCenter Metadata
/// </summary>
/// <remarks>
/// Gets metadata associated with the specified storage center
/// </remarks>
/// <param name="zUrl"></param>
/// <param name="scid"></param>
/// <returns>
/// the storage center metadata feed
/// </returns>
public IQuery<ODataFeed<Metadata>> GetMetadata(Uri zUrl, string scid)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<Metadata>>(Client);
sfApiQuery.Action("StorageCenters");
sfApiQuery.Uri(zUrl);
sfApiQuery.ActionIds(scid);
sfApiQuery.SubAction("Metadata");
sfApiQuery.HttpMethod = "GET";
return sfApiQuery;
}
示例8: UpdateFolderAccessControlDomains
/// <summary>
/// Update the Folder Access Control List of domains
/// </summary>
/// <example>
/// {
/// "AccessControlType" : "AllowedDomains",
/// "Domains": ["domainA", "domainB", ...]
/// }
/// </example>
/// <remarks>
/// Merges the specified domains with existing domains in the list, and/or updates the AccessControlType. One of the parameters needs to be specified. It
/// allows to add new domains to the list.
/// </remarks>
/// <param name="AccessControlType"></param>
/// <param name="Domains"></param>
/// <returns>
/// The updated Folder Access Control List of domains for the Account
/// </returns>
public IQuery<AccessControlDomains> UpdateFolderAccessControlDomains(AccessControlDomains accessControlDomains)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<AccessControlDomains>(Client);
sfApiQuery.From("Accounts");
sfApiQuery.Action("FolderAccessControlDomains");
sfApiQuery.Body = accessControlDomains;
sfApiQuery.HttpMethod = "PATCH";
return sfApiQuery;
}
示例9: RequireSubdomain
/// <summary>
/// Check if subdomain is required
/// </summary>
/// <param name="username"></param>
/// <param name="singlePlane"></param>
/// <returns>
/// RequireSubdomainResult
/// </returns>
public IQuery<RequireSubdomainResult> RequireSubdomain(string username, bool singlePlane = false)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<RequireSubdomainResult>(Client);
sfApiQuery.From("Accounts");
sfApiQuery.Action("RequireSubdomain");
sfApiQuery.QueryString("username", username);
sfApiQuery.QueryString("singlePlane", singlePlane);
sfApiQuery.HttpMethod = "GET";
return sfApiQuery;
}
示例10: GetFolderAccessControlDomains
/// <summary>
/// Get the Folder Access Control List of domains
/// </summary>
/// <remarks>
/// Retrieve the list of domains that are allowed or disallowed to have access to folders. Whether the list is an allow or disallow list
/// is configured by the AccessControlType property.
///
/// The list blocks user access to folders by preventing adding a user to distribution groups or folders.
/// The domain names are checked against the domains of all the email addresses of the user.
/// This is an account-wide setting.
/// </remarks>
/// <returns>
/// The Folder Access Control List of domains for the Account, e.g.
///
/// {
/// "AccessControlType" : "AllowedDomains",
/// "Domains": ["domainA", "domainB", ...]
/// }
/// </returns>
public IQuery<AccessControlDomains> GetFolderAccessControlDomains()
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<AccessControlDomains>(Client);
sfApiQuery.From("Accounts");
sfApiQuery.Action("FolderAccessControlDomains");
sfApiQuery.HttpMethod = "GET";
return sfApiQuery;
}
示例11: CreateLoginAccessControlDomains
/// <summary>
/// Create or replace the Login Access Control List of domains
/// </summary>
/// <example>
/// {
/// "AccessControlType" : "AllowedDomains",
/// "Domains": ["domainA", "domainB", ...]
/// }
/// </example>
/// <param name="AccessControlType"></param>
/// <param name="Domains"></param>
/// <returns>
/// The new Login Access Control List of domains for the Account
/// </returns>
public IQuery<AccessControlDomains> CreateLoginAccessControlDomains(AccessControlDomains accessControlDomains)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<AccessControlDomains>(Client);
sfApiQuery.From("Accounts");
sfApiQuery.Action("LoginAccessControlDomains");
sfApiQuery.Body = accessControlDomains;
sfApiQuery.HttpMethod = "POST";
return sfApiQuery;
}
示例12: GetByUser
/// <summary>
/// Get List of Accounts for User
/// </summary>
/// <example>
/// {
/// "password":"password"
/// }
/// </example>
/// <remarks>
/// Retrieve the list of Accounts associated with a given user
/// All parameters to this call may be passed in the Post body as root JSON parameters, or in the URI -
/// with the exception of password that must be provided in the POST body.
/// This operation does not require authentication
/// </remarks>
/// <param name="username"></param>
/// <param name="password"></param>
/// <param name="employeesonly"></param>
/// <param name="requirehomefolders"></param>
/// <param name="singleplane"></param>
/// <returns>
/// The list of Accounts associated with this username/password.
/// </returns>
public IQuery<ODataFeed<Account>> GetByUser(ODataObject parameters, string username, bool employeesonly = false, bool requirehomefolders = false, bool singleplane = false)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<Account>>(Client);
sfApiQuery.From("Accounts");
sfApiQuery.Action("GetByUser");
parameters.AddProperty("username", username);
parameters.AddProperty("employeesonly", employeesonly);
parameters.AddProperty("requirehomefolders", requirehomefolders);
parameters.AddProperty("singleplane", singleplane);
sfApiQuery.Body = parameters;
sfApiQuery.HttpMethod = "POST";
return sfApiQuery;
}
示例13: UpdateSSO
/// <summary>
/// Update Account Single Sign-On Configuration
/// </summary>
/// <example>
/// {
/// "LogoutUrl":"",
/// "LoginUrl":"https://idp.com/signin",
/// "IPRestrictions":"+all",
/// "ForceSSO":true,
/// "EntityID":"http://account.sf-api.com/saml/info",
/// "SFEntityID":"http://idp.com/saml/info",
/// "SPInitatedAuthContext":"exact",
/// "SPInitatedAuthMethod":"urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"
/// }
/// </example>
/// <remarks>
/// Modifies the Single Sign-on Configuration for this account.
/// </remarks>
/// <param name="sso"></param>
/// <param name="provider"></param>
public IQuery<SSOAccountProvider> UpdateSSO(SSOAccountProvider sso, string provider = "saml")
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<SSOAccountProvider>(Client);
sfApiQuery.From("Accounts");
sfApiQuery.Action("SSO");
sfApiQuery.QueryString("provider", provider);
sfApiQuery.Body = sso;
sfApiQuery.HttpMethod = "PATCH";
return sfApiQuery;
}
示例14: GetSSO
/// <summary>
/// Get Account Single Sign-On Configuration
/// </summary>
/// <remarks>
/// Retrieve the Single Sign-on configuration for the Account
/// </remarks>
/// <param name="provider"></param>
/// <param name="idpEntityId"></param>
public IQuery<SSOAccountProvider> GetSSO(string provider = "saml", string idpEntityId = null)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<SSOAccountProvider>(Client);
sfApiQuery.From("Accounts");
sfApiQuery.Action("SSO");
sfApiQuery.QueryString("provider", provider);
sfApiQuery.QueryString("idpEntityId", idpEntityId);
sfApiQuery.HttpMethod = "GET";
return sfApiQuery;
}
示例15: CreateMetadata
/// <summary>
/// Create or update Zone Metadata
/// </summary>
/// <example>
/// [
/// {"Name":"metadataName1", "Value":"metadataValue1", "IsPublic":"true"},
/// {"Name":"metadataName2", "Value":"metadataValue2", "IsPublic":"false"},
/// ...
/// ]
/// </example>
/// <remarks>
/// Creates or updates Metadata entries associated with the specified zone
/// </remarks>
/// <param name="url"></param>
/// <param name="metadata"></param>
/// <returns>
/// the zone metadata feed
/// </returns>
public IQuery<ODataFeed<Metadata>> CreateMetadata(Uri url, IEnumerable<Metadata> metadata)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<Metadata>>(Client);
sfApiQuery.Action("Metadata");
sfApiQuery.Uri(url);
sfApiQuery.Body = metadata;
sfApiQuery.HttpMethod = "POST";
return sfApiQuery;
}