Socket
Socket
Sign inDemoInstall

@availity/api-axios

Package Overview
Dependencies
Maintainers
8
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
8
Weekly downloads
 
Created
Source

api-axios

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

Install

npm install @availity/api-axios @availity/api-core @availity/localstorage-core --save

Polyfill Promise if needed:

npm install es6-promise --save

Usage

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

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

API Definitions

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

Details about each api can be found here

// complete example
import AvApi, {
    AvMicroserviceApi,
    AvProxyApi,
    avLogMessagesApi,
    avNavigationApi,
    avNotificationApi,
    avOrganizationsApi,
    avPermissionsApi,
    avProvidersApi,
    avRegionsApi,
    avPdfApi,
    avSpacesApi,
    avUserApi,
    avUserPermissionsApi,
    avFilesApi,
    avFilesDeliveryApi,
    avSettingsApi,
    avSlotMachineApi,
    avDisclaimersApi
} 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 04 Mar 2019

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