code: def list_refs(profile, ref_type=None):
      
      resource = "/refs"
      if ref_type:
          resource += "/" + ref_type
      data = api.get_request(profile, resource)
      result = [prepare(x) for x in data]
      return result
docs: List all refs.
  
      Args:
  
          profile
              A profile generated from ``simplygithub.authentication.profile``.
              Such profiles tell this module (i) the ``repo`` to connect to,
              and (ii) the ``token`` to connect with.
  
          ref_type
              The type of ref you want. For heads, it's ``heads``. For tags,
              it's ``tags``. That sort of thing. If you don't specify a type,
              all refs are returned.
  
      Returns:
          A list of dicts with data about each ref.