code: def character(self, term, page = 1, perpage = 3):
          
          query_string = """\
              query ($query: String, $page: Int, $perpage: Int) {
                  Page (page: $page, perPage: $perpage) {
                      pageInfo {
                          total
                          currentPage
                          lastPage
                          hasNextPage
                      }
                      characters (search: $query) {
                          id
                          name {
                              first
                              last
                          }
                          image {
                              large
                          }
                      }
                  }
              }
          """
          vars = {"query": term, "page": page, "perpage": perpage}
          r = requests.post(self.settings['apiurl'],
                            headers=self.settings['header'],
                            json={'query': query_string, 'variables': vars})
          jsd = r.text
  
          try:
              jsd = json.loads(jsd)
          except ValueError:
              return None
          else:
              return jsd
docs: Search for a character by term.
          Results are paginated by default. Page specifies which page we're on.
          Perpage specifies how many per page to request. 3 is just the example from the API docs.
          
          :param term str: Name to search by
          :param page int: Which page are we requesting? Starts at 1.
          :param perpage int: How many results per page are we requesting?
          :return: Json object with returned results.
          :rtype: Json object with returned results.