Giter Club home page Giter Club logo

newsapi's Introduction

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 [email protected]

๐Ÿ”— Links

portfolio linkedin

newsapi's People

Contributors

subhajit51193 avatar

Stargazers

 avatar

Watchers

 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.