Sha256: dbaccae3d03b059066ff8242f500b5930225de63bd568000b36737a533152f35

Contents?: true

Size: 545 Bytes

Versions: 1

Compression:

Stored size: 545 Bytes

Contents

module GithubStats
  # Encapsulates github interactions so we can inject boring defaults and
  # auto-paginate and potentially throttle or whatever.
  class GithubClient
    attr_accessor :octokit

    def initialize(options)
      self.octokit = Octokit::Client.new(access_token:
                                          options[:github_access_token],
                                         auto_paginate: true)
    end

    def search_issues(query, options = { per_page: 100 })
      octokit.search_issues(query, options)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
github-stats-0.2.0 lib/github_stats/github_client.rb