Skip to content

Class ScratchUserSession

Dylan Beswick edited this page Apr 11, 2016 · 2 revisions

Most features of the scratch website require authentication. The scratchapi module provides a user session class, ScratchUserSession.


Usage:

scratch = scratchapi.ScratchUserSession(:username, :password, remember_password)

:username - Your scratch username. Must be a string.

:password - Your scratch password. Must be a string.

remember_password - Whether the class should store your password. Once you are logged in, scratch allows you to manage your account without sending your password in every request, by using a temporary session ID that grants permission to your account. Must be boolean. Defaults to False.


Example:

import scratchapi
scratch = scratchapi.ScratchUserSession('Username', 'MyPassword')

All subcommands of ScratchUserSession can be viewed at Class ScratchUserSession | Subcommands

Clone this wiki locally