Download the PHP package adaiasmagdiel/g1-client without Composer
On this page you can find all versions of the php package adaiasmagdiel/g1-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download adaiasmagdiel/g1-client
More information about adaiasmagdiel/g1-client
Files in adaiasmagdiel/g1-client
Package g1-client
Short Description An unofficial PHP Client to retrieve news from the G1 website.
License MIT
Informations about the package g1-client
G1 News Client for PHP
This project provides an unofficial PHP client to retrieve news from the G1 website, a property of Globo Comunicações e Participações S.A. This API is created purely for educational purposes, with no commercial intent and no infringement on copyrights or related rights. The goal is to offer an easy, straightforward way to access prominent news from Brazil and around the world.
Features
- Fetch the latest news headlines and articles.
[!NOTE] More features will be available soon.
Installation
Install the package via Composer:
Usage
To start using the G1 News Client, follow the steps below:
Working with News Items
The $res
object has a news
attribute that contains an array of news items, each represented as an instance of the News
class. The News
class provides the following attributes for each news item:
- url: URL of the news article.
- id: Unique identifier of the news item.
- feedId: ID of the news feed.
- type: Type of news (e.g., article, video).
- created: Creation date of the news item.
- modified: Last modification date.
- isPublishing: Boolean indicating if the news item is currently being published.
- images: Array of available image sizes for the news item.
- chapeu: Not documented.
- section: Section of the website where the news item was published.
- title: Main title of the news item.
- recommendationTitle: Title suggested for recommendations.
- summary: Summary of the news item.
- recommendationSummary: Summary suggested for recommendations.
With these attributes, you can easily access detailed information about each news item.
License
This project is licensed under the MIT License. See the LICENSE file for more details.