Giter Club home page Giter Club logo

luxmed's People

Contributors

przemal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

luxmed's Issues

ErrorCode: 301 (access_token)

Unfortunately, something has changed in the API. I am getting an error when trying to get a token:


{
  "Errors": [
    {
      "ErrorCode": 301,
      "Message": "In order to use this app, please update it to the newest version available in the store.",
      "AdditionalData": {
        "ShopUrl": "itms-apps://apps.apple.com/pl/app/id552592684",
        "FallbackUrl": "itms-apps://apps.apple.com/pl/app/id552592684",
        "Title": "Update needed"
      }
    }
  ]
}

LuxMedError: In order to use this app, please update it to the newest version available in the store (code 301)

Hi @przemal
Thanks for your work on this.

Unfortunately this lib no longer works.
Steps to reproduce:

  1. pip install -e git+https://github.com/przemal/luxmed#egg=luxmed
  2. Paste the example code from README.md
  3. Run the script:
$ python main.py
Traceback (most recent call last):
  File "c:\users\kubaw\.platformio\penv\src\luxmed\luxmed\transport.py", line 54, in _request
    response.raise_for_status()
  File "C:\Users\kubaw\.platformio\penv\lib\site-packages\requests\models.py", line 953, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 409 Client Error: Conflict for url: https://portalpacjenta.luxmed.pl/PatientPortalMobileAPI/api/token

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\projects\ha-luxmed\main.py", line 6, in <module>
    print(luxmed.user())
  File "c:\users\kubaw\.platformio\penv\src\luxmed\luxmed\luxmed.py", line 71, in user
    return self._transport.get(USER_URL)
  File "c:\users\kubaw\.platformio\penv\src\luxmed\luxmed\transport.py", line 97, in get
    return self.request('GET', url, **kwargs)
  File "c:\users\kubaw\.platformio\penv\src\luxmed\luxmed\transport.py", line 90, in request
    self.authenticate()
  File "c:\users\kubaw\.platformio\penv\src\luxmed\luxmed\transport.py", line 71, in authenticate
    token = self._request('POST', TOKEN_URL, data={
  File "c:\users\kubaw\.platformio\penv\src\luxmed\luxmed\transport.py", line 56, in _request
    raise LuxMedError.from_response(response) from error
luxmed.errors.LuxMedError: In order to use this app, please update it to the newest version available in the store (code 301)
(penv)

How about an API definition file?

Luxmed can change the API any time.
If all apps using it came together and produced an OpenAPI3 specification file, updating the rest of the app whenever it changes would be super easy with existing toooling for openapi.

Also, it seems possible to create a proxy that, when used between the app/portal and the server could collect requests and derive spec updates from that. Human would only have to generate traffic and review updates. Or maybe a testing tool could generate traffic.

I wonder if cross-project collaboration would be possible too.

(nie musiałem pisać tego po angielsku)

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.