Skip to content

Commit

Permalink
Add new API endoings from 1.1.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
jhollinger committed Jul 9, 2012
1 parent 6e478a8 commit 08103c8
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions etherpad-lite-client.php
Expand Up @@ -152,6 +152,13 @@ public function createAuthorIfNotExistsFor($authorMapper, $name){
));
}

// returns the ids of all pads this author as edited
public function listPadsOfAuthor($authorID){
return $this->get("listPadsOfAuthor", array(
"authorID" => $authorID
));
}

// SESSIONS
// Sessions can be created between a group and a author. This allows
// an author to access more than one group. The sessionID will be set as
Expand Down Expand Up @@ -251,6 +258,20 @@ public function getRevisionsCount($padID){
));
}

// returns the number of users currently editing this pad
public function padUsersCount($padID){
return $this->get("padUsersCount", array(
"padID" => $padID
));
}

// return the time the pad was last edited as a Unix timestamp
public function getLastEdited($padID){
return $this->get("getLastEdited", array(
"padID" => $padID
));
}

// deletes a pad
public function deletePad($padID){
return $this->post("deletePad", array(
Expand All @@ -265,6 +286,13 @@ public function getReadOnlyID($padID){
));
}

// returns the ids of all authors who've edited this pad
public function listAuthorsOfPad($padID){
return $this->get("listAuthorsOfPad", array(
"padID" => $padID
));
}

// sets a boolean for the public status of a pad
public function setPublicStatus($padID, $publicStatus){
if (is_bool($publicStatus)) {
Expand Down

0 comments on commit 08103c8

Please sign in to comment.