Exemple #1
0
 public MetadataShare GetMetadataShare(string shareId, string path, int fileLimit, MetadataShareOrderBy sortOrder, bool orderAscending)
 {
     return(GetMetadataShare(shareId, path, fileLimit, sortOrder, orderAscending, null, null));
 }
Exemple #2
0
 public MetadataShare GetMetadataShare(string shareId, string path, int fileLimit, MetadataShareOrderBy sortOrder, bool orderAscending)
 {
     return GetMetadataShare(shareId, path, fileLimit, sortOrder, orderAscending, null, null);
 }
Exemple #3
0
        public MetadataShare GetMetadataShare(string shareId, string path, int fileLimit, MetadataShareOrderBy sortOrder, bool orderAscending, string cursor, string mimeType)
        {
            if (string.IsNullOrWhiteSpace(shareId))
            {
                throw new ArgumentNullException("shareId");
            }

            if (string.IsNullOrWhiteSpace(path))
            {
                throw new ArgumentNullException("path");
            }

            if (fileLimit > 25000)
            {
                fileLimit = 25000;
            }
            if (fileLimit < 1)
            {
                fileLimit = 1;
            }

            var request = _reqBuilder.BuildMetadataShareRequest(shareId, path, fileLimit, sortOrder, orderAscending, cursor, mimeType);

            var response = _apiRestClient.Execute <MetadataShare>(request);

            if (response.StatusCode != System.Net.HttpStatusCode.OK)
            {
                throw new CloudPTNetException();
            }

            return(response.Data);
        }
Exemple #4
0
        public MetadataShare GetMetadataShare(string shareId, string path, int fileLimit, MetadataShareOrderBy sortOrder, bool orderAscending, string cursor, string mimeType)
        {
            if (string.IsNullOrWhiteSpace(shareId))
                throw new ArgumentNullException("shareId");

            if (string.IsNullOrWhiteSpace(path))
                throw new ArgumentNullException("path");

            if (fileLimit > 25000)
                fileLimit = 25000;
            if (fileLimit < 1)
                fileLimit = 1;

            var request = _reqBuilder.BuildMetadataShareRequest(shareId, path, fileLimit, sortOrder, orderAscending, cursor, mimeType);

            var response = _apiRestClient.Execute<MetadataShare>(request);

            if (response.StatusCode != System.Net.HttpStatusCode.OK)
                throw new CloudPTNetException();

            return response.Data;
        }