TryGhost / TryGhost/SDK

'reading_time' parameter not returned when used in 'fields' query of Ghost Content API

Open
#490 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
134
Forks
87
Avg merge
12m
Merged PRs (30d)
25

Description

Issue Summary:
When using the Ghost Content API, specifically the "/posts/" or "/pages/" endpoints with the "field" query parameter to specify the fields to be returned, the "reading_time" parameter does not function as expected. While other parameters work fine, attempting to limit the fields returned by including "reading_time" results in unexpected behavior.

To Reproduce:

  1. Make a request to the "/posts/" or "/pages/" endpoint of the Ghost Content API.
  2. Include the "field" query parameter with the value of "reading_time" to limit the fields returned to just the reading time.
  3. Observe that the response does not return "reading_time".

Technical details:

  • Ghost Version: 5.80.0
  • Node Version: Unknown
  • Environment: Production
  • Browser/OS: Not relevant
  • Database: MySQL 8

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Ghost Content API request against the /posts/ and /pages/ endpoints with field=reading_time, then compare its response with a request selecting another field. Done means reading_time is returned when it is included in the field query parameter.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.