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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package g1-client

G1 News Client for PHP

An unofficial PHP client to retrieve news data from the G1 website, a property of Globo Comunicação e Participações S.A..

This project is intended strictly for educational and study purposes. It has no commercial intent and does not claim ownership of any content retrieved from G1.

The goal is to provide a simple, structured, and developer-friendly way to access Brazilian news metadata programmatically.


Features

Note This is not an official API and may break if G1 changes its internal structure.


Installation

Install via Composer:


Basic Usage


Cache Configuration

The client includes an optional filesystem cache.

Enable cache (default)

Disable cache entirely

When disabled:


Cache Usage Recommendation

⚠️ Important Notice

Although the cache can be fully disabled, this is strongly discouraged in production or frequent usage scenarios.

Disabling the cache causes:

For this reason, it is highly recommended to keep the cache enabled whenever possible, especially when:

The cache exists to:

Use the cache responsibly.


Working with News Items

The response returned by ultimas() is an instance of Ultimas, which contains a news array.

Each item in news is an instance of News with the following properties:

Property Description
url Full URL of the news article
id Unique identifier
feedId Feed identifier
type Content type (e.g. materia)
created Creation timestamp (ISO 8601)
modified Last modification timestamp
isPublishing Indicates if the item is currently publishing
images Array of available image sizes (XS, S, M, L, etc.)
chapeu Editorial label metadata
section Section name (e.g. São Paulo, Política)
title Main headline
recommendationTitle Optimized title for recommendations
summary Article summary
recommendationSummary Optimized summary

Example: Accessing an image


Legal Notice

This project:

Use responsibly.


License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0).

You are free to use, modify, and distribute this software under the terms of the GPLv3. Any derivative work must also be distributed under the same license.

See the LICENSE file for full details.


All versions of g1-client with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.9
voku/simple_html_dom Version ^4.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package adaiasmagdiel/g1-client contains the following files

Loading the files please wait ...