Socket
Socket
Sign inDemoInstall

@availity/api-axios

Package Overview
Dependencies
Maintainers
14
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@availity/api-axios

Wraps @availity/api-core with Axios


Version published
Weekly downloads
868
increased by20.22%
Maintainers
14
Weekly downloads
 
Created
Source

api-axios

A package wrapping @av/api-core with axios and native ES6 Promise.

Version

Install

NPM

$ npm install @availity/api-axios @availity/api-core

Yarn

$ yarn add @availity/api-axios @availity/api-core

Polyfill Promise if needed:

NPM

$ npm install es6-promise

Yarn

$ yarn add es6-promise

Usage

import { userApi } from '@availity/api-axios'

function async getUser() {
    const user = await userApi.me();
}

API Definitions

  • AvMicroserviceApi
  • AvProxyApi
  • avCodesApi
  • avDisclaimersApi
  • avFilesApi
  • avFilesDeliveryApi
  • avLogMessagesApi
  • avNavigationApi
  • avNotificationApi
  • avOrganizationsApi
  • avPdfApi
  • avPermissionsApi
  • avProvidersApi
  • avRegionsApi
  • avSettingsApi
  • avSlotMachineApi
  • avSpacesApi
  • avUserApi
  • avUserPermissionsApi
  • avWebQLApi

Details about each api can be found here

// complete example
import AvApi, {
    AvMicroserviceApi,
    AvProxyApi,
    avCodesApi,
    avDisclaimersApi
    avFilesApi,
    avFilesDeliveryApi,
    avLogMessagesApi,
    avNavigationApi,
    avNotificationApi,
    avOrganizationsApi,
    avPdfApi,
    avPermissionsApi,
    avProvidersApi,
    avRegionsApi,
    avSettingsApi,
    avSlotMachineApi,
    avSpacesApi,
    avUserApi,
    avUserPermissionsApi,
    avWebQLApi,
} from '@availity/api-axios';

Create API Definitions

Create new API definitions by extending AvApi. Extending AvApi provides services the behaviors described in @api-core/README#features

import AvApi from '@availity/api-axios';

class AvExampleResource extends AvApi {
    constructor() {
        super({
            name: 'exampleApi',
        });
    }
}

export default new AvExampleResource();

Create Proxy API Definitions

Create new API definitions by extending AvApiProxy. Extending AvApiProxy provides services the behaviors described in @api-core/README#features as well as building the url to match your tenant's proxy REST conventions.

import { AvApiProxy } from '@availity/api-axios';

class AvExampleResource extends AvApiProxy {
    constructor() {
        super({
            tenant: 'myhealthplan',
            name: 'patients',
        });
    }
}

export default new AvExampleResource();

FAQs

Package last updated on 22 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc