Table of Contents

Class SurveysBlueprintsClient

Namespace
Nfield.SDK
Assembly
Nfield.Public.SDK.dll
public class SurveysBlueprintsClient
Inheritance
SurveysBlueprintsClient
Inherited Members

Constructors

SurveysBlueprintsClient(string, HttpClient)

public SurveysBlueprintsClient(string baseUrl, HttpClient httpClient)

Parameters

baseUrl string
httpClient HttpClient

Properties

BaseUrl

public string BaseUrl { get; set; }

Property Value

string

JsonSerializerSettings

protected JsonSerializerSettings JsonSerializerSettings { get; }

Property Value

JsonSerializerSettings

ReadResponseAsString

public bool ReadResponseAsString { get; set; }

Property Value

bool

Methods

PostAsync(SurveyFromBlueprintModel, CancellationToken)

This method creates a new survey from a blueprint survey.
All survey configurations will be copied from the blueprint to the new survey.

public virtual Task<SurveyModel> PostAsync(SurveyFromBlueprintModel input, CancellationToken cancellationToken = default)

Parameters

input SurveyFromBlueprintModel

An object describing the details for the new survey

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<SurveyModel>

Survey created from blueprint survey

Exceptions

NfieldSdkException

A server side error occurred.

PutAsync(string, UpdateBlueprintModel, CancellationToken)

This method updates an existing blueprint by copying configuration from a survey.

public virtual Task PutAsync(string blueprintId, UpdateBlueprintModel input, CancellationToken cancellationToken = default)

Parameters

blueprintId string
input UpdateBlueprintModel
cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task

Successful

Exceptions

NfieldSdkException

A server side error occurred.

ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)

protected virtual Task<SurveysBlueprintsClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)

Parameters

response HttpResponseMessage
headers IReadOnlyDictionary<string, IEnumerable<string>>
cancellationToken CancellationToken

Returns

Task<SurveysBlueprintsClient.ObjectResponseResult<T>>

Type Parameters

T