store.magic. actions

Methods

(static) api_get(endpoint, data) → {Promise.<Object>}

do get request to url: API_URL + endpoint with request query of data

Parameters:
NameTypeDescription
endpointString

api endpoint

dataObject

query params

Returns:

json

Type: 
Promise.<Object>

(static) done_prefix(task) → {String}

get the done prefix for a given task

Parameters:
NameTypeDescription
taskObject

the task object

See
  • done_prefixes
  • types
Returns:

text - the done prefix for the task

Type: 
String

(static) path(path) → {String}

get the smart text associated with a given url

Parameters:
NameTypeDescription
pathString
Returns:

text - the smart text associated with the url

Type: 
String

(static) prefix(task) → {String}

get the prefix for a given task

Parameters:
NameTypeDescription
taskObject

the task object

See
  • prefixes
  • types
Returns:

text - the prefix for the task

Type: 
String

(static) rated_api_get()

do api_get but abide by rate limit (only eval once every 15 seconds)

(static) type(text)

get the smart type associated with a given description

Parameters:
NameTypeDescription
textString

(static) type_full(short_type) → {String}

get the full type name from the short type

Parameters:
NameTypeDescription
short_typeString

the short type of the task

See
  • types
Returns:

text - the full type name

Type: 
String