Пример #1
0
        /// <summary>
        /// Bulk Submission With this interface you can submit multiple hashes at once. If your API key is valid, your hashes are added to seeds and scheduled for timestamping. You are also able to submit additional information with every hash, such as a comment or notification target. If the hash already exists, the &#39;created&#39; field in the response is set to &#39;false&#39; and the notification(s) of the corresponding hash will be ignored. To later query the status of any hash for a certain blockchain you can use the &#39;seed_id&#39; field of its inner timestamp structure. This field can be used to query the timestamping status of the selected seed. This is recommended if a large number of hashes were transmitted in a certain time frame. Once a hash is successfully created for a certain crypto currency, we can notify your desired target with the timestamp information (via POST Request). A webhook for a submitted hash is triggered as soon as the tamper-proof timestamp with the selected crypto currency has been created.
        /// </summary>
        /// <exception cref="OriginStamp.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authorization">A valid API key is essential for authorization to handle the request.</param>
        /// <param name="timestampBulkRequest">DTO for the bulk hash submission. Add all relevant information concerning your hash submissions.</param>
        /// <returns>Task of List<DefaultOfTimestampResponse></returns>
        public async System.Threading.Tasks.Task <List <DefaultOfTimestampResponse> > CreateBulkTimestampAsync(string authorization, TimestampBulkRequest timestampBulkRequest)
        {
            ApiResponse <List <DefaultOfTimestampResponse> > localVarResponse = await CreateBulkTimestampAsyncWithHttpInfo(authorization, timestampBulkRequest);

            return(localVarResponse.Data);
        }
Пример #2
0
        /// <summary>
        /// Bulk Submission With this interface you can submit multiple hashes at once. If your API key is valid, your hashes are added to seeds and scheduled for timestamping. You are also able to submit additional information with every hash, such as a comment or notification target. If the hash already exists, the &#39;created&#39; field in the response is set to &#39;false&#39; and the notification(s) of the corresponding hash will be ignored. To later query the status of any hash for a certain blockchain you can use the &#39;seed_id&#39; field of its inner timestamp structure. This field can be used to query the timestamping status of the selected seed. This is recommended if a large number of hashes were transmitted in a certain time frame. Once a hash is successfully created for a certain crypto currency, we can notify your desired target with the timestamp information (via POST Request). A webhook for a submitted hash is triggered as soon as the tamper-proof timestamp with the selected crypto currency has been created.
        /// </summary>
        /// <exception cref="OriginStamp.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authorization">A valid API key is essential for authorization to handle the request.</param>
        /// <param name="timestampBulkRequest">DTO for the bulk hash submission. Add all relevant information concerning your hash submissions.</param>
        /// <returns>Task of ApiResponse (List<DefaultOfTimestampResponse>)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <List <DefaultOfTimestampResponse> > > CreateBulkTimestampAsyncWithHttpInfo(string authorization, TimestampBulkRequest timestampBulkRequest)
        {
            // verify the required parameter 'authorization' is set
            if (authorization == null)
            {
                throw new ApiException(400, "Missing required parameter 'authorization' when calling BulkApi->CreateBulkTimestamp");
            }
            // verify the required parameter 'timestampBulkRequest' is set
            if (timestampBulkRequest == null)
            {
                throw new ApiException(400, "Missing required parameter 'timestampBulkRequest' when calling BulkApi->CreateBulkTimestamp");
            }

            var    localVarPath         = "/v4/timestamp/bulk/create";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new List <KeyValuePair <String, String> >();
            var    localVarHeaderParams = new Dictionary <String, String>(this.Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (authorization != null)
            {
                localVarHeaderParams.Add("Authorization", this.Configuration.ApiClient.ParameterToString(authorization));                        // header parameter
            }
            if (timestampBulkRequest != null && timestampBulkRequest.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(timestampBulkRequest); // http body (model) parameter
            }
            else
            {
                localVarPostBody = timestampBulkRequest; // byte array
            }

            // authentication (API Key Authorization) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
            {
                localVarHeaderParams["Authorization"] = this.Configuration.GetApiKeyWithPrefix("Authorization");
            }

            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                            Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                            localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("CreateBulkTimestamp", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <List <DefaultOfTimestampResponse> >(localVarStatusCode,
                                                                        localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                                        (List <DefaultOfTimestampResponse>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List <DefaultOfTimestampResponse>))));
        }
Пример #3
0
        /// <summary>
        /// Bulk Submission With this interface you can submit multiple hashes at once. If your API key is valid, your hashes are added to seeds and scheduled for timestamping. You are also able to submit additional information with every hash, such as a comment or notification target. If the hash already exists, the &#39;created&#39; field in the response is set to &#39;false&#39; and the notification(s) of the corresponding hash will be ignored. To later query the status of any hash for a certain blockchain you can use the &#39;seed_id&#39; field of its inner timestamp structure. This field can be used to query the timestamping status of the selected seed. This is recommended if a large number of hashes were transmitted in a certain time frame. Once a hash is successfully created for a certain crypto currency, we can notify your desired target with the timestamp information (via POST Request). A webhook for a submitted hash is triggered as soon as the tamper-proof timestamp with the selected crypto currency has been created.
        /// </summary>
        /// <exception cref="OriginStamp.Client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="authorization">A valid API key is essential for authorization to handle the request.</param>
        /// <param name="timestampBulkRequest">DTO for the bulk hash submission. Add all relevant information concerning your hash submissions.</param>
        /// <returns>List<DefaultOfTimestampResponse></returns>
        public List <DefaultOfTimestampResponse> CreateBulkTimestamp(string authorization, TimestampBulkRequest timestampBulkRequest)
        {
            ApiResponse <List <DefaultOfTimestampResponse> > localVarResponse = CreateBulkTimestampWithHttpInfo(authorization, timestampBulkRequest);

            return(localVarResponse.Data);
        }