Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a getAllVehiclesOnSuccess method #22

Open
Supertecnoboff opened this issue Jan 12, 2017 · 0 comments
Open

Create a getAllVehiclesOnSuccess method #22

Supertecnoboff opened this issue Jan 12, 2017 · 0 comments

Comments

@Supertecnoboff
Copy link

Hi,

Please develop a method that lists all the logged in user. I have certain features in my iOS app, that require the user to select one of their vehicles (rather than a Vinli device), in order to view past historical driving data.

For the time being, I have cobbled a simple set of methods that perform the following functions in order to generate a list of all vehicles for a user:

  1. Download all the devices for the logged in user.
  2. Download all the vehicles for each device (using a method loop).
  3. Sort the vehicle array data, so that no vehicle duplicates appear (when presenting a list of vehicles to the user).

If you like, I would be happy to share my code with you (although its nothing advanced, just a simple method that loops itself until all the data is downloaded, followed by another method that removes duplicate VLVehicle objects).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant