You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i dont know why my app stop work, when i try to connect by ZendekApi_v2 Version runtime "v4.0.30319".
First at all i wanted to know why the object "api" don't have any method to know if conect o whatever fail.
And the problem is when i try to connect to my domain and credentials, api.Tickets.CreateTicket, send the follow inner exception; "Object reference not set to an instance of an object."
This is my code;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;
using ZendeskApi_v2;
using ZendeskApi_v2.Requests;
using ZendeskApi_v2.Extensions;
using ZendeskApi_v2.Models.Users;
using ZendeskApi_v2.Models.Shared;
using ZendeskApi_v2.Models.Constants;
using ZendeskApi_v2.Models.Tickets;
using OliviaSistemas.Utils.ZendeskInterface.Helpers;
namespace ZendeskInterfaceTestApp
{
class Program
{
static void Main(string[] args)
{
try
{
Console.WriteLine("TESTING");
CreateSampleTickets01(10);
Console.WriteLine("Done");
}
catch (Exception ex)
{
Console.WriteLine("ERROR e: {0} Json MSG: {1}", ex.Message, ex.Data["jsonException"]);
// Assert.IsTrue(ex.Message.Contains("Email: cannot be blank") && ex.Data["jsonException"] != null && ex.Data["jsonException"].ToString().Contains("Email: cannot be blank"));
}
finally
{
Console.ReadKey();
}
}
internal static void CreateSampleTickets01(int count = 10)
{
String page = "";
ZendeskApi_v2.ZendeskApi api = new ZendeskApi_v2.ZendeskApi(
"https://****.zendesk.com/api/v2",
"****@****.net",
"****",
"****");
for (int i = 0; i < count; i++)
{
System.Threading.Thread.Sleep(1000);
String subject = "Olivia Test - " + DateTime.Now.ToString();
api.Tickets.CreateTicket(new Ticket
{
Requester = new Requester { Email = "[email protected]", Name = " Marc Ibañez" },
Type = TicketTypes.Question,
Subject = subject,
Comment = new Comment { Body = subject + " (this is a test)" }
});
Console.WriteLine("Ticket created: {0}", subject);
} }
Thanks in advance
The text was updated successfully, but these errors were encountered:
Hello,
i dont know why my app stop work, when i try to connect by ZendekApi_v2 Version runtime "v4.0.30319".
First at all i wanted to know why the object "api" don't have any method to know if conect o whatever fail.
And the problem is when i try to connect to my domain and credentials, api.Tickets.CreateTicket, send the follow inner exception; "Object reference not set to an instance of an object."
This is my code;
Thanks in advance
The text was updated successfully, but these errors were encountered: