Skip to content

Desocrit/Scripting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Collaborowse

Simple 'get' server. Responses are in either json or html

To use, simply 'get' with any of the following options:

Login Commands

The following commands handle user logins and will work with / without being logged in

CommandDescription
login Logs in. Logs out if already logged in, then tries to login. Redirects to redirect_url if provided, otherwise the current project's main page.
logout Logs out if logged in
smart_login Depricated Logs out if logged in. Logs in if logged out.
get_user Returns json with {"username": "usn", "status": "success"} if logged in or {"status": "Not logged in"}, if not.

Project Tasks

The following commands deal with project-level tasks, and all require project_name to be set, with the exception of list_projects

CommandDescription
list_projects Lists projects the current user has admin or member access to. Does not require project_name
delete_all Deletes all current pages in the project. Requires admin
list_users Lists all users in the current project level, split by access level.
create_project Creates a new project with the given name. Creator will be added to users list and given admin rights.
delete_projects Deletes a project. Requires admin rights.
make_public Makes a project public, i.e. anyone can access it.
make_private Makes a project public, i.e. permission is needed to access it.

User Access Commands

These commands grant / revoke privilages to users

They all require a project_name and a user_name

CommandDescription
add_access Grants 'view' access to the project.
remove_access Revokes 'view' access to the project.
add_admin Grants admin privelidges to the project.
remove_access Revokes admin privelidges to the project.

Page Commands

These deal with pages. They each require a project_name and url

CommandDescription
add_or_replace_page Adds a page to the project. Alternatively, if the page already exists, it will be replaced with the latest live version, and all comments will be deleted.
update_page Updates the page to the latest live version. Comments will be kept 'as-is'. This may cause some errrors. If the page is not in the project, it will be added.
page_details Gives full details of the page, including url, and creator, as well as details of every version uploaded, all annotations for each version and versions of each annotation. Currently only works for JSON.
roll_back_page Deletes the latest version of a page. Admin privelidges required. If only one version is stored, this will throw an error
view_page Views the saved html for a page.
delete_page Removes a page from the project
annotate Creates an annotation on the given page. Message, x position, and y position are all saved, for access via Page Details.
  Also requires:
  <ul>
    <li><code>Message</code></li>
    <li><code>x_pos</code></li>
    <li><code>y_pos</code></li>
    <li><code>element_id</code></li>
    <li><code>uniqid</code></li>
</td>
get_annotations Gets a list of annotations only.
temp_view Gets the url requested for temporary viewing only.
grab_temp_page Gets the most recently 'temp view'ed page, and adds to the project.

API Commands

These are only required for the 'admin' pages:

  • project_name=x - View the api for a given project.
  • project_name=x&command=Switch Project - Swtiches to the given project. Only needed for the API.

About

Scripting Stuff

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •