GithubHelp home page GithubHelp logo

Comments (6)

agjohnson avatar agjohnson commented on July 17, 2024

Actually, this API does have what I need, but the docs are wrong:

{
    "build": "{BUILD}",
    "project": "{PROJECT}",
    "version": "{VERSION}"
}

Instead the output is a much more complex response, not just string responses:

{
  build: {
    _links: { ... },
    ...,
    urls: { ... },
  },
  project: { ... },
  version: { ... },
};

from readthedocs.org.

humitos avatar humitos commented on July 17, 2024

@agjohnson note that {BUILD} syntax means it's a build object. You can find the structure for this obejct on the "Build details" section of the documentation: https://docs.readthedocs.io/en/stable/api/v3.html#build-details

from readthedocs.org.

agjohnson avatar agjohnson commented on July 17, 2024

It's in string quotes though, so implies this is an id/pk instead of a full object. I was not expecting to get a full object response from this API after looking at our docs.

from readthedocs.org.

humitos avatar humitos commented on July 17, 2024

It's with quotes because it's a JSON and if you don't use quotes there, it breaks Sphinx 🤷🏼

from readthedocs.org.

agjohnson avatar agjohnson commented on July 17, 2024

But that seems to be because we're using {BUILD} as a placeholder notation. The docs don't mention what this notation is or what data structures these refer to.

If we follow the pattern from other responses and instead show the full response, that would be clearer. Even a truncated response on the nested objects would be clearer, if we're worried the full response is too long.

from readthedocs.org.

agjohnson avatar agjohnson commented on July 17, 2024

I separated out fixing our API docs to make them clear. I have never noticed that our APIv3 docs comment many nested objects using strings and this could definitely be much clearer.

Changes to the API are in #11407

from readthedocs.org.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.