PHCDevworks RubyApiPackCloudways
Overview
RubyApiPackCloudways is a Ruby gem that provides an easy interface for interacting with the Cloudways API. It includes functionality for fetching information about Cloudways providers, server sizes, apps, and packages, as well as managing server connections and authentication tokens.
Key Features:
- Provider List: Fetch the list of available Cloudways providers.
- Server Sizes: Retrieve details about available server sizes supported by Cloudways.
- App List: Access a list of Cloudways applications.
- Package List: Fetch the available packages on Cloudways.
- Token-Based Authentication: Secure access to Cloudways API using OAuth tokens.
Usage
1. Set up Cloudways API credentials
You will need to configure your Cloudways API credentials in your Ruby environment. Here’s how you can do it:
- Open your configuration block in the initializer or main application file:
RubyApiPackCloudways.configure do |config|
config.api_url = 'https://api.cloudways.com/api/v1'
config.api_path_token = '/oauth/access_token'
config.api_email = '<your_cloudways_email>'
config.api_key = '<your_cloudways_api_key>'
end
- Save and restart your application.
Installation
Add this line to your application's Gemfile:
gem "ruby_api_pack_cloudways"
And then execute:
$ bundle
Or install it yourself as:
$ gem install ruby_api_pack_cloudways
Documentation Wiki
Contributing
License
The gem is available as open source under the terms of the MIT License.