承接 nao-30/gtrends-php-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nao-30/gtrends-php-sdk

最新稳定版本:v0.0.5

Composer 安装命令:

composer require nao-30/gtrends-php-sdk

包简介

A professional PHP SDK for the Google Trends CLI API

README 文档

README

A professional-grade PHP SDK for the Google Trends CLI API. This SDK provides a simple, intuitive interface to interact with the Google Trends API, allowing developers to access trending searches, related topics and queries, comparison data, and more.

Features

  • Seamless integration with Laravel applications
  • Compatible with standalone PHP projects
  • Support for all Google Trends API endpoints
  • Comprehensive error handling
  • Extensive documentation and examples

Requirements

  • PHP 8.0 or higher
  • JSON extension
  • cURL extension
  • Composer

Installation

composer require gtrends/gtrends-php-sdk

Quick Start

Standalone PHP

<?php

require 'vendor/autoload.php';

$client = new Gtrends\Sdk\Client([
    'base_uri' => 'https://trends-api-url.com',
    'timeout' => 30
]);

// Get trending searches
$trending = $client->getTrending('US');

Laravel Integration

Add the service provider to your config/app.php file:

'providers' => [
    // Other service providers...
    Gtrends\Sdk\Laravel\GtrendsServiceProvider::class,
],

Publish the configuration:

php artisan vendor:publish --provider="Gtrends\Sdk\Laravel\GtrendsServiceProvider"

Use the facade in your code:

use Gtrends\Sdk\Laravel\Facades\Gtrends;

// Get trending searches
$trending = Gtrends::getTrending('US');

Documentation

For full documentation, examples, and API reference, please see the docs directory.

License

This package is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-31