Exemplo n.º 1
0
def github_job(request):
    days = int(request.GET.get("days", 2))

    job = GithubCodeActivityJob(datetime.now(), days)
    success = job.run()

    response_dict = {'data': success}

    return HttpResponse(json.dumps(response_dict),
                        content_type="application/json")
Exemplo n.º 2
0
def github_job(request):
    days = int(request.GET.get("days", 2))

    job = GithubCodeActivityJob(datetime.now(), days)
    success = job.run()

    response_dict = {
        'data': success
    }

    return HttpResponse(json.dumps(response_dict), content_type="application/json")
Exemplo n.º 3
0
    def handle(self, *args, **options):
        # print "YOOOO"

        user = {
            'id': 1,
            'access_token': settings.GITHUB_TEST_KEY,
            'username': '******',
        }

        github_job = GithubCodeActivityJob(datetime.datetime.now(), 3)
        # github_job.get_commits_for_repo_and_user(user, 'phouse512/piper', 10)

        github_job.get_single_history(user)