コード例 #1
0
        public async Task <OwnCloudResponse> SetPasswordAsync(SharedOnlineItem onlineItem, string password)
        {
            var keyValuePairs = new Dictionary <string, string>
            {
                { "password", password }
            };

            return(await PostPropertiesAsync(OnlinePathBuilder.FileExpirationApi(_connectionSettings.StorageUri, onlineItem), keyValuePairs, "PUT"));

            // {"ocs":{"meta":{"status":"ok","statuscode":100,"message":null},"data":[]}}
        }
コード例 #2
0
        public async Task <OwnCloudResponse> SetExpiryDateAsync(SharedOnlineItem onlineItem, DateTime limit)
        {
            var keyValuePairs = new Dictionary <string, string>
            {
                { "expireDate", limit.ToString("yyyy-MM-dd") }
            };

            return(await PostPropertiesAsync(OnlinePathBuilder.FileExpirationApi(_connectionSettings.StorageUri, onlineItem), keyValuePairs, "PUT"));

            // {"ocs":{"meta":{"status":"ok","statuscode":100,"message":null},"data":[]}}
        }