Sha256: 7d3cf7bcb4c1ba9d24aa1ade3ea8fec7a5828e7989d707a5c9f000bfec37dd46

Contents?: true

Size: 499 Bytes

Versions: 9

Compression:

Stored size: 499 Bytes

Contents

Prospectus.extra_dep('github_api', 'octoauth')

module LogCabin
  module Modules
    ##
    # Provide an api method for modules to query GitHub
    module GithubApi
      def github_api
        @github_api ||= Octokit::Client.new(
          access_token: auth.token,
          auto_paginate: true
        )
      end

      private

      def auth
        @auth ||= Octoauth.new(
          note: 'Prospectus',
          file: :default,
          autosave: true
        )
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
prospectus-0.0.11 lib/prospectus/helpers/github_api.rb
prospectus-0.0.10 lib/prospectus/helpers/github_api.rb
prospectus-0.0.9 lib/prospectus/helpers/github_api.rb
prospectus-0.0.8 lib/prospectus/helpers/github_api.rb
prospectus-0.0.6 lib/prospectus/helpers/github_api.rb
prospectus-0.0.5 lib/prospectus/helpers/github_api.rb
prospectus-0.0.4 lib/prospectus/helpers/github_api.rb
prospectus-0.0.3 lib/prospectus/helpers/github_api.rb
prospectus-0.0.2 lib/prospectus/helpers/github_api.rb