Skip to content

dima4p/challenge_offers_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Challenge

  1. Read the Fyber Offer API specification at API spec
  2. Create a form asking for these parameters (see the specs.):
  • uid
  • pub0
  • page
  1. Make the request to the API passing the params and the authenticatio4.
  2. Get the result from the response.
  3. Check the hash in the response to make sure that it is a real response.
  4. Render the offers in a view
  • If we have offers there we render them (title, thumbnail lowres andb.
  • If we have no offers there we render a message like ‘No offers ava available’.
  1. Deploy your solution so that we can interact with it in a web browser.
  2. Running rake at the root directory of your project should run the tests.

Solution

  1. Framework rails is choosen.
  2. Model OffersRequest is created that is responsible for all the details to perform the request to the API and processing the response. It keeps the parameters to be obtained form the form. Additionally it keeps some data coming back in response:
  • number of pages
  • number of records
  1. Model Offer is created that keeps the data of the offers to be listed in the view.
  2. Controller and views are created to accept the parameters from the form and showing the received offers in a table.

About

Ruby on Rails Developer Applicants Test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published