コード例 #1
0
ファイル: Test.cs プロジェクト: bleepbloopsify/Clients
        public static void eventsApiTest(String username, String password, String auth)
        {
            // NB PUT REMOVED FROM API
            System.Diagnostics.Debug.WriteLine("\n\nSTART OF EVENTSAPI TEST\n\n");

            vestorly.api.EventsApi eventsApi = new vestorly.api.EventsApi();

            // TEST GET
            vestorly.model.Events myEvents = eventsApi.FindEvents(auth);
            System.Diagnostics.Debug.WriteLine("GET: " + myEvents);

            // TEST GET{ID}
            foreach (vestorly.model.Event Event in myEvents.events) {
                System.Diagnostics.Debug.WriteLine("GET{ID} : " + eventsApi.FindEventByID(Event.id, auth));
            }

            // TEST Post
            vestorly.model.EventInput eventInput = new vestorly.model.EventInput();
            eventInput.originalUrl = ("");
            eventInput.originatorEmail = ("");
            eventInput.subjectEmail = ("");
            eventInput.type = "bounce";

            vestorly.model.Eventcreateresponse response = eventsApi.CreateEvent(auth, eventInput);
            System.Diagnostics.Debug.WriteLine("Post: " + response);
            System.Diagnostics.Debug.WriteLine("\n\nEND OF EVENTSAPI TEST\n\n");
        }
コード例 #2
0
ファイル: Test.cs プロジェクト: minhpascal/Clients
        public static void eventsApiTest(String username, String password, String auth)
        {
            // NB PUT REMOVED FROM API
            System.Diagnostics.Debug.WriteLine("\n\nSTART OF EVENTSAPI TEST\n\n");

            vestorly.api.EventsApi eventsApi = new vestorly.api.EventsApi();

            // TEST GET
            vestorly.model.Events myEvents = eventsApi.FindEvents(auth);
            System.Diagnostics.Debug.WriteLine("GET: " + myEvents);

            // TEST GET{ID}
            foreach (vestorly.model.Event Event in myEvents.events)
            {
                System.Diagnostics.Debug.WriteLine("GET{ID} : " + eventsApi.FindEventByID(Event.id, auth));
            }

            // TEST Post
            vestorly.model.EventInput eventInput = new vestorly.model.EventInput();
            eventInput.originalUrl     = ("");
            eventInput.originatorEmail = ("");
            eventInput.subjectEmail    = ("");
            eventInput.type            = "bounce";

            vestorly.model.Eventcreateresponse response = eventsApi.CreateEvent(auth, eventInput);
            System.Diagnostics.Debug.WriteLine("Post: " + response);
            System.Diagnostics.Debug.WriteLine("\n\nEND OF EVENTSAPI TEST\n\n");
        }