from flask.ext import restful  # @UnresolvedImport
from PullRequest import mergeable_pull_request
import github
from flask import g

class APIPullRequest(restful.Resource):
    def get(self, org, repo, pull):
        if not g.user:
            abort(401)
            return
        print(g.user)
        github_client = github.Github(g.user['github_access_token'])
        repository = github_client.get_repo('{}/{}'.format(org, repo))
        pull_request = repository.get_pull(pull)
        mergeable = mergeable_pull_request(pull_request)
        return {'message': 'alles super', 'mergeable': mergeable}

@@ -90,16 +90,43 @@
 _request
+, get_coefficient_and_votes
 %0Aimport 
@@ -574,62 +574,278 @@
     
-return %7B'message': 'alles super', 'mergeable': mergeable
+data_math = get_coefficient_and_votes(repository, pull_request)%0A%0A        return %7B%0A            'mergeable': mergeable,%0A            'coefficient': data_math%5B'coefficient'%5D,%0A            'votes': data_math%5B'votes'%5D,%0A            'votes_total': data_math%5B'votes_total'%5D%0A        
 %7D%0A

Add votes, votes_total and coefficient to the PR api endpoint