Sha256: d2a1703b94c7b05f1ada51e9079d5b6d62604d0ff6ed3cc1790712e7239f6e91

Contents?: true

Size: 645 Bytes

Versions: 2

Compression:

Stored size: 645 Bytes

Contents

# frozen_string_literal: true

module RubyApiPackCloudways
  module Api
    class CwLists
      def self.fetch_resource(endpoint)
        Connection::CwConnect.new(
          RubyApiPackCloudways.configuration.api_url,
          endpoint
        ).cloudways_api_connection
      end

      def self.provider_list
        fetch_resource('/providers')['providers']
      end

      def self.server_size_list
        fetch_resource('/server_sizes')['sizes']
      end

      def self.app_list
        fetch_resource('/apps')['apps']
      end

      def self.package_list
        fetch_resource('/packages')['packages']
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby_api_pack_cloudways-0.2.0 lib/ruby_api_pack_cloudways/api/cw_lists.rb
ruby_api_pack_cloudways-0.1.0 lib/ruby_api_pack_cloudways/api/cw_lists.rb