Module EtherpadLite
In: lib/etherpad-lite/client.rb
lib/etherpad-lite/models/padded.rb
lib/etherpad-lite/models/diff.rb
lib/etherpad-lite/models/author.rb
lib/etherpad-lite/models/pad.rb
lib/etherpad-lite/models/group.rb
lib/etherpad-lite/models/session.rb
lib/etherpad-lite/models/chat_message.rb
lib/etherpad-lite/models/instance.rb
lib/etherpad-lite/version.rb

A client library for Etherpad Lite‘s JSON API.

A thin wrapper around the HTTP API. See the API documentation at etherpad.org/doc/v1.2.0/#index_api_methods.

 client = EtherpadLite.client('http://localhost:9001', 'api key', '1.1')
 client.getText(:padID => 'foo')
 => {:text => "Pad text"}
 client.setText(:padID => 'padID', :text => 'new pad text')

A higher-level interface to the API:

 ether = EtherpadLite.connect('http://localhost:9001', 'api key', '1.1')
 pad = ether.pad('padID')
 puts pad.text
 => 'Pad text'
 pad.text = 'new pad text'

Methods

client   connect  

Classes and Modules

Module EtherpadLite::Padded
Class EtherpadLite::Author
Class EtherpadLite::ChatMessage
Class EtherpadLite::Client
Class EtherpadLite::Diff
Class EtherpadLite::Group
Class EtherpadLite::Instance
Class EtherpadLite::Pad
Class EtherpadLite::Session

Constants

Error = Class.new(StandardError)   An error returned by the server
VERSION = '0.3.0'   Library version
API_VERSION = '1.2.8'   API target version

Public Class methods

Returns a new EtherpadLite::Client.

 client = EtherpadLite.client('https://etherpad.yoursite.com', 'your api key', '1.1')

 client = EtherpadLite.client(9001, 'your api key', '1.1') # Alias to http://localhost:9001

Returns an EtherpadLite::Instance object.

 ether = EtherpadLite.client('https://etherpad.yoursite.com', 'your api key', '1.1')

 ether = EtherpadLite.client(9001, 'your api key', '1.1') # Alias to http://localhost:9001

[Validate]