Giter VIP home page Giter VIP logo

js-github-project's Introduction

GitHub Search App

GitHub API

You will be using the GitHub API for this project. You can view documentation for this API here. This is an open API: no API key or authentication is required for the endpoints we will be using.

Notice the GitHub API documentation includes the following excerpt. They require you to add a custom header to your requests.

By default, all requests to https://api.github.com receive the v3 version of the REST API. We encourage you to explicitly request this version via the Accept header.
Accept: application/vnd.github.v3+json

You can search for users matching a certain name. For example, if we wanted to find all users name octocat, we would make a GET request to https://api.github.com/search/users?q=octocat. To view the response, you can copy and paste that URL into your browser.

This endpoint is rate limited. This means the API will stop returning data if you make more than 10 requests per minute.

You can find all the public repositories for a user using this endpoint. For example if we wanted to find all the repositories for a user with GitHub username octocat, we would make a GET request to https://api.github.com/users/octocat/repos. To view the response, you can copy and paste that URL into your browser.

This endpoint is rate limited. This endpoint will stop returning data if you make more than 60 requests in an hour.

Deliverables

You are going to build a JavaScript application which searches GitHub for users by name and displays the results on the screen. Clicking on a specific user will show all the repositories for that user.

  1. The index.html file has a form with a search input. When the form is submitted, it should take the value of the input and search GitHub for user matches using the User Search Endpoint.
  2. Using the results of the search, display information about the users to the page. (You might include showing their username, avatar and a link to their profile.)
  3. Clicking on one of these users should send a request to the User Repos Endpoint and return data about all the repositories for that user.
  4. Using the response from the Users Repos Endpoint, display all the repositories for that user on the page.

Bonus

  • Toggle the search bar between searching for users by keyword and searching for repos by keyword by adding an extra button. Hint: you can use the same search bar for this, but you may need to create a variable which stores what the current search type is (user or repo). The endpoint to search repositories by keyword is here.

js-github-project's People

Contributors

maxwellbenton avatar myildiz17 avatar hoffm386 avatar rrcobb avatar geluso 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.