Git Product home page Git Product logo

Comments (11)

kraih avatar kraih commented on May 30, 2024

Seems reasonable, i'll make public APIs for those.

from cavil.

llansky3 avatar llansky3 commented on May 30, 2024

So just to be clear - our current "recently updated" interface uses following:
url = f"http://legaldb.suse.de/package/{report_id}"
url = f"http://legaldb.suse.de/reviews/calc_report/{report_id}.json"
url = f"http://legaldb.suse.de/reviews/fetch_source/{file_id}.json"
url = "http://legaldb.suse.de/packages?" + urlencode(info)

from cavil.

kraih avatar kraih commented on May 30, 2024

Those will become /api/... when they are part of the official API.

from cavil.

llansky3 avatar llansky3 commented on May 30, 2024

Perfect....we can then adjust the queries at our end! Thanks!

from cavil.

llansky3 avatar llansky3 commented on May 30, 2024

Hi Sebastian, one more question regarding the API: currently we are querying the information we need in sequence but there is no obstacle at our end to parallelize things to query the information in parallel. Yet @coolo has raised a valid concern about jamming the legaldb and thus screwing everyone else. Any thoughts on how "parallel" we could get with our queries from your end? Thanks.

from cavil.

kraih avatar kraih commented on May 30, 2024

Yes, please don't parallelise the process, the hardware is not set up for that. We'd run out of memory at peak times.

from cavil.

llansky3 avatar llansky3 commented on May 30, 2024

OK, clear - we'll park this parallelization for now. But please keep us updated in case you hardware situation would improve and this would open some doors to such parallelization (or if our use case would somehow help you to justify better hardware)

from cavil.

kraih avatar kraih commented on May 30, 2024

Ok, two of those endpoints were already part of the bot API, and i've added the other two now.

http://legaldb.suse.de/reviews/calc_report/{report_id}.json
becomes
http://legaldb.suse.de/package/{report_id}/report

http://legaldb.suse.de/reviews/fetch_source/{file_id}.json
becomes
http://legaldb.suse.de/source/{file_id}

And both will always return JSON with 200 OK responses. Token authentication is the same for all of them.

from cavil.

llansky3 avatar llansky3 commented on May 30, 2024

Hi Sebastian, I tried the defined API above (as we are still using the old ones that keep working) and while I can get e.g."http://legaldb.suse.de/reviews/fetch_source/8272343446.json" (with appropriate headers provided) which is the old interface, I seem not be able to query e.g. "http://legaldb.suse.de/rsource/8272343446" which I understand is the newly defined interface. All the other APIs seems to work fine.

Could you please check the "http://legaldb.suse.de/rsource/{file_id}" API if it works correctly? Thank you.

from cavil.

kraih avatar kraih commented on May 30, 2024

Could you please check the "http://legaldb.suse.de/rsource/{file_id}" API if it works correctly? Thank you.

That rsource looks like a typo. Does it work with source instead?

from cavil.

llansky3 avatar llansky3 commented on May 30, 2024

Yes, this works correctly (e.g. http://legaldb.suse.de/source/8272343446). All good now - thanks!

from cavil.

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.