Class: RailsPlan::Cli::FetchBranch

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_plan/cli/fetch_branch.rb

Constant Summary collapse

API_URL =
'https://railsplan.com/api/v1'

Instance Method Summary collapse

Instance Method Details

#call(uid) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/rails_plan/cli/fetch_branch.rb', line 8

def call(uid)
  response = RestClient.get(API_URL + "/branches/#{uid}") { |res| res }

  return if response.code != 200

  JSON.parse(response.body)
end