Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kevinansfield opened this issue Apr 1, 2019 · 3 comments · May be fixed by #286
Open

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

kevinansfield opened this issue Apr 1, 2019 · 3 comments · May be fixed by #286
Assignees
Labels
enhancement New feature or request

Comments

@kevinansfield
Copy link
Member

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 kevinansfield added the enhancement New feature or request label Apr 1, 2019
@kevinansfield kevinansfield self-assigned this Apr 1, 2019
@Robogeek95
Copy link

Robogeek95 commented Apr 18, 2020

@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

@phawazzzy
Copy link

@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

@nextwebb
Copy link

nextwebb commented Apr 21, 2020

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

phawazzzy added a commit to phawazzzy/Ghost-SDK that referenced this issue May 8, 2020
   closes TryGhost#73
     - Added formatResponse option to the parameter that would be passed in the GhostAdminApi/GhostContentAPi
     -the formatResponse is default to true when not specified by consumer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants