Skip to content

Commit

Permalink
first steps
Browse files Browse the repository at this point in the history
  • Loading branch information
hpiwowar committed Jul 24, 2015
1 parent e6f9896 commit aeea6f9
Show file tree
Hide file tree
Showing 11 changed files with 356 additions and 4,564 deletions.
Empty file added providers/__init__.py
Empty file.
19 changes: 19 additions & 0 deletions providers/github.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import requests
import os

import logging


logger = logging.getLogger("github")

repos_url_template = "https://api.github.com/users/%s/repos?client_id=" + os.environ["GITHUB_CLIENT_ID"] + "&client_secret=" + os.environ["GITHUB_CLIENT_SECRET"]

def get_repo_names(username):
repos_url = repos_url_template % username
response = requests.get(repos_url)
repo_names = [repo["name"] for repo in response.json()]
return repo_names




1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Werkzeug==0.9.4
arrow==0.4.4
biopython==1.65
gunicorn==17.5
githubpy==1.1.0
itsdangerous==0.23
requests==2.4.3
rq==0.5.1
Expand Down
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<head>
<base href="/"> <!-- needed for html5 pretty urls -->
<meta charset="utf-8">
<title>Impactstory Biomed</title>
<title>Impactstory Software</title>
<meta name="viewport" content="width=device-width, initial-scale=1">


Expand Down
32 changes: 32 additions & 0 deletions test/data/github_users_jasonpriem.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"login": "jasonpriem",
"id": 216933,
"avatar_url": "https://avatars.githubusercontent.com/u/216933?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/jasonpriem",
"html_url": "https://github.com/jasonpriem",
"followers_url": "https://api.github.com/users/jasonpriem/followers",
"following_url": "https://api.github.com/users/jasonpriem/following{/other_user}",
"gists_url": "https://api.github.com/users/jasonpriem/gists{/gist_id}",
"starred_url": "https://api.github.com/users/jasonpriem/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jasonpriem/subscriptions",
"organizations_url": "https://api.github.com/users/jasonpriem/orgs",
"repos_url": "https://api.github.com/users/jasonpriem/repos",
"events_url": "https://api.github.com/users/jasonpriem/events{/privacy}",
"received_events_url": "https://api.github.com/users/jasonpriem/received_events",
"type": "User",
"site_admin": false,
"name": "Jason Priem",
"company": "Impactstory",
"blog": "http://jasonpriem.com",
"location": "Vancouver, BC",
"email": "[email protected]",
"hireable": false,
"bio": null,
"public_repos": 22,
"public_gists": 0,
"followers": 43,
"following": 0,
"created_at": "2010-03-06T02:00:00Z",
"updated_at": "2015-06-27T06:45:53Z"
}
91 changes: 0 additions & 91 deletions test/data/medline_citations.py

This file was deleted.

Loading

0 comments on commit aeea6f9

Please sign in to comment.