Get contents

Once the package is installed, , you can easily retrieve the contents of a Dialogue and display it on your app. To do that you need to first prepare the payload.

var request = new GetContentsRequest()
{
    ApiKey = "[Your api key]",
    Slug = "[Your Slug]", 
    EmailHash = "[Email hash]", 
    VariableList = new Dictionary<string, object>()
    {
        //Any variables you need to pass.
    },
    IsPilot=true //optional parameter if you want to get the Piloted version
    
};

You can also set the PageIndex and PageSize parameters in your request, if you want to get paginated data.

That’s pretty much it. All you need to do now is pass the payload to the GetContents method to get the content.

var dialogueWiseClient = new DialogueWiseClient();
var response = dialogueWiseClient.GetContents(request);

If the contents are retrieved successfully, it will return you a response of type DialogueWiseResponse which will contain a status code, error and result. The StatusCode indicates the standard HTTP response status codes and the Error will contain any error messages. The Result will have the content which can be displayed on your app.

You can also have a look at the sample project available on Github for a better understanding.