當前位置: 首頁>>代碼示例>>C#>>正文


C# Requests.Query類代碼示例

本文整理匯總了C#中ShareFile.Api.Client.Requests.ShareFile.Api.Client.Requests.Query的典型用法代碼示例。如果您正苦於以下問題:C# ShareFile.Api.Client.Requests.Query類的具體用法?C# ShareFile.Api.Client.Requests.Query怎麽用?C# ShareFile.Api.Client.Requests.Query使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ShareFile.Api.Client.Requests.Query類屬於ShareFile.Api.Client.Requests命名空間,在下文中一共展示了ShareFile.Api.Client.Requests.Query類的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;
        }
開發者ID:wholroyd,項目名稱:ShareFile-NET,代碼行數:21,代碼來源:CapabilitiesEntity.cs

示例2: FindSubdomain

        /// <summary>
        /// Find Subdomain
        /// </summary>
        /// <example>
        /// {
        /// "UsernameShort":"usernameShort",
        /// "Password":"pass",
        /// "EmployeeOnly":false
        /// }
        /// </example>
        /// <remarks>
        /// Find the user account information based on the short username
        /// </remarks>
        /// <param name="findSubdomainParams"></param>
        /// <param name="singlePlane"></param>
        /// <returns>
        /// FindSubdomainResult
        /// </returns>
        public IQuery<FindSubdomainResult> FindSubdomain(FindSubdomainParams findSubdomainParams, bool singlePlane = false)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<FindSubdomainResult>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("FindSubdomain");
            sfApiQuery.QueryString("singlePlane", singlePlane);
            sfApiQuery.Body = findSubdomainParams;
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
開發者ID:wholroyd,項目名稱:ShareFile-NET,代碼行數:28,代碼來源:AccountsEntity.cs

示例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;
        }
開發者ID:wholroyd,項目名稱:ShareFile-NET,代碼行數:17,代碼來源:ReportsEntity.cs

示例4: 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;
        }
開發者ID:wholroyd,項目名稱:ShareFile-NET,代碼行數:31,代碼來源:ReportsEntity.cs

示例5: 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;
        }
開發者ID:wholroyd,項目名稱:ShareFile-NET,代碼行數:17,代碼來源:ReportsEntity.cs

示例6: BulkSet

        /// <summary>
        /// Create or Update multiple AccessControls for a given Item
        /// </summary>
        /// <example>
        /// {
        /// "NotifyUser":true,
        /// "NotifyMessage":"msg",
        /// 
        /// "AccessControlParams":
        /// [
        /// {
        /// "AccessControl":
        /// {
        /// "Principal" : { "Id":"existing_user_id" },
        /// "CanUpload" : true,
        /// "CanDownload" : false,
        /// "CanView" : true
        /// },
        /// "NotifyUser":false
        /// },
        /// {
        /// "AccessControl":
        /// {
        /// "Principal" : { "Id":"group_id" },
        /// "CanUpload" : false,
        /// "CanDownload" : true,
        /// "CanView" : true
        /// },
        /// "Recursive":true
        /// },
        /// {
        /// "AccessControl":
        /// {
        /// "Principal" : { "Email":"[email protected]" },
        /// "CanUpload" : false,
        /// "CanDownload" : true,
        /// "CanView" : true
        /// }
        /// }
        /// ]
        /// }
        /// </example>
        /// <remarks>
        /// All the AccessControls are created or updated for a single Item identified by the Item id in the URI. AccessControl.Item Ids are not allowed.
        /// If an AccessControl doesn't specify NotifyUser or NotifyMessage property their values are inherited from the corresponding
        /// top-level properties.
        /// The Principal can be identified by Id or Email (Users). If a User with the specified email does not exist it will be created.
        /// Defaults for NotifyUser and Recursive are false.
        /// See AccessControlsBulkParams for other details.
        /// </remarks>
        /// <param name="url"></param>
        /// <param name="bulkParams"></param>
        /// <returns>
        /// AccessControlBulkResult
        /// </returns>
        public IQuery<AccessControlBulkResult> BulkSet(Uri url, AccessControlsBulkParams bulkParams)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<AccessControlBulkResult>(Client);
		    sfApiQuery.Action("AccessControls");
            sfApiQuery.Uri(url);
            sfApiQuery.SubAction("BulkSet");
            sfApiQuery.Body = bulkParams;
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
開發者ID:wholroyd,項目名稱:ShareFile-NET,代碼行數:65,代碼來源:AccessControlsEntity.cs

