ローカルとの差分だけを取得するべく、できるだけ少ない回数でリクエストする。
成果物
ソースコード
呼出元
from github import GitHub import json username = "github_username" db_path_account = "C:/GitHub.Accounts.sqlite3" db_path_api = "C:/GitHub.Apis.sqlite3" db_path_repo = "C:/GitHub.Repositories.{0}.sqlite3".format(username) g = GitHub.GitHub(db_path_account, db_path_api, db_path_repo, username) res = g.db.update_local_db() print(len(res))
g.db.update_local_db()
の実装が今回のメイン。
今回のメイン
.\src\github\db\repositories[Repositories.py](https://github.com/ytyaru/GitHub.Pagenation.20170125074530829/blob/master/src/github/db/repositories/Repositories.py)参照。
所感
これでサクっとリポジトリ情報DBを更新できる。
しかしDBファイルパス引数が多すぎるのがかっこ悪い。