

def logs(self, num=None, source=None, tail=False):
    'Returns the requested log.'
    payload = {
        'logplex': 'true',
    }
    if num:
        payload['num'] = num
    if source:
        payload['source'] = source
    if tail:
        payload['tail'] = 1
    r = self._h._http_resource(method='GET', resource=('apps', self.name, 'logs'), data=payload)
    r = requests.get(r.content)
    if (not tail):
        return r.content
    else:
        return r.iter_lines()

dataset/ETHPy150Open kennethreitz-archive/python-github3/github3/models.py App.logs/original