Module: GithubApi::Client::Milestones
- Included in:
- GithubApi::Client
- Defined in:
- lib/tractive/github_api/client/milestones.rb
Overview
Methods for the Issues API
Instance Method Summary collapse
- #create_milestone(repo, params) ⇒ Object
- #list_milestones(repo, params) ⇒ Object (also: #milestones)
Instance Method Details
#create_milestone(repo, params) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/tractive/github_api/client/milestones.rb', line 20 def create_milestone(repo, params) JSON.parse( Http::Client::Request.post( "https://api.github.com/repos/#{repo}/milestones", params.to_json, { "Authorization" => "token #{@token}", "Content-Type" => "application/json", "Accept" => "application/vnd.github.golden-comet-preview+json" } ) ) end |
#list_milestones(repo, params) ⇒ Object Also known as: milestones
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/tractive/github_api/client/milestones.rb', line 7 def list_milestones(repo, params) JSON.parse( Http::Client::Request.get( "https://api.github.com/repos/#{repo}/milestones?per_page=100", { "Authorization" => "token #{@token}", params: params } ) ) end |