Exemplo n.º 1
0
        public async void can_generate_submission_url()
        {
            FormsClient       formsClient       = new FormsClient(ACCESS_KEY, SECRET_KEY, TenantName.ONEBLINK_TEST);
            SubmissionDataUrl submissionDataUrl = await formsClient.GenerateSubmissionDataUrl(formId, submissionId, 1000);

            Assert.NotNull(submissionDataUrl);
            Assert.NotNull(submissionDataUrl.url);
        }
Exemplo n.º 2
0
        public async Task <SubmissionDataUrl> GenerateSubmissionDataUrl(long formId, string submissionId, long expiryInSeconds)
        {
            if (expiryInSeconds < 900)
            {
                throw new ArgumentOutOfRangeException("expiryInSeconds must be greater than or equal to 900");
            }
            string            url = "/forms/" + formId.ToString() + "/retrieval-url/" + submissionId + "?expirySeconds=" + expiryInSeconds.ToString();
            SubmissionDataUrl submissionDataUrl = await this.oneBlinkApiClient.PostRequest <SubmissionDataUrl>(url);

            return(submissionDataUrl);
        }