SDK icon indicating copy to clipboard operation
SDK copied to clipboard

Add an option to skip response formatting in Content/Admin API SDKs

Open kevinansfield opened this issue 5 years ago • 3 comments

Currently the content/admin api SDKs format the response that is received from the API.

We'd like to add a "format response" boolean option to the SDKs so that consumers have the option to skip formatting and receive the raw data that is returned from the API.

Our initial use-case for this is a tool that can automatically generate request/response documentation for our API.

kevinansfield avatar Apr 01 '19 08:04 kevinansfield

@kevinansfield So the the fix should allow something like:

const api = new GhostContentAPI({
  url: 'YOUR URL',
  key: 'YOUR KEY',
  version: "VERSION",
  formatResponse: true/false
})

so the option formatted option can be passed along with these options and should default to true

Robogeek95 avatar Apr 18 '20 15:04 Robogeek95

@Robogeek95.. i agree with you on this...then we can just check the for config.formatResponse to know how the response will come ..weather formatted or not formatted

phawazzzy avatar Apr 18 '20 18:04 phawazzzy

@kevinansfield @ErisDS where would be the right place to dig for a possible fix?

nextwebb avatar Apr 21 '20 21:04 nextwebb