Coder Social home page Coder Social logo

databridgesapi's People

Contributors

alexgherardelli avatar martinig94 avatar paololucchino avatar valeriogiuffrida avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

databridgesapi's Issues

DataBridgesAPI requests library

Revise the code as a library to get data from the various endpoints.

  • manage credentials
  • refresh token
  • update endpoints dictionary
  • extend endpoint methods

Also see #1

SamplePythonDataBridgesCall compilation error

Hey Valerio,

Thank you for putting up examples on using the DataBridges API!

I believe the SamplePythonDataBridgesCall contains some code at the end that prevents it from compiling... (from line 200).

It seems to be a recipe for creating an API token from a key and a secret. A standalone example to do that with curl would be helpful in it's own right!

Should we explore open-api-generator further?

Hi @ValerioGiuffrida ,

In the use-open-api-generator branch, you will find the a complete auto-generated API client for the endpoints currently available in the swagger.json on catalog.api.wfp.org using https://openapi-generator.tech/docs/installation

In the README there is a code example that I have tested and works (you just need to place your token in the code). The auto-generated docs also show all the endpoints that have been immediately available. As you are familiar with the API, it should be easy to see the small changes one would need to make to point to different endpoints.

The advantage of this approach is that the code for all the endpoints is generated in seconds, and this could be done in all these languages. The code can be regenerated easily anytime endpoints change. The way one makes a call is a little clunky but not the end of the world.

If we were to go down this route, we would need to integrate this code with the functionality to refresh the token automatically. Probably not very difficult, but still something to spend some time on.

So my question here is: does this auto-generated client seem like a good way to go? If yes, the next step would be to look into the token refresh.

cc @martinig94 @trenouard

Release latest dev branch code to pypi

I tried to use the DataBridgesAPI from within a library that I publish to pypi. When I tried to upload to pypi, I got this error:

Error uploading to repository: https://upload.pypi.org/legacy/ - Client error '400 Invalid value for requires_dist. Error: Can't have direct dependency: "data-bridges-client@ git+https://github.com/WFP-VAM/DataBridgesAPI@dev#egg=data-bridges-client ; extra == 'wfp'"' for url 'https://upload.pypi.org/legacy/'

Please can you make a release to pypi of the latest code on the dev branch.

Metadata inconsistency during pip installation process

Installing it with command pip install pip@git+https://github.com/WFP-VAM/DataBridgesAPI result in error (see log):

Collecting pip@ git+https://github.com/WFP-VAM/DataBridgesAPI
  Cloning https://github.com/WFP-VAM/DataBridgesAPI to c:\users\alessandra.gherardel\appdata\local\temp\pip-install-_8ayfm8h\pip_c893ebad5a2a43b6ba81ef1d1b9d608e
  Resolved https://github.com/WFP-VAM/DataBridgesAPI to commit 7d82d71eee5fd9e4a9bbe0899a6be29ccd547204
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Discarding git+https://github.com/WFP-VAM/DataBridgesAPI: Requested databridgesapi from git+https://github.com/WFP-VAM/DataBridgesAPI has inconsistent name: expected 'pip', but metadata has 'databridgesapi'

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.