PHPackages                             vestervang/rs-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. [Templating &amp; Views](/categories/templating)
4. /
5. vestervang/rs-api

ActiveLibrary[Templating &amp; Views](/categories/templating)

vestervang/rs-api
=================

An api to create a interface to all Runescape api's

v1.0.5(8y ago)016MITPHPPHP &gt;=7.1

Since Apr 2Pushed 8y ago1 watchersCompare

[ Source](https://github.com/vestervang/rs-api)[ Packagist](https://packagist.org/packages/vestervang/rs-api)[ RSS](/packages/vestervang-rs-api/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

RS-api
======

[](#rs-api)

[![Build Status](https://camo.githubusercontent.com/bce5d0a1b30ce848acba7728152341a4831142d8d8a5582742f218bdab6a618c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f76657374657276616e672f72732d6170692e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/vestervang/rs-api)[![Latest Stable Version](https://camo.githubusercontent.com/caafe9383a724c9d4cbc4056576198e8cdfe215691e1269b05dd5acebd5be0f3/68747470733a2f2f706f7365722e707567782e6f72672f76657374657276616e672f72732d6170692f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/vestervang/rs-api)[![Latest Unstable Version](https://camo.githubusercontent.com/f32059238f8112219d411b47a75f5f276236bdc6b10306a646a432043d4f2ffe/68747470733a2f2f706f7365722e707567782e6f72672f76657374657276616e672f72732d6170692f762f756e737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/vestervang/rs-api)[![Total Downloads](https://camo.githubusercontent.com/0fecf170fbdc646c7fa418883e37fdf431d850c95ed0ba79564e915330e68511/68747470733a2f2f706f7365722e707567782e6f72672f76657374657276616e672f72732d6170692f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/vestervang/rs-api)[![License](https://camo.githubusercontent.com/fbe1e019bc54810e28cd0015f2bf3b38c61d672d5c3627d9f73ef563d33249ed/68747470733a2f2f706f7365722e707567782e6f72672f76657374657276616e672f72732d6170692f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/vestervang/rs-api)

Core code is from [Burthorpe's runescape-api](https://github.com/Burthorpe/runescape-api)

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

[](#installation)

#### Dependencies

[](#dependencies)

- [Guzzle](https://github.com/guzzle/guzzle)

#### Installation

[](#installation-1)

```
composer require vestervang/rs-api

```

Usage
-----

[](#usage)

- [Hiscore](#hiscore)
- [GE](#ge)
- [Bestiary](#bestiary)

### Hiscore

[](#hiscore)

```
require __DIR__.'/vendor/autoload.php';

use vestervang\rsApi\RS3\Hiscore;

$hiscore = new Hiscore();
$username = 'zezima';
$stats = $hiscore->getStats($username)
```

If you want to loop through the list of stats you can do it like this:

```
for($i = 0; $i < $stats->getCount(); $i++){

	$stat = $stats->getStat($i);

	echo 'Name: '. $stat->getSkill()->getName(). '';
	echo 'Rank: '. $stat->getRank(). '';
	echo 'Level: '. $stat->getLevel(). '';
	echo 'Xp: '. $stat->getExperience(). '';
	echo '';
}
```

Or if you want to use a foreach:

```
foreach($stats->getStats() as $stat){

	echo 'Name: '. $stat->getSkill()->getName(). '';
	echo 'Rank: '. $stat->getRank(). '';
	echo 'Level: '. $stat->getLevel(). '';
	echo 'Xp: '. $stat->getExperience(). '';
	echo '';

}
```

### GE

[](#ge)

The only way to get a item price at the moment is by finding the id and using that.

```
require __DIR__.'/vendor/autoload.php';

use vestervang\rsApi\RS3\GE;

$api = new GE();
$item = $api->getItemById(4151);
```

I calculate the percent difference myself to get a more accurate number instead of the +0.0% og -0.0% the api returns.

### Bestiary

[](#bestiary)

In the bestiary api there is a option to save the result of an api call to a repo (The result will be saved to the repo as a Beast object).

This can be turned off on a per call basis. Just send false as a second parameter and it won't save the data in the repo.

#### Id

[](#id)

```
require __DIR__.'/vendor/autoload.php';

$bestiary = new \vestervang\rsApi\RS3\Bestiary();

//This will save to the repo and returns the json
$beast = $bestiary->getBeastById(49);

//This call only returns the json
$beast = $bestiary->getBeastById(49, false);
```

This will return the json for a monster with all details.

#### Name

[](#name)

```
require __DIR__.'/vendor/autoload.php';

$bestiary = new \vestervang\rsApi\RS3\Bestiary();

$beast = $bestiary->getBeastByName('cow');
```

This will return the json for a list of beasts with names and ids.

#### Level

[](#level)

```
require __DIR__.'/vendor/autoload.php';

$bestiary = new \vestervang\rsApi\RS3\Bestiary();

$beast = $bestiary->getBeastsByLevel('150-300');
```

This will return the json for a list of beasts with names and ids.

#### Letter

[](#letter)

```
require __DIR__.'/vendor/autoload.php';

$bestiary = new \vestervang\rsApi\RS3\Bestiary();

$beast = $bestiary->getBeastsByLetter('y');
```

This will return the json for a list of beasts with names and ids.

#### Area

[](#area)

This function is case-sensetive 'The Abyss' and 'The abyss' will not return the same results.

```
require __DIR__.'/vendor/autoload.php';

$bestiary = new \vestervang\rsApi\RS3\Bestiary();

$beast = $bestiary->getBeastsByArea('The Abyss');
```

This will return the json for a list of beasts with names and ids.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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 ~10 days

Total

2

Last Release

2954d ago

PHP version history (2 changes)v1.0PHP &gt;=5.4

v1.0.5PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ca2a68833194d5c440dc3236dad34bd4178bf151cb2d4d5b5c304d56c65846d?d=identicon)[vestervang](/maintainers/vestervang)

---

Top Contributors

[![vestervang](https://avatars.githubusercontent.com/u/17471495?v=4)](https://github.com/vestervang "vestervang (27 commits)")

---

Tags

composerpackagetemplate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vestervang-rs-api/health.svg)

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

PHPackages © 2026

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