Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/voxxit/cpanel
cPanel connection wrapper for Ruby
https://github.com/voxxit/cpanel
Last synced: 4 days ago
JSON representation
cPanel connection wrapper for Ruby
- Host: GitHub
- URL: https://github.com/voxxit/cpanel
- Owner: voxxit
- License: mit
- Created: 2010-02-02T20:00:44.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2024-08-18T05:50:35.000Z (4 months ago)
- Last Synced: 2024-12-17T13:23:20.212Z (6 days ago)
- Language: Ruby
- Homepage: http://github.com/voxxit/cpanel
- Size: 17.6 KB
- Stars: 13
- Watchers: 1
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.rdoc
- License: LICENSE
Awesome Lists containing this project
README
= cpanel
{}[https://gitter.im/voxxit/cpanel?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge]
cPanel connection wrapper for Ruby.
== Example Usage
You will first need to build the basic class for the remote server calls you wish to implement. I wrote the plugin to be extremely barebones,
so you could implement what you deemed necessary to stay lean:require 'cpanel'
class CpanelServer
attr_reader :server
def initialize(url, key, user = 'root')
@server = Cpanel::Server.new({
:url => url,
:key => key,
:user => user
})
enddef change_password(user, new_password)
server.request("passwd", {
:user => user,
:pass => new_password
})
end
endserver = CpanelServer.new("https://server.com:2086", "API_KEY_HERE")
server.change_password("myuser12", "s3cur3p@55")All API calls can be performed using JSON or XML. You can set this in the initialization, if you'd like:
def initialize(url, key, connection_type = "json")
@server = Cpanel::Server.new({
:url => url,
:key => key,
:api => connection_type
})
endFor a list of current API commands, go here:
http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/XmlApi
== Bug/feature requests
Please insert all bug and feature requests into the GitHub Issues tracker:
http://github.com/voxxit/cpanel/issues
== Note on Patches/Pull Requests
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a future version unintentionally.
* Commit, do not mess with rakefile, version, or history. If you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.== Copyright
Copyright (c) 2010 Josh Delsman. See LICENSE for details.