GithubHelp home page GithubHelp logo

newsdata-io's Introduction

News Data IO

Run Tests Coverage

Contributors: cyclonecode
Donate link: https://www.buymeacoffee.com/cyclonecode
Tags: news, article, feed
Requires at least: 5.3
Tested up to: 6.6.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

This plugin display a news feed fetched from newsdata.io.

Description

This plugin is developed by Cyclonecode and can be used to display a news feed fetched from newsdata.io.

First you need to get an API key from newsdata.io by following the steps as described here: How to get the NewsData.io API key.

If you have questions or perhaps some idea on things that should be added you can also try slack.

Shortcode

The shortcode [newsdata-io] can either be used by adding it to the content field of any post or page or by using the do_shortcode function in one of your templates.

Shortcode attributes:

  • size

Number of news. This value cannot be larger than 10 when using a free api key, otherwise the maximum is 50.

  • q

Search news articles for specific keywords or phrases present in the news title, content, URL, meta keywords and meta description. This attribute cannot be combined with the qInMeta or qInTitle attributes.

  • qInTitle

Search news articles for specific keywords or phrases present in the news titles only. This attribute cannot be combined with the q or qInMeta attributes.

  • qInMeta

Search news articles for specific keywords or phrases present in the news titles, URL, meta keywords and meta description only. This attribute cannot be combined with the q or qInTitle attributes.

  • country

Search the news articles from a specific country. You can add up to 5 countries in a single query.

  • category

Search the news articles for a specific category. You can add up to 5 categories in a single query.

  • excludeCategory

You can exclude specific categories to search for news articles. You can exclude up to 5 categories in a single query.

  • language

Search the news articles for a specific language. You can add up to 5 languages in a single query.

  • domain

Search the news articles for specific domains or news sources. You can add up to 5 domains in a single query.

  • excludeDomain

You can exclude specific domains or news sources to search the news articles. You can exclude up to 5 domains in a single query.

  • domainUrl

Search the news articles for specific domains or news sources. You can add up to 5 domains in a single query.

  • priorityDomain

Search the news articles only from top news domains. Valid values are top, medium and low.

  • image

Only fetch news articles with or without an image.

  • video

Only fetch news articles with or without a video.

Here is an example using all of the above attributes (notice that some of the attributes cannot be combined; this is just an example):

[newsdata-io size=5 q="Donald" qInTitle="Trump" qInMeta="Donald duck" country="us,gb,dk" category="sports,technology" excludeCategory="crime,domestic" language="sv,en" domain="bbc" excludeDomain="example" domainUrl="bbc.com" priorityDomain="top" image=1 video=0]

Crypto Attributes

In order to use the following attributes you will need to have a premium key to access the api.

  • coin

Search the news articles for specific crypto coins using their short forms only. You can add up to 5 coins in a single query.

  • tag

Search the news articles for specific Crypto AI-classified tags. You can add up to 5 tags in a single query.

  • sentiment

Search the news articles based on the sentiment of the news article (positive, negative, neutral).

News Archive Attributes

In order to use the following attributes you will need to have a premium key to access the api.

  • from_date

Use from_date filter to get news data from a particular date in the past.

  • to_date

This filter is used to set an end date for the search result.

Notice that all shortcode attributes are optional and that they must be on a single line. Default values is taken from the plugins settings page.

Improvements

If you have any ideas for improvements, don't hesitate to email me at [email protected] or send me a message on slack.

Support

If you run into any trouble, don’t hesitate to add a new topic under the support section: https://wordpress.org/support/plugin/newsdata-io

You can also try contacting me on slack.

Installation

  1. Upload newsdata-io to the /wp-content/plugins/ directory,
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Add your Api Key and configure the plugin at /wp-admin/admin.php?page=newsdata-io in WordPress.
  4. You can then add a shortcode in order to display the news listing.

Frequently Asked Questions

Upgrade Notice

Screenshots

1. A basic news listing.

[missing image]

Changelog

newsdata-io's People

Contributors

cyclonecode 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.