Sha256: 9ffd92d2257a67f89d56ad08078f9b586b15454dda820af6e554de032957540d
Contents?: true
Size: 1000 Bytes
Versions: 1
Compression:
Stored size: 1000 Bytes
Contents
module RubyApiPackCloudways module Main class CwConnect # Connection - Attributes attr_accessor :cw_api_url_base, :cw_api_path # Connection - Init def initialize(cw_api_url_base, cw_api_path, cw_api_token) @cw_api_url_base = cw_api_url_base @cw_api_path = cw_api_path @cw_api_token = cw_api_token end # Connection - API Connection Call def cloudways_api_connection cw_api_connetion_response = Faraday.new(url: @cw_api_url_base) do |cw_api_connection| cw_api_connection.request :oauth2, @cw_api_token, token_type: :bearer cw_api_connection.response :logger cw_api_connection.adapter Faraday.default_adapter end return cw_api_connetion_response.get @cw_api_url_base + @cw_api_path end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby_api_pack_cloudways-0.1.0.beta.3 | lib/ruby_api_pack_cloudways/main/cw_connect.rb |