A small Vue plugin that integrates into your existing store, providing access to the Citizen Science API and allowing you to sync locally with your Vue site.
import c3s from 'vuex-c3s'
const swaggerURL = "https://swagger.petstore.io/swagger.json"
Vue.use(c3s.plugin, {store, swaggerURL})
***
user: state => state.c3s.user.currentUser
NB: Below, Store properties are camel case and submodules are title case
- C3S
- client
- host
- User
- user
- currentUser
- Project
- projects
- project
- media
- comments
- Activity
- activities
- activity
- media
- comments
- Task
- tasks
- task
- media
- comments
- Media
- media
- medium
- Comments
- comments
- comment
Each module has the following methods available:
- get
Plural
**(search:JSON) - Retrieve all of the model, with a query object - get
Singular
(id:String) - Retrieve a single model matching the ID - create
Singular
(model: JSON) - Create an instance of the model - update
Singular
(model:JSON, id:String) - Update an instance of the model - delete
Singular
(id:String) - Delete an instance of the model
e.g.:
this.$store.dispatch('c3s/tasks/getTask', 'abc4e6')