0.4.7 • Published 8 years ago
jsonapi-js v0.4.7
jsonapi-js
A small library for consuming a JsonAPI.
Using it
npm install --save jsonapi-jsimport { Resource } from "jsonapi-js";
export default class Endpoint extends Resource {
endpoint = "foo";
}
const foo = new Endpoint();
foo.findById(1).then(({ model, response }) => {
// model is a mash of attributes, and all merged relationships from includes
// resource is the raw response
});
foo.find({
include: ["some-relationship"],
filter: {
someKey: "baz"
}
}).then(({ model, response }) => {
// model is a mash of attributes, and all merged relationships from includes
// resource is the raw response
// model is an array in this case
});0.4.7
8 years ago
0.4.6
8 years ago
0.4.5
8 years ago
0.4.4
8 years ago
0.4.3
8 years ago
0.4.2
9 years ago
0.4.1
9 years ago
0.4.0
9 years ago
0.3.2
9 years ago
0.3.1
9 years ago
0.3.0
9 years ago
0.2.26
9 years ago
0.2.25
9 years ago
0.2.24
9 years ago
0.2.23
9 years ago
0.2.22
9 years ago
0.2.21
9 years ago
0.2.20
9 years ago
0.2.19
9 years ago
0.2.18
10 years ago
0.2.17
10 years ago
0.2.16
10 years ago
0.2.15
10 years ago
0.2.14
10 years ago
0.2.13
10 years ago
0.2.12
10 years ago
0.2.11
10 years ago
0.2.10
10 years ago
0.2.9
10 years ago
0.2.8
10 years ago
0.2.7
10 years ago
0.2.6
10 years ago
0.2.5
10 years ago
0.2.4
10 years ago
0.2.3
10 years ago
0.2.2
10 years ago
0.2.1
10 years ago
0.2.0
10 years ago