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

@ember-data/active-record

Package Overview
Dependencies
Maintainers
0
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ember-data/active-record

ActiveRecord Format Support for EmberData

  • 5.4.0-alpha.91
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
186
decreased by-43.64%
Maintainers
0
Weekly downloads
 
Created
Source

EmberData ActiveRecord EmberData ActiveRecord

Elegantly composable. Made for ActiveRecord

This package provides utilities for working with ActiveRecord APIs with EmberData.

Installation

Install using your javascript package manager of choice. For instance with pnpm

pnpm add @ember-data/active-record

Tagged Releases

  • NPM Canary Version
  • NPM Beta Version
  • NPM Stable Version
  • NPM LTS Version
  • NPM LTS 4.12 Version

Getting Started

If this package is how you are first learning about EmberData, we recommend starting with learning about the Store and Requests

Request Builders

Request builders are functions that produce Fetch Options. They take a few contextual inputs about the request you want to make, abstracting away the gnarlier details.

For instance, to fetch a resource from your API

import { findRecord } from '@ember-data/active-record/request';

const options = findRecord('ember-developer', '1', { include: ['pets', 'friends'] });

/*
  => {
    url: 'https://api.example.com/v1/ember_developers/1?include=friends,pets',
    method: 'GET',
    headers: <Headers>, // 'Content-Type': 'application/json;charset=utf-8'
    op: 'findRecord';
    records: [{ type: 'ember-developer', id: '1' }]
  }
*/

Request builder output may be used with either requestManager.request or store.request.

URLs are stable. The same query will produce the same URL every time, even if the order of keys in the query or values in an array changes.

URLs follow the most common ActiveRecord format (underscored pluralized resource types).

Available Builders

Keywords

FAQs

Package last updated on 21 Jun 2024

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