Esempio n. 1
0
        public void Setup()
        {
            _kayakoApiRequest        = new Mock <IKayakoApiRequest>();
            _knowledgebaseController = new KnowledgebaseController(_kayakoApiRequest.Object);

            _responseKnowledgebaseCategoryCollection = new KnowledgebaseCategoryCollection
            {
                new KnowledgebaseCategory(),
                new KnowledgebaseCategory()
            };

            _responseKnowledgebaseArticleCollection = new KnowledgebaseArticleCollection
            {
                new KnowledgebaseArticle(),
                new KnowledgebaseArticle()
            };

            _responseKnowledgebaseCommentCollection = new KnowledgebaseCommentCollection
            {
                new KnowledgebaseComment(),
                new KnowledgebaseComment()
            };

            _responseKnowledgebaseAttachmentCollection = new KnowledgebaseAttachmentCollection
            {
                new KnowledgebaseAttachment(),
                new KnowledgebaseAttachment()
            };
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the KayakoRestApi.KayakoService class.
 /// </summary>
 /// <param name="apiKey">Api Key.</param>
 /// <param name="secretKey">Secret Api Key.</param>
 /// <param name="apiUrl">URL of Kayako REST Api</param>
 /// <param name="requestType">Determines how the request URL is formed</param>
 public KayakoClient(string apiKey, string secretKey, string apiUrl, IWebProxy proxy, ApiRequestType requestType)
 {
     _coreController = new CoreController(apiKey, secretKey, apiUrl, proxy, requestType);
     _customFields   = new CustomFieldController(apiKey, secretKey, apiUrl, proxy, requestType);
     _departments    = new DepartmentController(apiKey, secretKey, apiUrl, proxy, requestType);
     _knowledgebase  = new KnowledgebaseController(apiKey, secretKey, apiUrl, proxy, requestType);
     _news           = new NewsController(apiKey, secretKey, apiUrl, proxy, requestType);
     _staff          = new StaffController(apiKey, secretKey, apiUrl, proxy, requestType);
     _tickets        = new TicketController(apiKey, secretKey, apiUrl, proxy, requestType);
     _troubleshooter = new TroubleshooterController(apiKey, secretKey, apiUrl, proxy, requestType);
     _users          = new UserController(apiKey, secretKey, apiUrl, proxy, requestType);
 }
 /// <summary>
 /// Initializes a new instance of the KayakoRestApi.KayakoService class.
 /// </summary>
 /// <param name="apiKey">Api Key.</param>
 /// <param name="secretKey">Secret Api Key.</param>
 /// <param name="apiUrl">URL of Kayako REST Api</param>
 public KayakoClient(string apiKey, string secretKey, string apiUrl)
 {
     _coreController = new CoreController(apiKey, secretKey, apiUrl, null);
     _customFields = new CustomFieldController(apiKey, secretKey, apiUrl, null);
     _departments = new DepartmentController(apiKey, secretKey, apiUrl, null);
     _knowledgebase = new KnowledgebaseController(apiKey, secretKey, apiUrl, null);
     _news = new NewsController(apiKey, secretKey, apiUrl, null);
     _staff = new StaffController(apiKey, secretKey, apiUrl, null);
     _tickets = new TicketController(apiKey, secretKey, apiUrl, null);
     _troubleshooter = new TroubleshooterController(apiKey, secretKey, apiUrl, null);
     _users = new UserController(apiKey, secretKey, apiUrl, null);
 }
        public void Setup()
        {
            _kayakoApiRequest = new Mock<IKayakoApiRequest>();
            _knowledgebaseController = new KnowledgebaseController(_kayakoApiRequest.Object);

            _responseKnowledgebaseCategoryCollection = new KnowledgebaseCategoryCollection
                {
                    new KnowledgebaseCategory(),
                    new KnowledgebaseCategory()
                };

            _responseKnowledgebaseArticleCollection = new KnowledgebaseArticleCollection
                {
                    new KnowledgebaseArticle(),
                    new KnowledgebaseArticle()
                };

            _responseKnowledgebaseCommentCollection = new KnowledgebaseCommentCollection
                {
                    new KnowledgebaseComment(),
                    new KnowledgebaseComment()
                };

            _responseKnowledgebaseAttachmentCollection = new KnowledgebaseAttachmentCollection
                {
                    new KnowledgebaseAttachment(),
                    new KnowledgebaseAttachment()
                };
        }