Giter Site home page Giter Site logo

Comments (4)

davidhamann avatar davidhamann commented on August 26, 2024 2

Thanks, I've just confirmed the behaviour changes locally. Since the format of the response has not changed, it should be completely compatible with the code that processes the response. I'll try to code the changes today.

from python-fmrest.

davidhamann avatar davidhamann commented on August 26, 2024

Good point. Do you know about any official documentation regarding this?

I had a quick look into the Data API code and it seems they added some undocumented routes like /fmi/data/<version>/refreshLicense that don't work with v1. However, for a v1 to v2 change I would assume some actual changes, not just additional endpoints. I couldn't find anything while skimming over it. Do you have an overview / know an official statement or would we need to figure this out ourselves?

from python-fmrest.

DonPasquale avatar DonPasquale commented on August 26, 2024

The only differences I was able to spot are:

It seems these are no longer depending on the view setting (Form View or Table View), but are now always based on the Form View.

I believe implementation could be done with:

  • e.g. a Set in const.py, like API_VERSIONS = {'v1', 'v2', 'vLatest'}
  • replacing the hard coded 'v1' with '{version}' for all end points
  • in server.py add API_VERSIONS to from .const import ...
  • in Server.__init__ add version: str, and later on self.version = version if version in API_VERSIONS else "v1", this way it defaults to the currently hard coded version (or might vLatest be preferable?)
  • Finally, in all methods, as appropriate, add version = self.version, to string formatting (in order of appearance in the end points), e.g.:
API_PATH['xxxxx'].format(
            version = self.version,
            database=self.database,
            layout=self.layout,
            record_id=record_id
        )

from python-fmrest.

DonPasquale avatar DonPasquale commented on August 26, 2024

Thank you! And Happy Easter!

from python-fmrest.

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.