0.1.2 • Published 3 years ago
@fastybird/vuex-orm-wamp v0.1.2
FastyBird Vuex ORM WAMPv1 websocket client plugin
What is FastyBird Vuex ORM WAMPv1 websocket client plugin?
This plugin add smooth integration between WAMPv1 requests and Vuex ORM data persistence through the awesome WAMP client library.
Installation
The best way to install @fastybird/vuex-orm-wamp is using Yarn:
yarn add @fastybird/vuex-orm-wamp
or if you prefer npm:
npm install @fastybird/vuex-orm-wamp
Setup in your application
Register Vue plugin:
import VuexORM from '@vuex-orm/core'
import VuexORMWamp from '@fastybird/vuex-orm-wamp'
import { WampClient } from '@fastybird/vue-wamp-v1'
VuexORM.use(VuexORMWamp, {
wamp: WampClient('ws://your.server.com', null)
})
Options:
wamp
- optional option which have to provide WAMP client instance
Usage
Available methods:
User.wamp().open()
User.wamp().close()
User.publish(data, config)
User.call(data, config)
Typescript setup
Add the types to your "types"
array in tsconfig.json.
{
"compilerOptions": {
"types": [
"@fastybird/vuex-orm-wamp"
]
}
}
Homepage https://www.fastybird.com and repository https://github.com/FastyBird/vue-wamp-v1.