2017 © Pedro Peláez
 

package twittersearch

A package for Twitter search API.

image

philbone/twittersearch

A package for Twitter search API.

  • Monday, May 21, 2018
  • by philbone
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 50 % Grown

The README.md

About Switter

Build Status, (*1)

Switter is a package for Twitter search API., (*2)

Index

  1. Requirements
  2. Installation
  3. How to use
    1. Example
  4. Running a Test

Requirements

Installation

Clone repository from GitHub, (*3)

$ git clone https://github.com/philbone/twittersearch.git switter 

Inside the directory where Switter is installed, open the terminal and run "composer install" to get the dependencies., (*4)

$ composer install

How to use

  • Import definition.
  • Make a new object from Search class.
  • Set token with your API keys.
  • Set some value to search.
  • Search the value.

Example:

use Twitter\Search\Search;

$apiKey = "jLl8hRLXY3xEPHGnx7UndxrcV"; // replace with your own api key.
$apiSecret = "8erBjpOra7GCGkHOK3YbTcqoKTQBSyKgljgG4MCDZi5cKRb7op"; // replace with your own api secret.

$search = new Search();

$search->setToken($apiKey, $apiSecret);

$value = ["q" => "#PHP #Composer"];

$response = $search->search($value);

var_dump($response);

A detailed test example can be found in test/SearchTest.php. Pay special attention to the sample method "testSuccessSearch"., (*5)

How to run Test SearchTest.php

Assuming that PHPUnit was installed as a dependency, simply open the terminal from the directory where Switter is installed and run it:, (*6)

$ phpunit 

The Versions

21/05 2018

dev-master

9999999-dev

A package for Twitter search API.

  Sources   Download

MIT

The Requires

 

by Phil Bone

search twitter search