示例7: CreateByItem

        /// <summary>
        /// Create AccessControl
        /// </summary>
        /// <example>
        /// {
        /// "Principal":{"url":"https://account.sf-api.com/v3/Groups(id)"},
        /// "CanUpload":true,
        /// "CanDownload":true,
        /// "CanView":true,
        /// "CanDelete":true,
        /// "CanManagePermissions":true,
        /// "Message":"Message"
        /// }
        /// </example>
        /// <remarks>
        /// Creates a new Access Controls entry for a given Item. Access controls can only define a single Principal,
        /// which can be either a Group or User. The 'Principal' element is specified as an object - you should populate
        /// either the URL or the ID reference.
        /// </remarks>
        /// <param name="url"></param>
        /// <param name="accessControl"></param>
        /// <param name="recursive"></param>
        /// <param name="message"></param>
        /// <param name="sendDefaultNotification"></param>
        /// <returns>
        /// the created or modified AccessControl instance
        /// </returns>
        public IQuery<AccessControl> CreateByItem(Uri url, AccessControl accessControl, bool recursive = false, bool sendDefaultNotification = false, string message = null)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<AccessControl>(Client);
		    sfApiQuery.Action("AccessControls");
            sfApiQuery.Uri(url);
            sfApiQuery.QueryString("recursive", recursive);
            sfApiQuery.QueryString("sendDefaultNotification", sendDefaultNotification);
            accessControl.AddProperty("message", message);
            sfApiQuery.Body = accessControl;
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
開發者ID:wholroyd,項目名稱:ShareFile-NET,代碼行數:39,代碼來源:AccessControlsEntity.cs

示例8: CreateMetadata

        /// <summary>
        /// Create or update StorageCenter 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 storage center
        /// </remarks>
        /// <param name="zUrl"></param>
        /// <param name="scid"></param>
        /// <param name="metadata"></param>
        /// <returns>
        /// the storage center metadata feed
        /// </returns>
        public IQuery<ODataFeed<Metadata>> CreateMetadata(Uri zUrl, string scid, IEnumerable<Metadata> metadata)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<Metadata>>(Client);
		    sfApiQuery.Action("StorageCenters");
            sfApiQuery.Uri(zUrl);
            sfApiQuery.ActionIds(scid);
            sfApiQuery.SubAction("Metadata");
            sfApiQuery.Body = metadata;
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
開發者ID:wholroyd,項目名稱:ShareFile-NET,代碼行數:30,代碼來源:StorageCentersEntity.cs

示例9: ResetSecret

        /// <summary>
        /// Reset Zone Secret
        /// </summary>
        /// <remarks>
        /// Resets the current Zone Secret to a new Random value
        /// Caution! This Call will invalidate all Storage Center communications until the Storage Center Zone secret
        /// is also updated.
        /// User must be a Zone admin to perform this action
        /// </remarks>
        /// <param name="url"></param>
        /// <returns>
        /// The modified Zone object
        /// </returns>
        public IQuery<Zone> ResetSecret(Uri url)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Zone>(Client);
		    sfApiQuery.Action("ResetSecret");
            sfApiQuery.Uri(url);
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
開發者ID:wholroyd,項目名稱:ShareFile-NET,代碼行數:21,代碼來源:ZonesEntity.cs

