Socket
Socket
Sign inDemoInstall

@dots-connect-it/api

Package Overview
Dependencies
5
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @dots-connect-it/api

Dots API include standards methods which used by Dots company in their projects.


Version published
Weekly downloads
0
Maintainers
2
Install size
212 kB
Created
Weekly downloads
 

Readme

Source

Dots API

This package contain service which should be inherited by another services for use default methods in each dots project.

Usage

Create service

ng g s car-api

Create interface

export interface Car {
    id: number;
    name: string;
    color: string;
}

Extend API service

Extends ApiService and indicate right endpoint.

import { ApiService } from '@dancornilov/api';

export class CarApiService extends ApiService<Car> {
    protected endpoint = 'car';
}

Interfaces

export interface ApiIndexResult<T> {
  data: T[];
  pagination: Paginator;
}

export interface ApiSingleResult<T> {
  data: T;
}

Methods

MethodDescriptionValue
indexGet whole list of entitiesObservable<ApiIndexResult>
createCreate new entityObservable
updateUpdate already existent entityObservable
getGet entity by dataKey(id)Observable<ApiSingleResult>
patchUpdate some properties from existent entityObservable
listGet serialized list of entities (key/value)Observable

FAQs

Last updated on 01 Mar 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc