breeze-odata4-ma
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

breeze-odata4 NPM version Build Status

A TypeScript library to enable querying an OData 4 API using breezejs

Prerequisites

  • Breeze client npm package

Installation

  1. Install breeze-client

    $ npm install --save breeze-client
  2. Install breeze-odata4

    $ npm install --save breeze-odata4

Usage

import { config, EntityManager } from "breeze-client";
import { OData4DataService, OData4UriBuilder } from 'breeze-odata4';

OData4UriBuilder.register();
OData4DataService.register();
config.initializeAdapterInstance('uriBuilder', 'OData4', true);
config.initializeAdapterInstance('dataService', 'OData4', true);

const manager = new EntityManager('/api/odata4');
manager.fetchMetadata();

Now we can utilize breeze to query against an OData 4 API.

Samples

Samples can be found in the samples repo: https://github.com/tschettler/breeze-odata4-samples

Typings

This library is currently referencing its own version of breeze-client typings, since the current typings available on DefinitelyTyped and within the breeze-client npm package are incomplete/outdated.

License

MIT © Travis Schettler

Package Sidebar

Install

npm i breeze-odata4-ma

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

245 kB

Total Files

76

Last publish

Collaborators

  • muradaliev