Etherpad

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


    Client module for the Etherpad HTTP API.

    The Etherpad API currently supported is the 1.2.13 (Etherpad version:
    1.6.0)

    This module aims to replace Etherpad::API

ATTRIBUTES

    Etherpad implements the following attributes.

 url

      my $url = $ec->url;
      $ec     = $ec->url('http://pad.example.org');

    MANDATORY. The Etherpad URL, no default.

 apikey

      my $apikey = $ec->apikey;
      $ec        = $ec->apikey('secret_etherpad_API_key');

    MANDATORY. Secret API key, located in the APIKEY.txt file of your
    Etherpad installation directory, no default.

 ua

      my $ua = $ec->ua;
      $ec    = $ec->ua(Mojo::UserAgent->new);

    OPTIONAL. User agent, default to a Mojo::UserAgent. Please, don't use
    anything other than a Mojo::Useragent.

 user

      my $user = $ec->user;
      $ec      = $ec->user('bender');

    OPTIONAL. HTTP user, use it if your Etherpad is protected by a HTTP
    authentication, no default.

 password

      my $password = $ec->password;
      $ec          = $ec->password('beer');

    OPTIONAL. HTTP password, use it if your Etherpad is protected by a HTTP
    authentication, no default.

 proxy

      my $proxy = $ec->proxy;
      $ec       = $ec->proxy({
        http  => 'http://proxy.example.org',
        https => 'http://proxy.example.org'
      });

    OPTIONAL. Proxy settings. If set to { detect => 1 }, Etherpad will
    check environment variables HTTP_PROXY, http_proxy, HTTPS_PROXY,
    https_proxy, NO_PROXY and no_proxy for proxy information. No default.

METHODS

    Etherpad inherits all methods from Mojo::Base and implements the
    following new ones.

 Groups

    Pads can belong to a group. The padID of grouppads is starting with a
    groupID like g.asdfasdfasdfasdf$test

    See https://etherpad.org/doc/v1.6.0/#index_groups

  create_group

     Usage     : $ec->create_group();
     Purpose   : Creates a new group
     Returns   : The new group ID
     Argument  : None
     See       : https://etherpad.org/doc/v1.6.0/#index_creategroup

  create_group_if_not_exists_for

     Usage     : $ec->create_group_if_not_exists_for('groupMapper');
     Purpose   : This functions helps you to map your application group ids to epl group ids
     Returns   : The epl group id
     Argument  : Your application group id
     See       : https://etherpad.org/doc/v1.6.0/#index_creategroupifnotexistsfor_groupmapper

  delete_group

     Usage     : $ec->delete_group('groupId');
     Purpose   : Deletes a group
     Returns   : 1 if it succeeds
     Argument  : The id of the group you want to delete
     See       : https://etherpad.org/doc/v1.6.0/#index_deletegroup_groupid

  list_pads

     Usage     : $ec->list_pads('groupId');
     Purpose   : Returns all pads of this group
     Returns   : An array or an array reference (depending on the context) which contains the pad ids
     Argument  : The id of the group from which you want the pads
     See       : https://etherpad.org/doc/v1.6.0/#index_listpads_groupid

  create_group_pad

     Usage     : $ec->create_group_pad('groupID', 'padName' [, 'text'])
     Purpose   : Creates a new pad in this group
     Returns   : 1 if it succeeds
     Argument  : The group id, the pad name, optionally takes the pad's initial text
     See       : https://etherpad.org/doc/v1.6.0/#index_creategrouppad_groupid_padname_text

  list_all_groups

     Usage     : $ec->list_all_groups()
     Purpose   : Lists all existing groups
     Returns   : An array or an array reference (depending on the context) which contains the groups ids
     Argument  : None



( run in 0.687 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )