vuex-jsonapi-client
json api client
Last updated a month ago by aronwolf .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vuex-jsonapi-client 
SYNC missed versions from official npm registry.

A rest client that follow the jsonapi specificaccion

Status (alpha)

The library was created by refactoring the CMC project. The refactoring is still in progress.

Actions

  • get({ resource }): Ajax GET request. If the same request was made before,then the promise is returned, insted of creating a new ajax call. The result is stored to vuex.
  • create({ payload }): Ajax POST request. The result is stored in vuex.
  • update({ entry, payload }): Ajax PUT call. It merge, the passed payload, with the entry and stored it to vuex, before making the ajax request.
  • destroy({ entry }): Ajax DELETE request. It remove the entry from vuex before making the request.
  • loadRelationship({ entry, name }): check if all entries in a relationship are loaded, if this is the case, then it return a promise with the entries, if not nall entries could be founded, then it call the api, by the url indicated in the relationship.
  • request({ method = get, payload, url }): perform a request. Default request type is GET.

Getters

  • entry({ entry, id }): return an entry.
  • collection({ name }): return all entries of one type, that are stored in vuex.
  • relationship({ entry, name }): return the, loaded, entry/entries of an relationship.

Histroy

Links:

Current Tags

  • 2.4.0                                ...           latest (a month ago)

31 Versions

  • 2.4.0                                ...           a month ago
  • 2.3.2                                ...           3 months ago
  • 2.3.1                                ...           3 months ago
  • 2.3.0                                ...           3 months ago
  • 2.2.3                                ...           4 months ago
  • 2.2.2                                ...           4 months ago
  • 2.2.1                                ...           4 months ago
  • 2.2.0                                ...           4 months ago
  • 2.1.3                                ...           6 months ago
  • 2.1.2                                ...           6 months ago
  • 2.1.1                                ...           6 months ago
  • 2.1.0                                ...           6 months ago
  • 2.0.1                                ...           6 months ago
  • 1.4.5                                ...           a year ago
  • 1.4.4                                ...           a year ago
  • 1.4.3                                ...           a year ago
  • 1.4.2                                ...           a year ago
  • 1.4.1                                ...           a year ago
  • 1.4.0                                ...           a year ago
  • 1.3.2                                ...           a year ago
  • 1.3.1                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.6                                ...           a year ago
  • 1.2.5                                ...           a year ago
  • 1.2.4                                ...           a year ago
  • 1.2.3                                ...           a year ago
  • 1.2.2                                ...           a year ago
  • 1.2.1                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 47
Dependencies (12)
Dev Dependencies (10)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |