Sha256: 7e628bef15386ef33d373fd8c81c13162415020d30e33e032f9b5b465768247c
Contents?: true
Size: 416 Bytes
Versions: 4
Compression:
Stored size: 416 Bytes
Contents
class GithubApi include HTTParty def initialize(config) @oauth_token = config[:token] @owner = config[:owner] @repository = config[:repository] self.class.base_uri "https://api.github.com" end def get_branches(options = {}) response = self.class.get("/repos/#{@owner}/#{@repository}/branches?access_token=#{@oauth_token}", options) response.map{|branch| branch["name"]} end end
Version data entries
4 entries across 4 versions & 1 rubygems