-
Notifications
You must be signed in to change notification settings - Fork 14
Class ScratchUserSession | Subcommands
Provides a read/write JSON interface with the user's "backpack", a feature of the scratch website.
Arguments: None
Fails: When the server returns a malformed JSON object.
Arguments:
- payload [required] - a JSON object to be uploaded.
Fails: When the server returns a malformed JSON object.
Provides an interface for scratch's "cloud variables" via HTTP polling (see CloudSession
for TCP socket interface).
Arguments:
- var [required] - The name of the variable to be set.
- value [required] - The value which the var should be set to.
- projId [required] - The project ID of the project with the var.
Fails: When the session can't acquire a token needed for server validation.
Arguments:
- var [required] - The name of the variable to be created.
- value [required] - The value which the var should be set to.
- projId [required] - The project ID of the project with the var.
Fails: When the session can't acquire a token needed for server validation.
Arguments:
- var [required] - The name of the variable.
- projId [required] - The project ID of the project with the var.
Fails: When the variable name can't be found
Arguments:
- projId [required] - The project ID of the project to read the variables from.
Fails: When the server returns a malformed JSON object.
Allows reading of messages and message counts.
Arguments:
- user [optional, defaults to current user] - The user.
Fails: When the server returns a malformed JSON object.
Arguments: None
Fails: Should not fail.
Functionality for project related API requests.
Arguments:
- projid [required] - The project ID which to comment on.
- comment [required] - The content of the comment.
Fails: Should not fail.
Arguments:
- projectId [required] - The project ID which to get.
Fails: Fails if project does not exist.
Arguments:
- projid [required] - The project ID which to get.
Fails: Fails if project does not exist.
Arguments:
- projectId [required] - The project ID which to set.
- payload [required] - The JSON content of the new project.
Fails: Should not fail.
Functionality for studio related API requests.
Arguments:
- studioid [required] - The studio ID which to comment on.
- comment [required] - The content of the comment.
Fails: Should not fail.
Arguments:
- studioid [required] - The studio ID which to get.
Fails: Fails if studio does not exist.
APIs for userpage customization, for the logged in user. Functionality for studio related API requests.
Arguments:
- payload [required] - Your new bio.
Fails: Should Not Fail
Arguments:
- payload [required] - Your new status.
Fails: Should Not Fail
Note: Toggling only is available because of the absence of an API to detect if comments are turned on or not.
Arguments: None
Fails: Should Not Fail