pad.pub0.org/tests/backend/specs/api/sessionsAndGroups.js

39 lines
921 B
JavaScript
Raw Normal View History

2014-11-26 19:28:49 +00:00
/* Endpoints Still to interact with..
padUsersCount(padID)
setPublicStatus(padID, publicStatus)
getPublicStatus(padID)
setPassword(padID, password)
isPasswordProtected(padID)
listAuthorsOfPad(padID)
getLastEdited(padID)
listSessionsOfGroup(groupID)
getSessionInfo(sessionID)
deleteSession(sessionID)
createSession(groupID, authorID, validUntil)
listPadsOfAuthor(authorID)
createAuthorIfNotExistsFor(authorMapper [, name])
createAuthor([name])
createGroupPad(groupID, padName [, text])
listPads(groupID)
deleteGroup(groupID)
createGroupIfNotExistsFor(groupMapper)
createGroup()
*/
var endPoint = function(point){
return '/api/'+apiVersion+'/'+point+'?apikey='+apiKey;
}
function makeid()
{
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for( var i=0; i < 5; i++ ){
text += possible.charAt(Math.floor(Math.random() * possible.length));
}
return text;
}