Class: Fastlane::Helper::BitriseRequestHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/bitrise_automation/helper/bitrise_automation_helper.rb

Constant Summary collapse

MAX_RETRY_ATTEMPTS =
2

Class Method Summary collapse

Class Method Details

.get(params, path) ⇒ Object



10
11
12
13
# File 'lib/fastlane/plugin/bitrise_automation/helper/bitrise_automation_helper.rb', line 10

def get(params, path)
  request = Net::HTTP::Get.new("/v0.1/apps/#{params[:app_slug]}/#{path}", bitrise_headers(params[:access_token]))
  bitrise_client.request(request)
end

.post(params, path, body) ⇒ Object



15
16
17
18
19
# File 'lib/fastlane/plugin/bitrise_automation/helper/bitrise_automation_helper.rb', line 15

def post(params, path, body)
  request = Net::HTTP::Post.new("/v0.1/apps/#{params[:app_slug]}/#{path}", bitrise_headers(params[:access_token]))
  request.body = body
  request_with_retries(request)
end