code: def get_foreign_page_id_from_type(self, page_type):
          '''
          Get the foreign page id based on type
  
          Only works for index pages
          '''
          # TODO: log this
          response = requests.get("{}pages/?type={}".format(
              self.api_url, page_type))
          content = json.loads(response.content)
          return content["items"][0]["id"f get_foreign_page_id_from_type(self, page_type):
          '''
          Get the foreign page id based on type
  
          Only works for index pages
          '''
          # TODO: log this
          response = requests.get("{}pages/?type={}".format(
              self.api_url, page_type))
          content = json.loads(response.content)
          return content["items"][0]["id"]
docs: Get the foreign page id based on type
  
          Only works for index pages