Vuex actions, used via this.$store.dis
, e.g.: this.$store.dis('jv/get', <args>)
args
can be either a string or an object representing the item(s) required, or it can be an array of string/object and an optional axios config object.
Methods
# async static delete(context, args) → {object}
Delete an item from the API
Parameters:
Name | Type | Description |
---|---|---|
context | object | Vuex context object |
args | string | object | array | See |
| string | A URL path to an item - e.g. |
| object | A restructured object - e.g. |
| array | A 2-element array, consisting of a string/object and an optional axios config object |
Restructured representation of the deleted item
# async static get(context, args) → {object}
Get items from the API
Parameters:
Name | Type | Description |
---|---|---|
context | object | Vuex context object |
args | string | object | array | See |
| string | A URL path to an item - e.g. |
| object | A restructured object - e.g. |
| array | A 2-element array, consisting of a string/object and an optional axios config object |
Restructured representation of the requested item(s)
# async static getRelated(context, args) → {object}
Get related items from the API
Parameters:
Name | Type | Description |
---|---|---|
context | object | Vuex context object |
args | string | object | array | See |
| string | A URL path to an item - e.g. |
| object | A restructured object - e.g. |
| array | A 2-element array, consisting of a string/object and an optional axios config object |
Restructured representation of the requested item(s)
# async static (context, args) → {object}
an item in the API
Parameters:
Name | Type | Description |
---|---|---|
context | object | Vuex context object |
args | object | array | See |
| object | A restructured object - e.g. |
| array | A 2-element array, consisting of a string/object and an optional axios config object |
Restructured representation of the ed item
# async static post(context, args) → {object}
Post an item to the API
Parameters:
Name | Type | Description |
---|---|---|
context | object | Vuex context object |
args | object | array | See |
| object | A restructured object - e.g. |
| array | A 2-element array, consisting of a string/object and an optional axios config object |
Restructured representation of the posted item
# async static search(context, args) → {object}
Get items from the API without updating the Vuex store
Parameters:
Name | Type | Description |
---|---|---|
context | object | Vuex context object |
args | string | object | array | See |
| string | A URL path to an item - e.g. |
| object | A restructured object - e.g. |
| array | A 2-element array, consisting of a string/object and an optional axios config object |
Restructured representation of the posted item