Code Monkey home page Code Monkey logo

nissan-connect's Issues

sort out code which uses both await and promises

e.g.

async login(username, password) {
  const key = await this.connect();
  NissanConnectApi.log('logging in');
  return this.request(Config.endPoints.login, {
    UserId: username,
    Password: NissanConnectApi.encryptPassword(password, key)
  })
      .then(res => new LoginResponse(res));
}

could be

async login(username, password) {
  const key = await this.connect();
  NissanConnectApi.log('logging in');
  const res = await this.request(Config.endPoints.login, {
    UserId: username,
    Password: NissanConnectApi.encryptPassword(password, key)
  });
  return new LoginResponse(res);
}

login-response may contain vehicle list

the login response may contain a vehicleinfolist instead of a single vehicleinfo:

          "VehicleInfoList": {
                    "VehicleInfo": [
                            {
                                    "charger20066":"false",
                                    "nickname":"LEAF",
                                    "telematicsEnabled":"true",
                                    "vin":"1ABCDEFG2HIJKLM3N"
                            }
                    ],
                    "vehicleInfo": [
                            {
                                    "charger20066":"false",
                                    "nickname":"LEAF",
                                    "telematicsEnabled":"true",
                                    "vin":"1ABCDEFG2HIJKLM3N"
                            }
                    ]
            },

(yes, one with a lower case v and another with upper case V)
currently, in that case, login-response.js throws an exception at line 57

A quick fix to get it going was to add before line 57:

 if (this.res.hasOwnProperty('VehicleInfoList')) {
    this.res.vehicleInfo = this.res.VehicleInfoList.vehicleInfo;
 }

npm repo is not in sync with github

npm repo has a 1.1.0 which seams to be older that the latest 1.0.14 in github. In particular, the bug " add support for a login response with a VehicleInfoList, fixes #2 " is not fix in the official npm repo

Endpoint has changed ?

Hi,

I am trying to use this module, without success. I get a 404 error, so I think the endpoint has changed.
Can anyone help ?

Thank you

password encoding error

looks like the password encoding is not correct. don't know enough about the process to know why exactly, but hopefully the following helps:

i'm comparing with the encoded password from pycarwings2 and the value seems to be different (first 10 characters are the same). if i take the result from the python library and hardcode it into the output of the encryptPassword function, then everything works.

unable to login

using the docs, I am unable to login anymore.

{ status: '-2010', message: 'INVALID PARAMS' }

debugging a little deeper

request:
uri: 'https://gdcportalgw.its-mo.com/api_v180117_NE/gdc/UserLoginRequest.php',
method: 'POST'

response:
{"status":404,"message":"INVALID PARAMS"}

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.