quintype-backend

1.13.0 • Public • Published

@quintype/backend

This library is used for making API calls to a Quintype API server

How to use this library

It is highly recommended that you use the object wrappers for each API call. For example, please use

Story.getStoryBySlug(client, "slug").then(story => story.domainFunction())

rather than

// Do not use this
client.getStoryBySlug("slug").then(story => doSomethingWithStoryJson(story))

Return Values

In cases where a 404 is possible (such as getting a story or a collection by slug), the following return types are possible (taking Story.getStoryBySlug as an example)

  • In case of a success, the promise resolves to an object of the Story class
  • In case of a 404, such as a not found slug, the promise resolves to null
  • In case of a 5xx or any other status code, the promise is rejected with an exception

Readme

Keywords

Package Sidebar

Install

npm i quintype-backend

Weekly Downloads

4

Version

1.13.0

License

ISC

Unpacked Size

41.6 kB

Total Files

10

Last publish

Collaborators

  • tdinkar
  • codepodu
  • sharangj
  • yelkarthik
  • rvgpl
  • anaghp
  • devops-quintype
  • jeevan_kishore
  • ajaymenon0
  • iamgarima
  • shreyaa1