open-index/open-npm huggingface dataset:
npm package: @levlexx/api
Description: Universal API SDK for creating a dynamic url.
Author: Alex Levchenia
Latest version: 1.0.1
Deprecated: Wrong logic

# api-sdk
Universal API SDK for creating a dynamic url.
Vuejs support added via plugin.

!!! Used axios as default client. Not supports another libraries yet!.
### Yarn
```sh
$ yarn add @levlexx/api
```

### NPM
```sh
$ npm install @levlexx/api --save
```

# Usage

## Step 1: Preparing the plugin
In order to use this plugin, you first need to pass it to `Vue.use`. Your main.js is good place:

**main.js:**
```js
import Vue from 'vue'
import api from '@levlexx/api/src/vue'
import axios from 'axios'

....
some axios setup
....


Vue.use(api, {client: axios});
```

## Step 2: Usage
You can change behavior by change regexp in options. By default:

**awesome-component.vue**
```js
this.$api.getSomeTest$url(12); ---> GET some/test/12/url
this.$api.getSomeTest(12); ---> GET some/test/12
this.$api.postSomeUrl(); ---> POST some/url
this.$api.postSomeUrl({test: true}); ---> POST some/url with params test=true
```
Will call with method GET and url