Scrivito News API
A React component/Scrivito widget which shows how to work with external REST-APIs.
Screenshot
Installation
Open your terminal.
$ cd
to your Scrivito project
$ npm install scrivito-news-api
Import the widget in your javascript (e.g. in index.js
or Widgets/index.js
).
Add this line to your index.js:
import "scrivito-news-api";
Widget Configuratiom
First you need an API-Key from https://newsapi.org/register.
You can save the Key in the widget properties. Also choose a category for the News the widget should render.
Widget properties
In the widget properties you can set: