Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo 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;
            }
        }
Ejemplo n.º 5
0
 public static void run(String customerId)
 {
     RestConnector connector = new RestConnector();
     var           response  = connector.InvokeRequest("/customers/" + customerId + "/users");
 }