Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Mek
    @mekarpeles

    @technoplato_twitter -- no great way to query book chapters. This data is often not asserted in our books (it used to be manually asserted by operators). Also, I don't believe chapter markers are indexed in the search engine.

    On Open Library, you can use the book API per book to query for the Table of Contents if it is available -- see: https://openlibrary.org/dev/docs/api/books

    Search for jscmd=details and/or table of contents

    Michael Lustig
    @technoplato_twitter
    Thanks for your response @mekarpeles
    Benny Powers
    @bennypowers:matrix.org
    [m]
    hello! Does the API have an OpenAPI schema, and if not, would you welcome a PR?
    jimman2003
    @jimman2003:matrix.org
    [m]
    I think the api doesn't have an OpenAPI schema so by all means open a PR. Note the api is active development though
    Mek
    @mekarpeles
    @bennypowers:matrix.org we'd probably want to have a conversation about the direction of our APIs prior to committing to a swagger spec. We've also considered graphql as a near-term offering. Our Tuesday community calls or a github "Question" type issue are likely the best avenues for this conversation :)
    Benny Powers
    @bennypowers:matrix.org
    [m]
    as it so happens i'm working on a graphql api
    but i think it would be good to base it off an open api schema and rest api
    Benny Powers
    @bennypowers:matrix.org
    [m]
    is there a POST endpoint, or do I have to use the web form at https://openlibrary.org/books/add? the online docs appear to be incomplete
    Benny Powers
    @bennypowers:matrix.org
    [m]
    and is there a way to add a custom title for a contributor e.g. Senior Content Editor or Executive Editor?
    Benny Powers
    @bennypowers:matrix.org
    [m]

    Hello friends. Did anything come of the GraphQL discussion? I have a little time available and I'm eager to start contributing. My neighbourhood is lacking a good English library and I want to write some software to make it easier for neighbours to open up their private bookshelves as lending libraries.

    My idea is to use openlibrary as the database, via ISBN ids, and to have some PWA web UI for scanning then registering the book as part of the private library, or POSTing book metadata to openlibrary in case it's missing.

    jimman2003
    @jimman2003:matrix.org
    [m]
    good idea
    Benny Powers
    @bennypowers:matrix.org
    [m]
    So my thoughts are
    1. implement POST and PUT (if they're not implemented yet)
    2. implement OpenAPI v3 schema
    3. generate GraphQL server from schema
    4. work on UI
    5. profit!
    nice
    that looks perfect
    jimman2003
    @jimman2003:matrix.org
    [m]
    post is supported already
    Benny Powers
    @bennypowers:matrix.org
    [m]
    data-source is specific to apollo server. I had thought to use https://www.graphql-mesh.com/, but if the data source is under active development, all the better
    jimman2003
    @jimman2003:matrix.org
    [m]
    that repo is old though :(
    Benny Powers
    @bennypowers:matrix.org
    [m]
    I see
    well it might be worth investing in OpenAPI schema then
    because then we get graphql for free via graphql-mesh
    which can consume and open api schema and output graphql resolvers, that we can then plug in to any graphql server e.g. apollo-server
    we could also geneerate docs site from openapi. I think the current docs are out of date? (no post docs)
    jimman2003
    @jimman2003:matrix.org
    [m]
    you can read https://github.com/internetarchive/openlibrary-client as a short term solution
    Benny Powers
    @bennypowers:matrix.org
    [m]
    does that just implement the REST apis?
    jimman2003
    @jimman2003:matrix.org
    [m]
    yes
    Benny Powers
    @bennypowers:matrix.org
    [m]
    ok cool. I saw that but skipped over it since I'm developing in node
    Benny Powers
    @bennypowers:matrix.org
    [m]
    nice
    beware : the api might change as said by @mekarpeles
    Benny Powers
    @bennypowers:matrix.org
    [m]
    yeah so that's why I'm keen to help write the OpenAPI schema first
    until then I can work on my UI a little
    Benny Powers
    @bennypowers:matrix.org
    [m]
    can I read the code to to the actual API endpoints?
    Benny Powers
    @bennypowers:matrix.org
    [m]
    nice
    oh i meant the server code that receives the requests
    jimman2003
    @jimman2003:matrix.org
    [m]
    I am a relative new contributor.. let me search that
    Benny Powers
    @bennypowers:matrix.org
    [m]
    ty
    jimman2003
    @jimman2003:matrix.org
    [m]
    Benny Powers
    @bennypowers:matrix.org
    [m]
    wonderful
    I opened internetarchive/openlibrary#5590 to track discussion on openapi/graphql
    sadn1ck.
    @sadn1ck:matrix.org
    [m]
    hello 👋
    jimman2003
    @jimman2003:matrix.org
    [m]
    Benny Powers: seems like the maintainers will appreciate a small PoC for an OpenAPI spec
    jimman2003
    @jimman2003:matrix.org
    [m]
    I am also curious about the bc I have never written/seen one
    :point_up: Edit: Benny Powers: seems like the maintainers will appreciate a small Proof of Concept for an OpenAPI spec
    Benny Powers
    @bennypowers:matrix.org
    [m]
    it really gets flying when you codegen it
    but let's start with one or two hard coded properties
    jimman2003
    @jimman2003:matrix.org
    [m]
    be sure to post it somewhere afterwards