'Get the contents of the file pointed to by ``path``.
:param str path: (required), path to file, e.g.
github3/repos/repo.py
:param str ref: (optional), the string name of a commit/branch/tag.
Default: master
:returns: the contents of the file requested
:rtype: :class:`~github3.repos.contents.Contents`'

def file_contents(self, path, ref=None):

    url = self._build_url(u'contents', path, base_url=self._api)
    json = self._json(self._get(url, params={u'ref': ref}), 200)
    return self._instance_or_null(Contents, json)
