# vuex-c3s

> SDK for the Citizen Science Framework API, using Swagger and Vuex (requires JTOS >= 0.8.0 to be running on your server side)

Latest version **1.1.0** (published 2019-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install vuex-c3s
pnpm add vuex-c3s
yarn add vuex-c3s
bun add vuex-c3s
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-09-10 |
| First published | 2018-11-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 199.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Chris Gwilliams |
| Maintainers | encima |
| Keywords | vuex, vue, i18n, c3s, swagger, citizen-science |

## Links

- npm: https://www.npmjs.com/package/vuex-c3s
- Repository: https://github.com/citizensciencecenter/vuex-c3s
- Homepage: https://github.com/citizensciencecenter/vuex-c3s#readme
- Issues: https://github.com/citizensciencecenter/vuex-c3s/issues
- npm.io page: https://npm.io/package/vuex-c3s

## Dependencies (2)

- [rison-node](https://npm.io/package/rison-node.md) ^2.1.0
- [babel-plugin-transform-runtime](https://npm.io/package/babel-plugin-transform-runtime.md) ^6.23.0

## Alternatives

- [messageformat](https://npm.io/package/messageformat.md) — 329.7K weekly downloads
- [@mintlify/scraping](https://npm.io/package/@mintlify/scraping.md) — 294.8K weekly downloads
- [@mintlify/previewing](https://npm.io/package/@mintlify/previewing.md) — 209.5K weekly downloads
- [@mintlify/prebuild](https://npm.io/package/@mintlify/prebuild.md) — 209.5K weekly downloads
- [@mintlify/link-rot](https://npm.io/package/@mintlify/link-rot.md) — 206.3K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2019-09-10
- 2.3.1-beta (beta) — 2019-12-09
- 2.3.0-beta — 2019-12-09
- 2.2.9-beta — 2019-12-09
- 2.2.8-beta — 2019-12-04
- 2.2.6-beta — 2019-12-02
- 2.2.5-beta — 2019-12-01
- 2.2.4-beta — 2019-11-28
- 2.2.3-beta — 2019-11-28
- 2.2.2-beta — 2019-11-28
- 2.2.1-beta — 2019-11-27
- 2.2.0-beta — 2019-11-27
- 2.1.9-beta — 2019-11-27
- 2.1.8-beta — 2019-11-27
- 2.1.7-beta — 2019-11-26
- … 39 more at https://npm.io/package/vuex-c3s/versions

## README

## Vuex-C3S

### What?

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.

## How

```javascript
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
```

## Store Structure

**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
        
 ## Store Methods
 
 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.:
 
 ```javascript
this.$store.dispatch('c3s/tasks/getTask', 'abc4e6')
```

---
_Source: https://npm.io/package/vuex-c3s · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
