Esempio n. 1
0
        public static void run(PenneoConnector c)
        {
            RestConnector connector = new RestConnector(c);
            var           response  = connector.InvokeRequest("user");

            Console.WriteLine(response.StatusCode);
            Console.WriteLine(response.Content);
        }
Esempio n. 2
0
        public static void run(String customerId)
        {
            RestConnector connector = new RestConnector();
            var           response  = connector.InvokeRequest("/customers/" + customerId + "/users");

            // Console.WriteLine(response.StatusCode);
            Console.WriteLine(response.Content);
        }
Esempio n. 3
0
        public static String getPage(String folderId, int page, int perPage)
        {
            RestConnector connector = new RestConnector();
            var           response  = connector.InvokeRequest("/folders/" + folderId + "/casefiles"
                                                              + "?page=" + page
                                                              + "&per_page=" + perPage
                                                              );

            return(response.Content);
        }
Esempio n. 4
0
        public static void run()
        {
            RestConnector connector = new RestConnector();
            var           response  = connector.InvokeRequest("user");

            switch (response.StatusCode)
            {
            case HttpStatusCode.OK:
                Console.WriteLine(response.Content);
                break;

            case HttpStatusCode.Unauthorized:
                Console.WriteLine("Invalid credentials");
                break;

            default:
                Console.WriteLine("Server returned with: " + response.StatusCode);
                break;
            }
        }
Esempio n. 5
0
 public static void run(String customerId)
 {
     RestConnector connector = new RestConnector();
     var           response  = connector.InvokeRequest("/customers/" + customerId + "/users");
 }