Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@availity/api-angular

Package Overview
Dependencies
Maintainers
13
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@availity/api-angular

Wraps @availity/api-core with Angular $http

  • 4.4.5
  • latest
  • npm
  • Socket score

Version published
Maintainers
13
Created
Source

api-angular

A package wrapping @av/api-core with Angular $http.

Version

Install

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

Usage

import availityApi from '@availity/api-angular';
angular.module('app', [availityApi]);

Inject one of the predefined API classes in a controller or service:

app.service('myCustomService', avUsersApi => {
    return avUsersApi.me();
});

API Definitions

The services below can be injected into other services or controllers

  • avApiOptions
  • AvMicroserviceApi
  • avLogMessagesApi
  • AvProxyApi
  • avWebQLApi
  • avPdfApi
  • avNavigationApi
  • avNotificationApi
  • avOrganizationsApi
  • avPermissionsApi
  • avProvidersApi
  • avRegionsApi
  • avSpacesApi
  • avUsersApi
  • avUserPermissionsApi
  • avFilesApi
  • avFilesDeliverApi
  • avSettingsApi
  • avCodesApi

Details about each api can be found here

app.service(
    'myCustomService',
    (
        avPdfApi,
        avNavigationApi,
        avNotificationApi,
        avOrganizationsApi,
        avPermissionsApi,
        avProvidersApi,
        AvProxyApi,
        avRegionsApi,
        avSpacesApi,
        avUsersApi,
        avUserPermissionsApi
    ) => {
        // code
    }
);

Options

Configure the default options:

config(avApiOptionsProvider => {
    avApiOptionsProvider.setOptions({
        version: 'v2',
    });
});

Create API Definitions

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

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

Create Proxy API Definitions

Create proxy 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.

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

FAQs

Package last updated on 03 Dec 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