Webceo
Integrate your ruby application with this webceo
gem to perform the api action using your webceo account. Take a look at the Webceo API Reference.
Getting Started
Add this line to your application's Gemfile:
gem 'webceo'
And then execute:
$ bundle
Or install it yourself as:
$ gem install webceo
and run the following generator to install the initializer
$ rails generate webceo:install
Usage
# Configure the gem
Webceo.configure do |config|
# set the api_key option as per your convenience, for example using environment variables
config.api_key = ENV['WEBCEO_API_KEY']
end
# initialize an instance of the Client
client = Webceo::Api::Client.new
# get the list of all methods
client.list_methods # => ['get_projects', 'get_project', ...]
# get list of all the projects, see api reference
client.get_projects({ :id => 'my_request_id' })
# => [{:id=>'my_request_id', :data=>[{:project=>"8ady5y7e36", :domain=>"example.com", :user=>["user1@yoursite.com", "user2@yoursite.com", ... ]}, {:project=>"asg4563wef", :domain=>"example.com", :user=>["user3@yoursite.com", "user4@yoursite.com", ... ]}], :method=>"get_projects"}]
# get a single project
client.get_project({ :project => '8ady5y7e36' })
# => [{:id=>nil, :data=>{:project=>"8ady5y7e36", :domain=>"example.com", :user=>["user1@yoursite.com", "user2@yoursite.com", ... ]}, :method=>"get_projects"}]
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/agnel/webceo. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Check out the Webceo Ruby Gem Google Group
License
Webceo is released under the MIT License.