docs: def get_branches(self, auth, username, repo_name):
          """
          Returns the branches in the repository with name ``repo_name`` owned by the user
          with username ``username``.
  
          :param auth.Authentication auth: authentication object 
          :param str username: username of owner of repository containing the branch
          :param str repo_name: name of the repository with the branch
          :return: a list of branches
          :rtype: List[GogsBranch]
          :raises NetworkFailure: if there is an error communicating with the server
          :raises ApiFailure: if the request cannot be serviced
          """
          path = "/repos/{u}/{r}/branches".format(u=username, r=repo_name)
          response = self.get(path, auth=auth)
          return [GogsBranch.from_json(branch_json) for branch_json in response.json()]