PHPackages                             starcitizentools/apiunto - 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. starcitizentools/apiunto

ActiveMediawiki-extension[API Development](/categories/api)

starcitizentools/apiunto
========================

Lua Extension for MediaWiki to access the REST APIs

1616↑61.5%

Since May 28Compare

[ Source](https://github.com/StarCitizenTools/mediawiki-extensions-Apiunto)[ Packagist](https://packagist.org/packages/starcitizentools/apiunto)[ RSS](/packages/starcitizentools-apiunto/feed)WikiDiscussions Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Apiunto
=======

[](#apiunto)

Apiunto lets MediaWiki templates pull live data from REST APIs. Configure an API source once in `LocalSettings.php`, then fetch from it in Lua with `mw.ext.Apiunto.fetch()`. Responses are cached automatically, so repeated lookups don't re-hit the upstream API.

[![CI](https://github.com/StarCitizenTools/mediawiki-extensions-Apiunto/actions/workflows/ci.yml/badge.svg)](https://github.com/StarCitizenTools/mediawiki-extensions-Apiunto/actions/workflows/ci.yml)

Requirements
------------

[](#requirements)

- MediaWiki 1.43 or later
- PHP 8.1 or later
- [Scribunto](https://www.mediawiki.org/wiki/Extension:Scribunto) (hard dependency)

Installation
------------

[](#installation)

Clone or download this repository into your `extensions/` directory, then load it in `LocalSettings.php`:

```
wfLoadExtension( 'Apiunto' );

$wgApiuntoSources = [
    'StarCitizenWikiAPI' => [
        'baseUrl' => 'https://api.star-citizen.wiki/api/',
        'token' => '', // optional
        'timeout' => 5, // optional, default 5
        'cacheDuration' => 3600, // optional, default 86400
    ],
];
```

Usage
-----

[](#usage)

### Lua

[](#lua)

```
local api = mw.ext.Apiunto

-- Request data for the Greycat Industrial ROC
-- Docs: https://docs.star-citizen.wiki/v2
-- Output: https://api.star-citizen.wiki/api/v2/vehicles/ROC
local roc = api.fetch( 'StarCitizenWikiAPI', 'v2/vehicles/ROC' )
```

`fetch( source, uri, args )` takes:

- **`source`** — a source name from `$wgApiuntoSources`
- **`uri`** — the endpoint path to request
- **`args`** *(optional)* — a table of query parameters to append. Array values are joined with commas; empty values are dropped.

```
-- Resolves to v2/vehicles?manufacturer=AEGS&limit=10
local ships = api.fetch( 'StarCitizenWikiAPI', 'v2/vehicles', {
    manufacturer = 'AEGS',
    limit = 10,
} )
```

Configurations
--------------

[](#configurations)

VariableDefaultDescription`$wgApiuntoSources``[]`An array of API sources. Each source accepts `baseUrl`, and optional `token`, `timeout` (seconds, default `5`), and `cacheDuration` (seconds, default `86400`).`$wgApiuntoEnableCache``true`Whether to cache API responses.Caching
-------

[](#caching)

Each response is cached for its source's `cacheDuration`. Purging a page (`action=purge`) clears the Apiunto responses cached for it, and a page's information page (`action=info`) shows the current cache status, URL, and time remaining.

To purge the entire cache from the command line:

```
php maintenance/run.php extensions/Apiunto/maintenance/purgeCache.php
```

Add `--dry-run` to preview what would be purged without deleting anything.

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/421898af9788651cc8fe6c06069092f102e093e32e6f0e6437178aa8a180d328?d=identicon)[alistair3149](/maintainers/alistair3149)

### Embed Badge

![Health badge](/badges/starcitizentools-apiunto/health.svg)

```
[![Health](https://phpackages.com/badges/starcitizentools-apiunto/health.svg)](https://phpackages.com/packages/starcitizentools-apiunto)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k18](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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