示例10: Update

        /// <summary>
        /// Update Zone
        /// </summary>
        /// <example>
        /// {
        /// "Name":"Name",
        /// "HeartbeatTolerance":10,
        /// "ZoneServices":"StorageZone, SharepointConnector, NetworkShareConnector"
        /// }
        /// </example>
        /// <remarks>
        /// Updates an existing zone
        /// </remarks>
        /// <param name="url"></param>
        /// <param name="zone"></param>
        /// <returns>
        /// The modified zone
        /// </returns>
        public IQuery<Zone> Update(Uri url, Zone zone)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Zone>(Client);
            sfApiQuery.Uri(url);
            sfApiQuery.Body = zone;
            sfApiQuery.HttpMethod = "PATCH";	
		    return sfApiQuery;
        }
開發者ID:wholroyd,項目名稱:ShareFile-NET,代碼行數:26,代碼來源:ZonesEntity.cs

示例11: Create

        /// <summary>
        /// Create Zone
        /// </summary>
        /// <example>
        /// {
        /// "Name":"Name",
        /// "HeartbeatTolerance":10,
        /// "ZoneServices":"StorageZone, SharepointConnector, NetworkShareConnector"
        /// }
        /// </example>
        /// <remarks>
        /// Creates a new Zone.
        /// </remarks>
        /// <returns>
        /// the created zone
        /// </returns>
        public IQuery<Zone> Create(Zone zone)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Zone>(Client);
		    sfApiQuery.From("Zones");
            sfApiQuery.Body = zone;
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
開發者ID:wholroyd,項目名稱:ShareFile-NET,代碼行數:24,代碼來源:ZonesEntity.cs

示例12: 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<Zone> Get(Uri url, bool secret = false)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Zone>(Client);
            sfApiQuery.Uri(url);
            sfApiQuery.QueryString("secret", secret);
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
開發者ID:wholroyd,項目名稱:ShareFile-NET,代碼行數:21,代碼來源:ZonesEntity.cs

示例13: GetSSOInfo

        /// <summary>
        /// Get SSO Info
        /// </summary>
        /// <param name="subdomain"></param>
        /// <returns>
        /// SSOInfo
        /// </returns>
        public IQuery<SSOInfo> GetSSOInfo(string subdomain)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<SSOInfo>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("SSOInfo");
            sfApiQuery.QueryString("subdomain", subdomain);
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
開發者ID:wholroyd,項目名稱:ShareFile-NET,代碼行數:16,代碼來源:AccountsEntity.cs

示例14: 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;
        }
開發者ID:wholroyd,項目名稱:ShareFile-NET,代碼行數:14,代碼來源:AccountsEntity.cs

示例15: UpdateByZone

        /// <summary>
        /// Update StorageCenter
        /// </summary>
        /// <example>
        /// {
        /// "ExternalAddress":"https://server/",
        /// "Version":"4.12.20",
        /// "HostName":"hostname"
        /// }
        /// </example>
        /// <remarks>
        /// Updates an existing Storage Center
        /// </remarks>
        /// <param name="zUrl"></param>
        /// <param name="scid"></param>
        /// <param name="storageCenter"></param>
        /// <returns>
        /// the modified storage center
        /// </returns>
        public IQuery<StorageCenter> UpdateByZone(Uri zUrl, string scid, StorageCenter storageCenter)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<StorageCenter>(Client);
		    sfApiQuery.Action("StorageCenters");
            sfApiQuery.Uri(zUrl);
            sfApiQuery.ActionIds(scid);
            sfApiQuery.Body = storageCenter;
            sfApiQuery.HttpMethod = "PATCH";	
		    return sfApiQuery;
        }
開發者ID:wholroyd,項目名稱:ShareFile-NET,代碼行數:29,代碼來源:StorageCentersEntity.cs


注:本文中的ShareFile.Api.Client.Requests.ShareFile.Api.Client.Requests.Query類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。