scripts/get_traffic.py
def get_traffic(self):
        """
        Retrieves the traffic for the repositories of the given organization.
        """
        print 'Getting traffic.'
        #Uses the developer API. Note this could change.
        headers = {'Accept': 'application/vnd.github.spiderman-preview', 'Authorization': 'token ' + self.token}
        headers_release = {'Authorization': 'token ' + self.token}
        for repo in self.org_retrieved.iter_repos(type='public'):
            url = ('https://api.github.com/repos/' + self.organization_name
                + '/' + repo.name)
            self.get_referrers(url=url, headers=headers, repo_name=repo.name)
            self.get_paths(url=url, headers=headers)
            self.get_data(url=url, headers=headers, dict_to_store=self.views,
                type='views', repo_name=repo.name)
            self.get_data(url=url, headers=headers, dict_to_store=self.clones,
                type='clones', repo_name=repo.name)
            self.get_releases(url=url, headers=headers_release, repo_name=repo.name)
def get_traffic(self):
        """
        Retrieves the traffic for the repositories of the given organization.
        """
        print 'Getting traffic.'
        #Uses the developer API. Note this could change.
        headers = {'Accept': 'application/vnd.github.spiderman-preview', 'Authorization': 'token ' + self.token}
        headers_release = {'Authorization': 'token ' + self.token}
        for repo in self.org_retrieved.iter_repos(type='public'):
            url = ('https://api.github.com/repos/' + self.organization_name
                + '/' + repo.name)
            self.get_referrers(url=url, headers=headers, repo_name=repo.name)
            self.get_paths(url=url, headers=headers)
            self.get_data(url=url, headers=headers, dict_to_store=self.views,
                type='views', repo_name=repo.name)
            self.get_data(url=url, headers=headers, dict_to_store=self.clones,
                type='clones', repo_name=repo.name)
            self.get_releases(url=url, headers=headers_release, repo_name=repo.name)
Retrieves the traffic for the repositories of the given organization.