PHPackages                             pixels/torn-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. pixels/torn-api

ActiveLibrary[API Development](/categories/api)

pixels/torn-api
===============

A PHP wrapper around the Torn API

1.1.2(5y ago)2101MITPHPPHP &gt;=7.0

Since Oct 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/tim-dewit/torn-api)[ Packagist](https://packagist.org/packages/pixels/torn-api)[ RSS](/packages/pixels-torn-api/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Torn API Wrapper
----------------

[](#torn-api-wrapper)

### Installation

[](#installation)

The preferred method of installation is via Composer.

```
composer require pixels/torn-api

```

### Usage

[](#usage)

There are services for all API endpoints. They all follow the same pattern as the example below.

```
$masterApiKey = 'masterApiKey'; // Used as a fallback if no key is specified in a request
$selections = [\Torn\Services\UserService::BASIC];
$userId = 'someUserId';
$userApiKey = 'yourApiKey';
$useTornProxyByDefault = false;
$forceTornProxy = true; // Allows you to use Torn Proxy for a specific request
$httpClient = new GuzzleHttp\Client();

$client = new Torn\Client($httpClient, $masterApiKey, $useTornProxyByDefault);
$userService = new Torn\Services\UserService($client);
$user = $userService->fetch($userId, $selections, $userApiKey, $forceTornProxy);
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Total

3

Last Release

2054d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/384015?v=4)[Pixels](/maintainers/Pixels)[@pixels](https://github.com/pixels)

---

Top Contributors

[![tim-dewit](https://avatars.githubusercontent.com/u/46968097?v=4)](https://github.com/tim-dewit "tim-dewit (34 commits)")

---

Tags

torn

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pixels-torn-api/health.svg)

```
[![Health](https://phpackages.com/badges/pixels-torn-api/health.svg)](https://phpackages.com/packages/pixels-torn-api)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M985](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
