Skip to content

al11588/HowToUseHackernewsAPI

Repository files navigation

How to make three API calls using the Hacker News API in Python?

Introduction:

Image Tests Tests

Image Tests Tests

The Hacker News API allows individuals to retrieve news information on their website:

  • The ability to find the newest news.

  • Find the latest comments on the website.

  • Search for profile changes that a user has made.

Prerequisites:

Before you begin this guide, you need the following:

What To Install:

  • You need to install Requests using PIP in Terminal.

  • Press CTRL + ALT + T on your keyboard and type:

  • PIP install requests.

API Calls:

  • GET - Requests a resource at the requested URL.

  • OPTIONS - Indicates which techniques are supported.

  • HEAD - Returns meta data from the requested URL.

Use:

How To Run Example:

  • Link: Click Me.

  • Install: Python 3.

  • Install: Firefox or Chrome.

  • Run: "pip install virtualenv".

  • Run: "virtualenv venv".

  • Run: "source venv/bin/activate".

  • Run: "pip install -r requirements.txt".

  • Run: "python3 hackernewstep2.py".

Releases

No releases published

Packages

No packages published

Languages