Download the PHP package danvin-test/twitter-activity without Composer

On this page you can find all versions of the php package danvin-test/twitter-activity. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package twitter-activity

Simple PHP Twitter User Activity Checker (based on Silex 2.3, Twitter API v1.1)

This small web app takes user's twitter screen name as a parameter and return a JSON-encoded array containing "hour -> tweets count" for a given user, to determine what hour of the day they are most active. It also provides demonstration of the Silex's routing.

Requirements

  1. PHP 7.1.3 or later
  2. Enabled PHP CURL module
  3. Enabled mod_rewrite module (only for usage on webserver)

Installation

  1. Install Composer

    curl -s https://getcomposer.org/installer | php
  2. Execute

    php composer.phar create-project danvin-test/twitter-activity project_name

Configuration

Twitter API Credentials

Edit config.json, located in the root folder of the project, to set up your Twitter API credentials.

Notable mention: This web app uses statuses/user_timeline Twitter API. Advanced configuration available in the config.json, under twitterRequestSettings section.

.htaccess

If your site is not at the webroot level you will have to uncomment the RewriteBase statement and adjust the path to point to your directory, relative from the webroot. More information available at the Silex Webserver Configuration page

Usage

The application has 3 endpoints:

  1. "/" - will respond with "Try /hello/:name" as text
  2. "/hello/Daniel" - will respond with “Hello Daniel” as text
  3. "/histogram/Ferrari" - will respond with a JSON-encoded array displaying the number of tweets per hour of the day. Most active hours will be presented at the top of the array.

CLI

php index.php GET /                            
php index.php GET /hello/Daniel
php index.php GET /histogram/Ferrari

WebServer

http://localhost/
http://localhost/hello/daniel
http://localhost/histogram/Ferrari

Running the tests

  1. Make sure you have PHPUnit installed.
  2. To execute the tests, navigate into your project's folder and run

    phpunit

Built With

  1. Silex
  2. twitter-api-php

All versions of twitter-activity with dependencies

PHP Build Version
Package Version
Requires silex/silex Version ~2.0
symfony/browser-kit Version *
j7mbo/twitter-api-php Version *
phpunit/phpunit Version ^7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package danvin-test/twitter-activity contains the following files

Loading the files please wait ....