Giter Club home page Giter Club logo

birder's Introduction

Birder

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require thatzad/birder.

"require": {
    "laravel/framework": "4.0.*",
    "thatzad/birder": "dev-master"
},

Next, update Composer from the Terminal:

composer update

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\Birder'

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

php artisan config:publish thatzad/birder

This will output the configuration in app/config/packages/thatzad/birder/config.php. 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(...), ...

Using with IFTTT

We build Birder to avoid Twitter's IFTTT limits integrations. The way we thought this was to use the RSS IFTTT trigger to "imitate" a Twitter timeline. So, if you want to Tweet automatically all tweets @Thatzad account does, you are able to do:

return Birder::user('@Thatzad')->makeFeed();

And this will you return a Feed where the link is the tweets status link, and the content the status itself.

birder's People

Contributors

rgomezcasas avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.