przemal / luxmed Goto Github PK
View Code? Open in Web Editor NEWLUX MED Group patient portal API client
LUX MED Group patient portal API client
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"
}
}
]
}
Hi @przemal
Thanks for your work on this.
Unfortunately this lib no longer works.
Steps to reproduce:
pip install -e git+https://github.com/przemal/luxmed#egg=luxmed
$ 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)
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.