Giter Site home page Giter Site logo

group_mini_project's Introduction

THIS BETTER WORK

Module 06 Mini-Project: Library of Congress Search Tool

In this activity, you will work with a group to build an application that searches and displays results from the Library of Congress API.

Instructions

The completed application should meet the following criteria:

  • As a user, I can submit a search query from the application to request data and receive a response from the Library of Congress.

  • As a user, I can either perform a generic search for data in all formats or I can select a format in the form to help filter results.

  • As a user, I can see all of the results of my search displayed on a separate page.

  • As a user, I can conduct additional searches from the results page as well.

To learn about how to use this API, check out the Requests section of the Library of Congress API documentation.

The Homepage

The homepage (index.html) should have the following:

  • A simple, well thought-out UI.

  • A form with a text input field to capture a search query and an option select dropdown to capture the format of the search query. The options in the dropdown should be a list of the possible format values listed in the Library of Congress API documentation on requests.

  • A browser event listener attached to the form to execute a function on submission, which will capture both form values and redirect the user to a search results page with those values included in the URL as query parameters. This will use the browser's location.replace() method.

  • If there is no format selected from the dropdown, the URL should look something like the following example:

    /search-results.html?q=dogs&format=
  • If there is a format selected from the dropdown, the URL should look something like the following example:

    /search-results.html?q=dogs&format=photos

The Search Results Page

The search results page (search-results.html) should have and do the following:

  • On page load, if there are query parameters, immediately parse them and use them in a request URL to fetch data from the Library of Congress API.

  • If there is a value for the format query parameter, use the format endpoint to search for something based on the chosen format. For more information, see the Library of Congress API documentation on the format endpoint.

  • If there is no value for the format query parameter, use the search endpoint to search for all types of data. For more information, see the Library of Congress API documentation on the search endpoint.

  • The response from the API request will then be displayed on the page. It is up to you and your team to determine which data should be displayed from the overall response object, but you must use data from the results property in the response object. For more information, see the Library of Congress API documentation on responses.

  • The same form from the homepage should be here as well. Instead of redirecting a user to another page, however, it will perform a search right on the page and display the new results.

Assets

The following image demonstrates the homepage's appearance and functionality:

The home page shows a search bar with the ability to select a format from a dropdown menu.

The following image demonstrates the search results page's appearance and functionality:

The search results page displays results from a search conducted in the form on the left side of the page.


๐Ÿ’ก Hints

Will every result have the same data? If not, how will we handle printing it to the page? Can the form design and functionality from the homepage be reused for the search results page?

๐Ÿ† Bonus

  • How can we build this application using our knowledge in Git collaboration?

ยฉ 2022 Trilogy Education Services, LLC, a 2U, Inc. brand. Confidential and Proprietary. All Rights Reserved.

group_mini_project's People

Contributors

bfunk54 avatar chrisy272 avatar harrj396 avatar

Stargazers

Roman avatar  avatar

Watchers

 avatar  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.