Git Product home page Git Product logo

jsonapi-client's Introduction

Table of Contents

JsonApiClient

JSON:API Client

Parameters

  • options Object Configuration options
    • options.host string Remote API host
    • options.https string Is protocol HTTPS or HTTP? (optional, default true)
    • options.port number Remote API port (optional, default 443)
    • options.basepath string? The root path of the API
    • options.debug boolean Enable debugging (optional, default false)

getOptions

Get client options

Returns Object

get

Fetch remote object and return it as a JsonApiDocument

Parameters

  • path string
  • model Object (optional, default UntypedResource)

Returns Promise<JsonApiDocument>

patch

Update remote object

Parameters

JsonApiDocument

Extends JsonApiModel

A JSON:API-compliant document object

Parameters

JsonApiError

Extends JsonApiModel

A JSON:API-compliant JSON:API object

Parameters

JsonApiMeta

Extends JsonApiModel

A JSON:API-compliant meta object

JsonApiModel

Base Model for JSON:API classes

JsonApiObject

Extends JsonApiModel

A JSON:API-compliant JSON:API object

Parameters

  • version string (optional, default JsonApiObject.#CURRENT_VERSION)
  • meta Object?

JsonApiResource

Extends JsonApiModel

A JSON:API-compliant resource object

Parameters

toJsonApiDocument

Wrap this resource in a JsonApiDocument

Returns JsonApiDocument

from

Build a new JsonApiResource from id, attributes, and included

Parameters

Returns JsonApiResource

fromMultiple

Build a new JsonApiResource from an array of objects with id, attributes, and included properties

Parameters

Returns JsonApiResource

jsonapi-client's People

Contributors

tomvoss avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.