承接 slvler/brave-search-api 相关项目开发

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

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

slvler/brave-search-api

最新稳定版本:v2.0.1

Composer 安装命令:

composer require slvler/brave-search-api

包简介

Brave search api API wrapper for Laravel

README 文档

README

tests Latest Stable Version License Total Downloads

Introduction

Brave Web Search API is a REST API to query Brave Search and get back search results from the web. The following sections describe how to curate requests, including parameters and headers, to Brave Web Search API and get a JSON response back. This package provides a convenient wrapper to the Brave Web Search API for Laravel applications.

Requirements

  • PHP 8.2
  • Laravel 9.x | 10.x | 11.x

Installation

To install this package tou can use composer:

composer require slvler/brave-search-api

Usage

  • First, you should extract the config/brave.php file to the config folder.
php artisan vendor:publish --tag=brave
  • First of all we'll add the API key and API Url of the service we're using to our .env file of our project. If you don't have an account yet on api.search.brave.com, you should create one. Once you have an account you can copy your API key from the dashboard page and put it into you .env file.
BRAVE_BASE_URL="https://api.search.brave.com"
BRAVE_API_KEY=

Web text search

  • You can use it to search on brave api:
use Slvler\Brave\Facades\Brave;

Brave::web(['q' => "bitcoin"])->result();

Image Search

use Slvler\Brave\Facades\Brave;

Brave::image(['q' => "munich", "safesearch" => "strict"])->result();

Testing

composer test

Credits

License

The MIT License (MIT). Please see License File for more information.

Contributing

You're very welcome to contribute. Please see CONTRIBUTING for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-13