         fetchContent      :
           (signature Object, Function)
 
+  initGithubFor = (client) ->
+
+    { oauth: {token} } = client.r
+
+    gh = new GithubAPI
+      version        : '3.0.0'
+      debug          : true
+      timeout        : 5000
+      headers        :
+        'user-agent' : USER_AGENT
+
+    gh.authenticate { type: 'oauth', token }
+
+    return gh
+
 
   @listRepos = permit 'list repos', success: revive
 

module.exports = class Github extends Base

  OAUTH_PROVIDER = 'github'

  @trait __dirname, '../traits/protected'



  , (client, options, callback) ->

    initGithubFor client

      .repos.getAll {}, (err, res) ->
        callback err, res


  @fetchContent = permit 'fetch content', success: revive
