https://github.com/omgimalexis/vue-medusa
A small wrapper for integrating medusa to Vuejs
https://github.com/omgimalexis/vue-medusa
api medusa sickrage tvshows vue vue-plugin
Last synced: 2 months ago
JSON representation
A small wrapper for integrating medusa to Vuejs
- Host: GitHub
- URL: https://github.com/omgimalexis/vue-medusa
- Owner: OmgImAlexis
- License: mit
- Created: 2018-02-08T02:33:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-26T03:29:36.000Z (about 7 years ago)
- Last Synced: 2025-03-11T16:39:52.809Z (2 months ago)
- Topics: api, medusa, sickrage, tvshows, vue, vue-plugin
- Language: JavaScript
- Homepage:
- Size: 25.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vue-medusa
A small wrapper for integrating [Medusa](https://github.com/omgimalexis/medusa-lib) to Vuejs## How to install:
### CommonJS:
```console
$ yarn add medusa-lib vue-medusa
```And in your entry file:
```js
import Vue from 'vue';
import Medusa from 'medusa-lib';
import VueMedusa from 'vue-medusa';Vue.use(VueMedusa, new Medusa({
url: 'http://localhost:8081/'
}));
```### Script:
Just add 3 scripts in order: `vue`, `medusa` and `vue-medusa` to your `document`.## Usage:
This wrapper will bind `medusa` to `Vue` or `this` if you're using single file component.You can `medusa` like this:
```js
Vue.medusa.auth({
username: 'OmgImAlexis',
password: 'secret!123'
}).then(res => {
console.log(res.body);
});this.medusa.auth({
username: 'OmgImAlexis',
password: 'secret!123'
}).then(res => {
console.log(res.body);
});```