Class ApiRequestor


  • public class ApiRequestor
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.api.client.http.HttpResponse request​(java.lang.String method, java.lang.String path)
      Make an http request to the Chargehound API.
      com.google.api.client.http.HttpResponse request​(java.lang.String method, java.lang.String path, java.util.Map<java.lang.String,​java.lang.Object> params)
      Make an http request to the Chargehound API.
      com.google.api.client.http.HttpResponse request​(java.lang.String method, java.lang.String path, java.util.Map<java.lang.String,​java.lang.Object> params, com.google.api.client.json.GenericJson data)
      Make an http request to the Chargehound API.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ApiRequestor

        public ApiRequestor​(Chargehound chargehound)
    • Method Detail

      • request

        public com.google.api.client.http.HttpResponse request​(java.lang.String method,
                                                               java.lang.String path,
                                                               java.util.Map<java.lang.String,​java.lang.Object> params,
                                                               com.google.api.client.json.GenericJson data)
                                                        throws ChargehoundException
        Make an http request to the Chargehound API.
        Parameters:
        method - the http method
        path - the URL path
        params - the query parameters
        data - the request body data
        Returns:
        HttpResponse
        Throws:
        ChargehoundException - Exception on failed API request
      • request

        public com.google.api.client.http.HttpResponse request​(java.lang.String method,
                                                               java.lang.String path)
                                                        throws ChargehoundException
        Make an http request to the Chargehound API.
        Parameters:
        method - the http method
        path - the URL path
        Returns:
        HttpResponse
        Throws:
        ChargehoundException - Exception on failed API request
      • request

        public com.google.api.client.http.HttpResponse request​(java.lang.String method,
                                                               java.lang.String path,
                                                               java.util.Map<java.lang.String,​java.lang.Object> params)
                                                        throws ChargehoundException
        Make an http request to the Chargehound API.
        Parameters:
        method - the http method
        path - the URL path
        params - the query parameters
        Returns:
        HttpResponse
        Throws:
        ChargehoundException - Exception on failed API request