api_user_preferences: Deal with user preferences

api_user_preferencesR Documentation

Deal with user preferences

Description

Get, set, or erase a preference for the currently authenticated user (i.e. you) in a project.

Usage

api_get_my_preference(project_id, key)

api_set_my_preference(project_id, key, value)

api_del_my_preference(project_id, key)

Arguments

project_id

internal, numeric id of the project.

key

string, the name (key) of the preference. Possible preferences are:

  • cwd: the "current working directory", i.e. last directory on the server from which you imported data in the target project.

  • mru: the list of taxonomic categories "most recently used" in this project. This list is used in the autocompletion of categories in the classification page.

value

the value of the preference, when setting it.

Details

Note that currently setting or deleting preferences does not work

See Also

Other users: api_get_me(), api_get_user(), api_search_users()

Examples

# get preference
api_get_my_preference(185, "cwd")

## Not run: 
# set preference and verify it
api_get_my_preference(185, key="foo")
api_set_my_preference(185, key="foo", value="test")
api_get_my_preference(185, key="foo")

# delete preference
api_del_my_preference(185, key="foo")
api_get_my_preference(185, key="foo")

## End(Not run)

jiho/ecotaxar documentation built on Jan. 16, 2024, 12:26 a.m.