定制 kylebeckles-brightfuture/twitteroauth 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

kylebeckles-brightfuture/twitteroauth

最新稳定版本:v2.1.4

Composer 安装命令:

composer require kylebeckles-brightfuture/twitteroauth

包简介

PHP library to communicate with Twitter OAuth API version 1.1. Forked from hricardoper/twitteroauth @ https://github.com/ricardoper.

README 文档

README

PHP library to communicate with Twitter OAuth API version 1.1.

Latest Stable Version Total Downloads SensioLabsInsight License


OAuth Methods Supported

NOTE: Call media/upload supported, call account/update_profile_background_image not supported.

Requirements

  • PHP Version >= 5.3
  • PHP cURL extension
  • PHP JSON extension
  • PHP OpenSSL extension
  • Lib cURL

NOTE: No external dependencies (Guzzle, Symfony Components. etc...)

Installation

The recommended way to install TwitterOAuth is through Composer:

{
    "require": {
        "ricardoper/twitteroauth": "2.*"
    }
}

NOTE: If you prefer v1 (One Single File), you can get it in v1 branch.

Examples

Please, see the examples source code from "Examples" folder.

Benchmarks

Very simple benchmarks from "Examples" source code.

Memory Usage

Less than 524Kb except for image uploading. In this case memory depends on the image size.

Stress Bench

Stress bench done without connection request time. Single run bench done with and without connection request time. Connection request time may vary depending on the internet connection.

Machine:
Intel Core 2 Quad Q6600 2.40GHz
4Gb RAM
7200 rpm HDD

Versions:
nginx 1.6.2
PHP v5.5.9
Zend OPcache enabled
SIEGE 3.0.5

Bench Details:
20 concurrent connections
1000 requests per thread
No delays between requests
Command: siege -c20 -b -r1000 "URL"

Test Name Execution Time Requests per Second
v1 ApplicationOnly 11.44 1748.25
v1 SingleUser 10.05 1990.05
v2 ApplicationOnly 16.62 1203.37
v2 SingleUser 15.61 1281.23
v2 ApplicationOnly (Without Composer) 15.78 1267.43
v2 SingleUser (Without Composer) 15.60 1282.05

Test Name (Single Run) Without Req. Time With Req. Time
v1 ApplicationOnly 0.003817 2.056922
v1 SingleUser 0.003674 1.115811
v2 ApplicationOnly 0.005201 1.553395
v2 SingleUser 0.005202 0.847195
v2 ApplicationOnly (Without Composer) 0.004513 1.547005
v2 SingleUser (Without Composer) 0.004403 0.838964

v1 App Only
Transactions: 20000 hits
Availability: 100.00 %
Elapsed time: 11.44 secs
Data transferred: 0.46 MB
Response time:0.01 secs
Transaction rate: 1748.25 trans/sec
Throughput:0.04 MB/sec
Concurrency: 19.91
Successful transactions: 20000
Failed transactions: 0
Longest transaction: 0.03
Shortest transaction: 0.00

v1 Single User
Transactions: 20000 hits
Availability: 100.00 %
Elapsed time: 10.05 secs
Data transferred: 0.46 MB
Response time:0.01 secs
Transaction rate: 1990.05 trans/sec
Throughput:0.05 MB/sec
Concurrency: 19.86
Successful transactions: 20000
Failed transactions: 0
Longest transaction: 0.05
Shortest transaction: 0.00

v2 App only
Transactions: 20000 hits
Availability: 100.00 %
Elapsed time: 16.62 secs
Data transferred: 0.46 MB
Response time:0.02 secs
Transaction rate: 1203.37 trans/sec
Throughput:0.03 MB/sec
Concurrency: 19.91
Successful transactions: 20000
Failed transactions: 0
Longest transaction: 0.06
Shortest transaction: 0.00

v2 Single User
Transactions: 20000 hits
Availability: 100.00 %
Elapsed time: 15.61 secs
Data transferred: 0.46 MB
Response time:0.02 secs
Transaction rate: 1281.23 trans/sec
Throughput:0.03 MB/sec
Concurrency: 19.91
Successful transactions: 20000
Failed transactions: 0
Longest transaction: 0.04
Shortest transaction: 0.01

v2 App Only (Without Composer)
Transactions: 20000 hits
Availability: 100.00 %
Elapsed time: 15.78 secs
Data transferred: 0.46 MB
Response time:0.02 secs
Transaction rate: 1267.43 trans/sec
Throughput:0.03 MB/sec
Concurrency: 19.91
Successful transactions: 20000
Failed transactions: 0
Longest transaction: 0.04
Shortest transaction: 0.00

v2 Single User (Without Composer)
Transactions: 20000 hits
Availability: 100.00 %
Elapsed time: 15.60 secs
Data transferred: 0.46 MB
Response time:0.02 secs
Transaction rate: 1282.05 trans/sec
Throughput:0.03 MB/sec
Concurrency: 19.90
Successful transactions: 20000
Failed transactions: 0
Longest transaction: 0.06
Shortest transaction: 0.00

License

Released under the MIT License.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 28
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-19