I'm Quentin, a developer like almost everyone on Github.
Here, you can enjoy (or not) my public work
And after, the repos, I swear
DEPRECATED - A python SDK for Xee APIs
License: Other
Usefull to make a simple test with current token.
In other apps user could use it and if failed make a xee.get_token_from_refresh_token(saved_refreshed_token) or xee.get_token_from_code(authorization_code)
In all case devs can can make test in app with the store token_ expired_date, or catch the error in every requests.
result of user api call:
{ "id": xxxx, "role": "dev", "firstName": "xxxxxxx", "lastName": "xxxxxxx", "nickName": null, "gender": "Male", "isLocationEnabled": true, "birthDate": null, "licenseDeliveryDate": null, "creationDate": "2016-08-31T16:32:59Z", "lastUpdateDate": "2016-08-31T16:57:48Z" }
Traceback (most recent call last):
File "xee_exemple.py", line 21, in <module>
user = xee.get_user(token)
File "/usr/local/lib/python2.7/dist-packages/xee-3.0.0-py2.7.egg/xee/sdk.py", line 140, in get_user
return xee_entities.parse_user(response), None
File "/usr/local/lib/python2.7/dist-packages/xee-3.0.0-py2.7.egg/xee/entities.py", line 166, in parse_user
user['nickname'],
KeyError: 'nickname'
Same because birthdate and lcenceDelivery date are not define:
Traceback (most recent call last):
File "xee_exemple.py", line 21, in <module>
user = xee.get_user(token)
File "/usr/local/lib/python2.7/dist-packages/xee-3.0.0-py2.7.egg/xee/sdk.py", line 140, in get_user
return xee_entities.parse_user(response), None
File "/usr/local/lib/python2.7/dist-packages/xee-3.0.0-py2.7.egg/xee/entities.py", line 166, in parse_user
isodate.parse_datetime(user['birthDate']),
File "/usr/local/lib/python2.7/dist-packages/isodate-0.5.4-py2.7.egg/isodate/isodatetime.py", line 51, in parse_datetime
datestring, timestring = datetimestring.split('T')
AttributeError: 'NoneType' object has no attribute 'split'
Traceback (most recent call last):
File "xee_exemple.py", line 21, in <module>
user = xee.get_user(token)
File "/usr/local/lib/python2.7/dist-packages/xee-3.0.0-py2.7.egg/xee/sdk.py", line 140, in get_user
return xee_entities.parse_user(response), None
File "/usr/local/lib/python2.7/dist-packages/xee-3.0.0-py2.7.egg/xee/entities.py", line 166, in parse_user
isodate.parse_datetime(user['licenceDeliveryDate']),
KeyError: 'licenceDeliveryDate'
The SDK has been made for python 3.
But some projects are still using python 2.7 and the SDK is not backward compatible.
The API returns licenseDeliveryDate
but this is a licence
Parser fails
Pour chaque requête, j’obtiens ce genre de résultats:
Location(latitude=4xx.440586, longitude=xx.08945, altitude=xx5.2, satellites=10, heading=2xx.85, date=datetime.datetime(2016, 9, 10, 11, 25, 7, 236000, tzinfo=<isodate.tzinfo.Utc object at 0x7fc264cb0810>))
Comme si les valeurs n'étaient pas converties ou une partie du code pas executé.
When i make a request get_user or get cars i got
Traceback (most recent call last):
File "xee_exemple.py", line 23, in <module>
car= xee.get_cars(token)
File "/usr/local/lib/python2.7/dist-packages/xee-3.0.0-py2.7.egg/xee/sdk.py", line 162, in get_cars
response = xee_utils.do_get_request(route, access_token)
File "/usr/local/lib/python2.7/dist-packages/xee-3.0.0-py2.7.egg/xee/utils.py", line 35, in do_get_request
request = requests.get(route, headers={'Authorization': 'Bearer ' + bearer})
TypeError: cannot concatenate 'str' and 'tuple' objects
if i print token i get:
(Token(access_token=u'4f3efxxxxxxxxxa413868114c982a26d0dddaebfbfea110677a2caf6968c132', refresh_token=u'b7d0c2xxxxxxxxxx2bb1ad6282deefc10fae0ab2a89924914e757db386571', expires_in=172800, expires_at=1472999882), None)
Looks like the access token is not parse in response = xee_utils.do_get_request(route, access_token)
i have to provide myself the current token like this to have an answer: response = xee_utils.do_get_request(route, '4f3efxxxxxxxxxa413868114c982a26d0dddaebfbfea110677a2caf6968c132')
Add Xee's compat service
It would be great to have contributing guidelines to help everyone enhance the project.
The readme lack of examples.
It would be great to add some.
It would be great to have some unit test.
a problem with the get_status with accelerometer.
Traceback (most recent call last):
File "xee_exemple.py", line 31, in <module>
Status ,error = xee.get_status(carID,token.access_token)
File "/usr/local/lib/python2.7/dist-packages/xee-3.0.1-py2.7.egg/xee/sdk.py", line 217, in get_status
return xee_entities.parse_status(response), None
File "/usr/local/lib/python2.7/dist-packages/xee-3.0.1-py2.7.egg/xee/entities.py", line 309, in parse_status
Accelerometer(accelerometer['x'], accelerometer['y'], accelerometer['z'],
TypeError: 'NoneType' object has no attribute '__getitem__'
I upgrade the xee-sdk, but now i have 2 eg in my /usr/local/lib/python2.7/dist-packages/
drwxr-sr-x 4 root staff 4096 août 31 19:25 xee-3.0.0-py2.7.egg
drwxr-sr-x 4 root staff 4096 sept. 10 14:42 xee-3.0.1-py2.7.egg
Create a remove function or an upgrade one.
NOT a priority of course ;)
As it seems the V3 api do not work anymore, this sdk isn't working anymore too.
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.