项目作者: vitsensei

项目描述 :
Find and retrieve latest articles from multiple different news agencies.
高级语言: Go
项目地址: git://github.com/vitsensei/infogrid.git
创建时间: 2021-01-25T12:27:14Z
项目社区:https://github.com/vitsensei/infogrid

开源协议:MIT License

下载


Description

A simple news aggregation. Currently support NYTimes and Reuters.

Quick start

cmd/main.go should provide a basic understanding of the package workflow

Dependancies

Package Description
github.com/gorilla/mux routing
go.mongodb.org/mongo-driver/mongo database (MongoDB) driver
gopkg.in/jdkato/prose.v2 text -> sentences, extract keywords
golang.org/x/net/html parsing HTML file

Usage

The application is simply a REST API.

Root URL: www.infogrid.app

  1. servers:
  2. - url: http://www.infogrid.app/
  3. paths:
  4. /articles:
  5. get:
  6. summary: List all articles
  7. parameters:
  8. - name: section
  9. in: query
  10. description: section where the articles comes from (us, world, technology, etc.)
  11. required: false
  12. schema:
  13. type: string
  14. - name: tag
  15. in: query
  16. description: tag that the article contains
  17. required: false
  18. schema:
  19. type: string
  20. responses:
  21. '200':
  22. description: An array of articles
  23. content:
  24. application/json:
  25. Articles:
  26. Article:
  27. URL: string
  28. Title: string
  29. Section: string
  30. DateCreated: "2021-01-30 00:08:43 +0000 UTC"
  31. SummarisedText: string
  32. Tags: list of string
  33. /sections:
  34. get:
  35. summary: List all available sections
  36. responses:
  37. '200':
  38. description: An array of available sections
  39. content:
  40. application/json:
  41. Sections: array of string
  42. /tags:
  43. get:
  44. summary: List all available tags
  45. responses:
  46. '200':
  47. description: An array of available tags (biden, trump, covid-19, etc.)
  48. content:
  49. application/json:
  50. Tags: array of string