Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lefuturiste/vue-apitator
A simple way to query your REST or your GraphQL API in your Vue.js app
https://github.com/lefuturiste/vue-apitator
Last synced: 4 days ago
JSON representation
A simple way to query your REST or your GraphQL API in your Vue.js app
- Host: GitHub
- URL: https://github.com/lefuturiste/vue-apitator
- Owner: lefuturiste
- Created: 2018-11-14T16:26:38.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T16:45:25.000Z (almost 2 years ago)
- Last Synced: 2023-03-03T16:57:34.845Z (over 1 year ago)
- Language: TypeScript
- Size: 531 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vue-Apitator
![Unit test workflow](https://github.com/lefuturiste/vue-apitator/actions/workflows/tests.yml/badge.svg)
A simple way to query your REST or your GraphQL API in your Vue.js app
## Installation
`npm install --save vue-apitator`
or
`yarn add vue-apitator`
## Usage
in your main.js:
```js
import Apitator from 'apitator'
Vue.use(Apitator, {
baseUrl: 'https://example.com/api'
})
```in your vue component:
```js
this.$apitator.get('/users').then(response => {
console.log(response.data)
})
```## Test
Test with jest, execute with:
`npm run test`
or, to watch:
`npm run test-watch`
## Contribution
You can contribute to apitator by forking this repository and pull request your changes. This lib is written in typescript, you can use `npm run dev` to start adding features!
If you have any problems with this library, feel free to create an issue!