BingNewsSearch

所属分类:工具库
开发工具:PHP
文件大小:0KB
下载次数:0
上传日期:2021-03-02 14:24:05
上 传 者sh-1993
说明:  用于bing新闻搜索API的PHP库。
(PHP Library for bing news search API.)

文件列表:
LICENSE (1061, 2021-03-02)
composer.json (632, 2021-03-02)
composer.lock (87896, 2021-03-02)
src/ (0, 2021-03-02)
src/Client.php (3178, 2021-03-02)
src/Enum/ (0, 2021-03-02)
src/Enum/Category.php (1160, 2021-03-02)
src/Enum/Enum.php (4774, 2021-03-02)
src/Enum/IMarketCategory.php (70, 2021-03-02)
src/Enum/Language.php (1732, 2021-03-02)
src/Enum/RequestMethod.php (108, 2021-03-02)
src/Enum/SafeSearch.php (177, 2021-03-02)
src/Enum/SortBy.php (335, 2021-03-02)
src/Enum/SubCategory.php (2008, 2021-03-02)
src/Exceptions/ (0, 2021-03-02)
src/Exceptions/ConnectionException.php (94, 2021-03-02)
src/Exceptions/Exception.php (83, 2021-03-02)
src/Exceptions/InvalidParameterException.php (128, 2021-03-02)
src/Requests/ (0, 2021-03-02)
src/Requests/Category.php (269, 2021-03-02)
src/Requests/Category/ (0, 2021-03-02)
src/Requests/Category/Get.php (2825, 2021-03-02)
src/Requests/Request.php (2313, 2021-03-02)
src/Requests/Search.php (176, 2021-03-02)
src/Requests/Search/ (0, 2021-03-02)
src/Requests/Search/Get.php (2771, 2021-03-02)
src/Requests/SubRequest.php (693, 2021-03-02)
src/Requests/Trending.php (226, 2021-03-02)
src/Requests/Trending/ (0, 2021-03-02)
src/Requests/Trending/Get.php (2677, 2021-03-02)
src/Structs/ (0, 2021-03-02)
src/Structs/AboutNews.php (429, 2021-03-02)
src/Structs/Image.php (781, 2021-03-02)
src/Structs/ImageThumbnail.php (603, 2021-03-02)
src/Structs/News.php (1868, 2021-03-02)
src/Structs/Provider.php (598, 2021-03-02)
src/Structs/Trending.php (1627, 2021-03-02)
tests/ (0, 2021-03-02)
... ...

# BingNewsSearch API Library # ### See more of this API at: https://docs.microsoft.com/en-us/bing/search-apis/bing-news-search ### ___ ## Dependencies ## - PHP7.4 > - GuzzleHttp 7.0.x > ___ ## Instalation ## ``` composer require bing-news-search/bing-news-search ``` ___ ## Usage of Api bing NEWS microsoft an easy way ## ### Initialize the Client instance ### ```php $client = new Client( 'apibingurl.com.br', // https://api.bing.microsoft.com/ 'your_secret_key' // a1b2c3d4e5f6g7h8a1b2c3d4e5f6g7h8 ); ``` ### Configure client ### ```php $client->enableExceptions(); // throw exceptions for debug $client->disableSsl(); // disable Guzzle verification SSL ``` ### Search by category ### ```php // Ex: Search by business category, with pt_BR language, without safe search restriction; $request = $client->category() ->get(Enum\Category::BUSINESS(), Enum\Language::PT_BR()) ->setSafeSearch(Enum\SafeSearch::OFF()) ->request(); $news = $request->getNews(); ``` ### Search by key word ### ```php // Ex: Search by key word, limited at 50 items, with safe search restriction; $request = $client->search() ->get('something cool') ->setQuantity(50) ->setSafeSearch(Enum\SafeSearch::STRICT()) ->request(); $news = $request->getNews(); ``` ### Search by trending topics ### ```php // Ex: Get trending topics news, with en_US language. $request = $client->trending() ->get(Enum\Language::EN_US()) ->request(); $news = $request->getTrending(); ``` __MORE__ ___ Check BingNewsSearch\Enum classes to know all avaiables search configurations, such as: Categories and SubCategories, Languages and more..

近期下载者

相关文件


收藏者