本文整理汇总了C#中ShareFile.Api.Client.Requests.ShareFile.Api.Client.Requests.Query.From方法的典型用法代码示例。如果您正苦于以下问题:C# ShareFile.Api.Client.Requests.Query.From方法的具体用法?C# ShareFile.Api.Client.Requests.Query.From怎么用?C# ShareFile.Api.Client.Requests.Query.From使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShareFile.Api.Client.Requests.ShareFile.Api.Client.Requests.Query
的用法示例。
在下文中一共展示了ShareFile.Api.Client.Requests.Query.From方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Get
/// <summary>
/// Get List of Capabilities
/// </summary>
/// <remarks>
/// Retrieves the capability list of a given provider.
/// The URL for ShareFile API is of the form Domain/Provider/Version/EntityThe Domain is the server presenting the provider - typically sharefile.com,
/// but can be any other when using Storage Zones. The Provider represent the kind of data storage connected by the API. Examples
/// are 'sf' for ShareFile; 'cifs' for CIFS; and 'sp' for SharePoint. Other providers
/// may be created, clients must not assume any particular string.Version specifies the API version - currently at V3. Any backward incompatible
/// changes will be performed on a different version identifier, to avoid breaking
/// existing clients.The Capability document is used to indicate to clients that certain features
/// are not available on a given provider - allowing the client to suppress UX controls
/// and avoid "Not Implemented" exceptions to the end-user.
/// </remarks>
public IQuery<ODataFeed<Capability>> Get()
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<Capability>>(Client);
sfApiQuery.From("Capabilities");
sfApiQuery.HttpMethod = "GET";
return sfApiQuery;
}
示例2: CancelBatch
/// <summary>
/// Cancel an Operation Batch
/// </summary>
/// <remarks>
/// Cancel an Async Operation batch - all unfinished Async Operation records in that batch
/// will be moved to Cancelled state.
/// </remarks>
/// <param name="id"></param>
/// <returns>
/// A list of the modified Async Operations in the batch
/// </returns>
public IQuery<ODataFeed<AsyncOperation>> CancelBatch(string id)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<AsyncOperation>>(Client);
sfApiQuery.From("AsyncOperations");
sfApiQuery.Action("CancelBatch");
sfApiQuery.ActionIds(id);
sfApiQuery.HttpMethod = "POST";
return sfApiQuery;
}
示例3: Create
/// <summary>
/// Create Report
/// </summary>
/// <example>
/// {
/// "Id": "rs24f83e-b147-437e-9f28-e7d03634af42"
/// "Title": "Usage Report",
/// "ReportType": "Activity",
/// "ObjectType": "Account",
/// "ObjectId": "a024f83e-b147-437e-9f28-e7d0ef634af42",
/// "DateOption": "Last30Days",
/// "SaveFormat": "Excel"
/// }
/// </example>
/// <remarks>
/// Creates a new Report.
/// </remarks>
/// <param name="report"></param>
/// <param name="runOnCreate"></param>
/// <returns>
/// the created report
/// </returns>
public IQuery<Report> Create(Report report, bool runOnCreate)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Report>(Client);
sfApiQuery.From("Reports");
sfApiQuery.QueryString("runOnCreate", runOnCreate);
sfApiQuery.Body = report;
sfApiQuery.HttpMethod = "POST";
return sfApiQuery;
}
示例4: 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;
}
示例5: Get
/// <summary>
/// Get List of Zones
/// </summary>
/// <remarks>
/// Retrieve the list of Zones accessible to the authenticated user
/// This method will concatenate the list of private zones in the user's account and the
/// list of public zones accessible to this account. Any user can see the list of zones.
/// </remarks>
/// <param name="services"></param>
/// <param name="includeDisabled"></param>
/// <returns>
/// The list of public and private zones accessible to this user
/// </returns>
public IQuery<ODataFeed<Zone>> Get(ZoneService services = ZoneService.StorageZone, bool includeDisabled = false)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<Zone>>(Client);
sfApiQuery.From("Zones");
sfApiQuery.QueryString("services", services);
sfApiQuery.QueryString("includeDisabled", includeDisabled);
sfApiQuery.HttpMethod = "GET";
return sfApiQuery;
}
示例6: GetOutlookInformation
/// <summary>
/// Get Outlook Information
/// </summary>
/// <returns>
/// OutlookInformation
/// </returns>
public IQuery<OutlookInformation> GetOutlookInformation()
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<OutlookInformation>(Client);
sfApiQuery.From("Accounts");
sfApiQuery.Action("OutlookInformation");
sfApiQuery.HttpMethod = "GET";
return sfApiQuery;
}
示例7: 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;
}
示例8: 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;
}
示例9: UpdateBranding
/// <summary>
/// Modify the Branding for this account
/// </summary>
/// <remarks>
/// Modifies Branding information about the subdomain account.
/// This operation requires authentication.
/// </remarks>
/// <returns>
/// Branding information for a given sharefile account
/// </returns>
public IQuery<Account> UpdateBranding(Account account)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Account>(Client);
sfApiQuery.From("Accounts");
sfApiQuery.Action("Branding");
sfApiQuery.Body = account;
sfApiQuery.HttpMethod = "PATCH";
return sfApiQuery;
}
示例10: GetBranding
/// <summary>
/// Get current Account branding
/// </summary>
/// <remarks>
/// Retrievs Branding information about the subdomain account.
/// This operation does not require authentication.
/// </remarks>
/// <returns>
/// Branding information for a given sharefile account
/// </returns>
public IQuery<Account> GetBranding()
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Account>(Client);
sfApiQuery.From("Accounts");
sfApiQuery.Action("Branding");
sfApiQuery.HttpMethod = "GET";
return sfApiQuery;
}
示例11: Get
/// <summary>
/// Get current Account
/// </summary>
/// <remarks>
/// Retrieves information about the Account defined in the call subdomain
/// </remarks>
/// <param name="id"></param>
/// <returns>
/// The subdomain account information
/// </returns>
public IQuery<Account> Get(string id = null)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Account>(Client);
sfApiQuery.From("Accounts");
sfApiQuery.QueryString("id", id);
sfApiQuery.HttpMethod = "GET";
return sfApiQuery;
}
示例12: GetZones
/// <summary>
/// Get list of multi-tenant zones assigned to a tenant.
/// </summary>
/// <param name="parentid"></param>
/// <returns>
/// List of multi-tenant zones assigned to the tenant
/// </returns>
public IQuery<ODataFeed<Zone>> GetZones(string parentid)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<Zone>>(Client);
sfApiQuery.From("Accounts");
sfApiQuery.Action("Tenants");
sfApiQuery.ActionIds(parentid);
sfApiQuery.SubAction("Zones");
sfApiQuery.HttpMethod = "GET";
return sfApiQuery;
}
示例13: GetTenants
public IQuery<Account> GetTenants(string id)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Account>(Client);
sfApiQuery.From("Accounts");
sfApiQuery.Action("Tenants");
sfApiQuery.ActionIds(id);
sfApiQuery.HttpMethod = "GET";
return sfApiQuery;
}
示例14: Create
/// <summary>
/// Create Share
/// </summary>
/// <example>
/// {
/// "ShareType":"Send",
/// "Title":"Sample Send Share",
/// "Items": [ { "Id":"itemid" }, {...} ],
/// "Recipients":[ { "User": { "Id":"userid" } }, { "User": { "Email": "[email protected]" } } ],
/// "ExpirationDate": "2013-07-23",
/// "RequireLogin": false,
/// "RequireUserInfo": false,
/// "MaxDownloads": -1,
/// "UsesStreamIDs": false
/// }
/// {
/// "ShareType":"Request",
/// "Title":"Sample Request Share",
/// "Recipients":[ { "User": { "Id":"userid" } }, { "User": { "Email": "[email protected]" } } ],
/// "Parent": { "Id":"folderid" },
/// "ExpirationDate": "2013-07-23",
/// "RequireLogin": false,
/// "RequireUserInfo": false,
/// "TrackUntilDate": "2013-07-23",
/// "SendFrequency": -1,
/// "SendInterval": -1
/// }
/// </example>
/// <remarks>
/// Creates a new Send or Request Share.
/// Expiration date:
/// - if not specified the default is 30 days
/// - "9999-12-31" disables share expiration.
/// To use stream IDs as item IDs UsesStreamIDs needs to be set to true, and all the IDs in Items need to be specified
/// as stream IDs.
/// </remarks>
/// <param name="share"></param>
/// <param name="notify"></param>
/// <returns>
/// The new Share
/// </returns>
public IQuery<Share> Create(Share share, bool notify = false)
{
var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Share>(Client);
sfApiQuery.From("Shares");
sfApiQuery.QueryString("notify", notify);
sfApiQuery.Body = share;
sfApiQuery.HttpMethod = "POST";
return sfApiQuery;
}
示例15: 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;
}