承接 thatzad/birder 相关项目开发

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

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

thatzad/birder

Composer 安装命令:

composer require thatzad/birder

包简介

Get and filter Tweets (by @user or #hashtag) in a Laravel Way

README 文档

README

Installation

Begin by installing this package through Composer. Go to your project folder from the terminal and execute: composer require thatzad/birder

Once this operation completes, the next step is to add the service provider. Open app/config/app.php, and add a new item to the providers array.

'Thatzad\Birder\BirderServiceProvider'

And add the alias.

'Birder' => 'Thatzad\Birder\Facades\BirderFacade'

Finally you'll need to publish the config file. To do that, in the project folder execute:

php artisan vendor:publish

This will output the configuration in your config folder. You must to fill all twitter fields.

Usage

If you're familiar in the Laravel world, you'll find that very easy to use. E.g., imagine you need to find all @dotZecker tweets that have more than 2 retweets and only 1 fav. Do this is as easy as:

$tweets = Birder::user('@dotZecker')
    ->where('retweets', '>', 2)
    ->where('favorites', '=', 1) // The same as: ->whereFavorites(1)
    ->get();

Now, you want to get all tweets by the #Zelda hashtag that have more than 5 retweets or more than 6 favs.

$tweets = Birder::hashtag('#Zelda')
    ->where('retweets', '>', 5)
    ->orWhere('favorites', '>', 6)
    ->get();

This will return you a Illuminate\Support\Collection, by this way you'll be able to use all these methods.

Are you British or lazy?

Don't worry!, Birder uses internal synonyms (alias) for the favorites and retweets.

You can use:

->where('favorites' ...), ->where('favourites' ...), ->where('favs' ...), ->whereFavourites(...), ...

->where('retweets' ...), ->where('rts' ...), ->whereRts(...), ...

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-10-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固