Code Monkey home page Code Monkey logo

tv-browser's Introduction

TV Browser

https://media.giphy.com/media/XhT868oxljs88/giphy.gif

Use the TV Maze API docs to build a single-page app that allows a user to search TV shows. The documentation lists the various endpoints that the TV Maze development team has made available. Identify which endpoint(s) would most useful for your TV show searching app. Try clicking on the URL examples for each endpoint to see the structure of the JSON data at that endpoint. Each of the API's endpoints may have differently structured JSON responses.

When testing out the API's endpoint URLs, you will want to install JSON Formatter to make the JSON responses more readable.

To search the TV Maze API use this URL: http://api.tvmaze.com/search/shows?q=girls

The search query of the URL is the serarch term that the user entered.

The response to the request will be an array of objects. When you recieve the response you should render data from each object in a loop.

CORS

Your browser may give you an error regarding a Cross Origin Request, depending on your operating system and version of chrome. You can install this chrome extension to get rid of it:

https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en

MVP

Use the input to get the search term from the user. Display the results in the dom.

Further

When you get the results, fill in the select element with an option element for each result

Further

Attach an event listener to the select. When the user selects an option make another AJAX call. Use the response of that AJAX call to render the individual show they requested

Full App

  1. Make the selector field (CSS selector "#show-select") hidden by default.

  2. After the user submits a search for a TV show...

  • un-hide the "#show-select" field.
  • populate the "#show-select" field with the list of search results. (create option tags in the select for each result you get)
  • make the first / default select option read "Shows matching keywordโ€ฆ".
  1. Whenever the user selects a title from the #show-select field (HINT: listen for a "change" event), display that show's name and image in the "#show-detail" div.

Take a look:

http://ga-wdi-exercises.github.io/tv-browser/

Further

Display in the DOM all of the data given to you for a particular show.

Further

Add a link to the cast of the show. If the user clicks on the cast link, make an AJAX call to get that info and display it to the user.

Further

Make each cast person clickable. When the user clicks on that person make an AJAX request for the person.

tv-browser's People

Contributors

andrewsunglaekim avatar awongh avatar calyeap avatar ckkok avatar ebirving avatar nolds9 avatar perryf avatar robertakarobin avatar superbuggy avatar

Watchers

 avatar

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.