New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/DevloperAmanSingh/news-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/DevloperAmanSingh/news-api

  • v0.0.0-20240411144727-f8660c2ea33d
  • Source
  • Go
  • Socket score

Version published
Created
Source

News API

Overview

This API provides access to news stories from Hacker News. It allows you to fetch top, new, and best stories, as well as search for stories based on keywords.

Base URL

http://localhost:3000

Endpoints

Get Top/New/Best Stories

  • URL: /api/stories
  • Method: GET
  • Query Parameters:
    • category (optional, default: top) - Specify the category of stories (top, new, best)
    • page (optional, default: 1) - Specify the page number for pagination
    • limit (optional, default: 10) - Specify the number of stories per page
  • Description: Fetches the top, new, or best stories from Hacker News.

Search Stories

  • URL: /api/search
  • Method: GET
  • Query Parameters:
    • keyword (required) - The keyword to search for in stories
  • Description: Searches for stories containing the specified keyword.

Get User's Bookmarks

  • URL: /api/bookmarks
  • Method: GET
  • Description: Fetches the stories and comments bookmarked by the user.

Bookmark a Story or Comment

  • URL: /api/setbookmarks
  • Method: POST
  • Request Body:
    {
      "item_id": 123,
    }
    

FAQs

Package last updated on 11 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc