autograder.api.users.upsert

Upsert one or more server users.

 1"""
 2Upsert one or more server users.
 3"""
 4
 5import typing
 6
 7import autograder.api.common
 8import autograder.api.config
 9import autograder.model.config
10
11API_ENDPOINT: str = 'users/upsert'
12API_WRITE: bool = True
13API_PARAMS: typing.List[autograder.api.config.APIParam] = [
14    autograder.api.config.PARAM_SERVER,
15    autograder.api.config.PARAM_USER_EMAIL,
16    autograder.api.config.PARAM_USER_PASS,
17
18    autograder.api.config.PARAM_DRY_RUN,
19    autograder.api.config.PARAM_SKIP_INSERTS,
20    autograder.api.config.PARAM_SKIP_UPDATES,
21
22    autograder.api.config.PARAM_SEND_EMAILS,
23
24    autograder.api.config.PARAM_RAW_SERVER_USERS,
25
26    autograder.api.config.PARAM_NEW_USER_EMAIL,
27    autograder.api.config.PARAM_NEW_USER_NAME,
28    autograder.api.config.PARAM_NEW_USER_PASS,
29    autograder.api.config.PARAM_NEW_USER_SERVER_ROLE,
30    autograder.api.config.PARAM_NEW_USER_COURSE,
31    autograder.api.config.PARAM_NEW_USER_COURSE_ROLE,
32    autograder.api.config.PARAM_NEW_USER_LMS_ID,
33]
34
35def send(config: autograder.model.config.Config, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
36    """ Send a request to the autograder. """
37
38    return autograder.api.common.make_api_request(API_ENDPOINT, config, API_PARAMS, write = API_WRITE, **kwargs)
API_ENDPOINT: str = 'users/upsert'
API_WRITE: bool = True
def send(config: autograder.model.config.Config, **kwargs: Any) -> Dict[str, Any]:
36def send(config: autograder.model.config.Config, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
37    """ Send a request to the autograder. """
38
39    return autograder.api.common.make_api_request(API_ENDPOINT, config, API_PARAMS, write = API_WRITE, **kwargs)

Send a request to the autograder.