alexislefebvre / async-tweets-bundle
Symfony bundle providing a Twitter reader for asynchronous reading
Installs: 163
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.2
- ext-mbstring: *
- abraham/twitteroauth: ~0.6
- doctrine/orm: ^2.4.8
- symfony/config: ^3.4|^4.4
- symfony/form: ^3.4|^4.4
- symfony/framework-bundle: ^3.4|^4.4
- symfony/security-csrf: ^3.4|^4.4
- symfony/templating: ^3.4|^4.4
- symfony/twig-bundle: ^3.4|^4.4
- symfony/var-dumper: ^3.4|^4.4
Requires (Dev)
- behat/behat: ~3.2
- behat/mink: ^1.7
- behat/mink-browserkit-driver: ~1.3
- behat/mink-extension: ~2.2
- behat/symfony2-extension: ^2.1
- behatch/contexts: ^3.1
- doctrine/data-fixtures: ^1.3
- doctrine/doctrine-fixtures-bundle: ^3.0
- liip/functional-test-bundle: ^4.0.0
- liip/test-fixtures-bundle: ^1.0.0
- nelmio/alice: ^3.4
- phpspec/phpspec: ~4.2||~5.0||^6.2
- phpstan/phpstan-doctrine: ^0.12.17
- phpunit/phpunit: ~7.5.12|~8.1.6
- symfony/monolog-bundle: ~3.1
README
A Symfony bundle providing a Twitter reader for asynchronous reading
Links
- Demo: https://asynctweets.alexislefebvre.com/demo/
- Code coverage: https://asynctweets.alexislefebvre.com/codecoverage/
- Doxygen: https://asynctweets.alexislefebvre.com/doxygen/
- ApiGen: https://asynctweets.alexislefebvre.com/apigen/
Goal
The goal of this project is to create an online Twitter reader, built with Symfony. AsyncTweets retrieves and stores your timeline, allowing to read your Twitter timeline even if you're away from your Twitter client for several days.
This bundle is also used to test several CI (Continuous Integration) services.
Features
- Retrieve tweets by using User's Twitter keys
- Display the tweets with a pagination
- Display images below tweets
Installation
Requirements:
- Twitter keys
- PHP >= 7.2
- a database (must be supported by Doctrine2)
- Symfony (3.4+) with Composer
Steps:
-
Install this bundle with Composer:
composer require alexislefebvre/async-tweets-bundle
-
Add the bundle in app/AppKernel.php:
<?php public function registerBundles() { $bundles = array( // ... new AlexisLefebvre\Bundle\AsyncTweetsBundle\AsyncTweetsBundle(), ); }
-
Enter your Twitter keys at the end of the app/config/parameters.yml file:
twitter_consumer_key: null twitter_consumer_secret: null twitter_token: null twitter_token_secret: null
-
Create the database and create the tables:
php app/console doctrine:schema:update --force --env=prod
Usage:
-
Launch this command to fetch tweets:
php app/console statuses:hometimeline --table --env=prod
, with the--table
option the imported tweets will be shown -
Import the routes in your app/config/routing.yml:
asynctweets_website: resource: "@AsyncTweetsBundle/Resources/config/routing.yml" prefix: /asynctweets # Use only "/" if you want AsyncTweets at the root of the website
-
Open the page with your browser
.../YOUR_DIRECTORY/web/asynctweets/
or use the following commandphp app/console statuses:read --env=prod
to see tweets -
Add
php app/console statuses:hometimeline --env=prod
in your crontab (e.g. every hour) to retrieve tweets automatically
Dependencies
- symfony/symfony (3.4+)
- abraham/twitteroauth (^0.6.0)
- twitter/bootstrap (use Bootswatch 3.3.2)
Tests:
make tests
Quality Assurance:
make qa