Code Monkey home page Code Monkey logo

challenge_offers_api's Introduction

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.

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.