New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dots-connect-it/api

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

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.

  • 1.0.4
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-90.91%
Maintainers
2
Weekly downloads
 
Created
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

Package last updated on 01 Mar 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