Skip to content

Latest commit

 

History

History
86 lines (49 loc) · 2.21 KB

README.md

File metadata and controls

86 lines (49 loc) · 2.21 KB

News APP

This is a very basic test application. It consumes news api from https://newsapi.org/ and returns json values for the client end. Then by using AppScript it calls the api everyday at the same time so that user can get top 5 news details on their Telegram by a bot.

Features

  • Users can get top 5 news everyday with link on telegram

API Reference

  https://newsapi.org/

Optimizations

NA

Deployment

This project is deployed on Railway Cloud currently

  https://newsapi-production-04d6.up.railway.app/getNews

Installation

Install main file after that create new google sheet and link AppScript with below code so that we can get all the news API in google sheet.

  function myFunction() {
  var url = "https://newsapi-production-04d6.up.railway.app/getNews";
  var response = UrlFetchApp.fetch(url);
  var json = response.getContentText();
  var apidata = JSON.parse(json);
  

  var cursheet = SpreadsheetApp.getActiveSheet();
  cursheet.clear();
  var headerRow = ['author','title','description','url','urlToImage','publishedAt','content'];
  cursheet.appendRow(headerRow);

  for (var i=0;i<5;i++){
     var row = [apidata.articles[i].author,apidata.articles[i].title,apidata.articles[i].description,apidata.articles[i].url,apidata.articles[i].urlToImage,apidata.articles[i].publishedAt,apidata.articles[i].content];
     SpreadsheetApp.getActiveSheet().appendRow(row);
  }
  
}

Now we have the API for top 5 news. No we can create new bot and channel from Telegram and share all the news with members. My Ref- https://www.youtube.com/watch?v=ovYHbxe4E5w

Demo

https://www.loom.com/share/7c7b23d81b76429f9855b5bce7ad02d0

Tech Stack

Client: Java, SpringBoot,AppScript

Server: Embedded

Authors

Feedback

If you have any feedback, please reach out to us at nnorth87@gmail.com

🔗 Links

portfolio linkedin