Você está na página 1de 6

Coding Exercise

Please implement the application described below using whatever tools and languages you are most
comfortable with. If the language or platform you choose does not include built-in functionality for any of the
three (3) following items, please feel free to select whatever additional free or open-source tools or libraries to
assist you for:
HTTP GET requests
Base64 encoding
JSON decoding
However, please refrain from using any other 3rd party software packages, frameworks, extensions or
libraries that are not included in the core distribution of the language/platform that you choose for any other
functionality outside of the above three (3) items.
So for example, if you choose to write in PHP, feel free and use all the core PHP functionality, but do not
implement using any other 3rd party library, PEAR or PECL extensions (with the exception of anything
needed for the three (3) items listed above).
If you have any questions about this, please do not hesitate to contact us.
We anticipate that this exercise should take most applicants about 3 to 4 hours to implement.

Write a web-based application which utilizes the free development version of the
TireSync API to create a tool which will look up tire information based on the vehicle
being requested.
Documentation for the API attached at the end of this document.
Please note that the free/development version of the API we will use only includes data for 2006.

Vehicles are typically described by Year, Make, Model and Option, so for example, a
typical vehicle can be described as 2006 Acura MDX Base. So given this vehicle
description, we would break down the components as:
Year: 2006
Make: Acura
Model: MDX
Option: Base
For this application, the user should be given a series of listboxes where s/he can
perform the following 4 steps:

1.
2.
3.
4.

Select a Year
Based on the Year selected, s/he can select a Make
Based on the Year and Make selected, s/he can select a Model
Based on the Year, Make and Model, s/he can select an Option

Then, based on the 4 parameters that the user selects above, the user will be shown
the tire size information for the Standard tire that has a vehicle fitment associated with
the selected vehicle. Tire information is described as the following:
Section Width: 195
Aspect Ratio: 65
Rim: 15
If there are any notes information, then that should be displayed as well.
So at the beginning of the process, the page should look something like this:

And then after all 4 steps are completed, the page should look something like this:

Please take into account some basic usability features. For example, the user should
not be able to select (or even view) the list of Options until a Year, Make and Model are
specified.
Moreover, if all 4 are specified, but then the user decides to make a change to the
selected Make, then the application should react accordingly and unselect whatever
was specified for Model and Option.
If you have any questions with this, please dont hesitate to contact us for clarification.
Good luck and have fun!

Bonus Points: Implement the application as a single web page that utilizes AJAX calls
to update the user interface.

Coding Exercise Abridged TireSync API Documentation


Access to the TireSync API is available via HTTP on port 80 to api.tiresync.com as
HTTP (v1.1) GET requests to the server.
Parameters to API calls can be included within the URI of the GET request itself,
separated by slashes (/).
So for example, the following would open a HTTP session to the server and send a
request with 5 parameters (myparam1, myparam2, ..., myparam5):
telnet api.tiresync.com 80
GET /myparam1/myparam2/myparam3/myparam4/myparam5 HTTP/1.1
Host: api.tiresync.com

coding exercise. Each method will return a JSON encoded string which you can then
evaluate or parse as needed.

Get Available Years


This method will return all available years available in the database. Calls to this
method must include the following parameters:
parameter 1
parameter 2
parameter 3
parameter 4
parameter 5

use

the version of the API (for this exercise, use v1)


the name of the database (for this exercise, use oe)
the name of the query (for this method, use years)
the API key (for this exercise, use 1111-1111-1111-1111)
a base64 encoded string of the requestors IP address (for this exercise,
localhost)

Get Available Makes


This method will return all available makes available in the database given a year. Calls
to this method must include the following parameters:
parameter 1
parameter 2
parameter 3
parameter 4
parameter 5

parameter 6

the version of the API (for this exercise, use v1)


the name of the database (for this exercise, use oe)
the name of the query (for this method, use makes)
the API key (for this exercise, use 1111-1111-1111-1111)
a base64 encoded string of the requestors IP address (for this exercise,
use localhost)
a base64 encoded string of the year being requested

Get Available Models


This method will return all available models available in the database given a year and
make. Calls to this method must include the following parameters:
parameter 1
parameter 2
parameter 3
parameter 4
parameter 5

parameter 6
parameter 7

the version of the API (for this exercise, use v1)


the name of the database (for this exercise, use oe)
the name of the query (for this method, use models)
the API key (for this exercise, use 1111-1111-1111-1111)
a base64 encoded string of the requestors IP address (for this exercise,
use localhost)
a base64 encoded string of the year being requested
a base64 encoded string of the make being requested

Get Available Options


This method will return all available options available in the database given a year,
make and model. Calls to this method must include the following parameters:
parameter 1
parameter 2
parameter 3
parameter 4
parameter 5

parameter 6
parameter 7
parameter 8

the version of the API (for this exercise, use v1)


the name of the database (for this exercise, use oe)
the name of the query (for this method, use options)
the API key (for this exercise, use 1111-1111-1111-1111)
a base64 encoded string of the requestors IP address (for this exercise,
use localhost)
a base64 encoded string of the year being requested
a base64 encoded string of the make being requested
a base64 encoded string of the model being requested

Get Vehicle Fitments


This method will return the Vehicle Fitments from the database given a year, make,
model and option. Calls to this method must include the following parameters:
parameter 1
parameter 2
parameter 3
parameter 4
parameter 5

parameter 6
parameter 7
parameter 8
parameter 9

the version of the API (for this exercise, use v1)


the name of the database (for this exercise, use oe)
the name of the query (for this method, use vehicle_fitments)
the API key (for this exercise, use 1111-1111-1111-1111)
a base64 encoded string of the requestors IP address (for this exercise,
use localhost)
a base64 encoded string of the year being requested
a base64 encoded string of the make being requested
a base64 encoded string of the model being requested
a base64 encoded string of the option being requested