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. pixels/torn-api

ActiveLibrary

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 6d 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

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

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

2008d 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

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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