Giter Club home page Giter Club logo

xee-sdk-python's Introduction

Aloha 🌴

Welcome to my Gtihub !
I'm Quentin, a developer like almost everyone on Github.

Here, you can enjoy (or not) my public work

Reach me : Linkedin Badge


Stuff I use mainly

Flutter Dart

Bun TypeScript

Postgres

Firebase Supabase

Visual Studio Code

Stuff I use sometimes

Kotlin Docker Swagger Redis

👀 Some other data

And after, the repos, I swear

Github Stats

xee-sdk-python's People

Contributors

quentin7b avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

tikismoke

xee-sdk-python's Issues

Add a test_token() method (Enchancement)

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.

[User] Some exception on values returned by the api

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'

datetime & tzinfo

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é.

Tuple error with access token

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')

Exception in master Branch

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__'

[Install] 2 folders when update, add update target ?

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 ;)

V4 Api

As it seems the V3 api do not work anymore, this sdk isn't working anymore too.

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.