2017 © Pedro Peláez
 

library runescape-highscores

A set of classes to better manipulate the RuneScape lite highscores API

image

that-chris-r/runescape-highscores

A set of classes to better manipulate the RuneScape lite highscores API

  • Wednesday, February 14, 2018
  • by christopherrolfe198
  • Repository
  • 0 Watchers
  • 1 Stars
  • 140 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 14 Versions
  • 0 % Grown

The README.md

RunescapeHighscores

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

A PHP layer on top of the RuneScape Highscores., (*2)

Install

Installing via composer

If you run this command with composer it'll require it into your project, (*3)

composer require that-chris-r/runescape-highscores, (*4)

Or add this to your composer.json, (*5)

{
    "require": {
        "that-chris-r/runescape-highscores": "2.*"
    }
}

Installing via git

Alternatively you can clone this repository and use the files in lib., (*6)

Retrieving a player

In order to access a player you need to create a new highscores object and use that to query the RuneScape API, $client = new RunescapeHighscores();., (*7)

Once you have a client you can retrieve a single player using the get_player method, $player = $client->get_player('Das Wanderer');., (*8)

You can also retrive multiple players at one time using the get_players method, $players = $client->get_players(["Das Wanderer", "Bexs"]);., (*9)

This will return an indexed array with the indexes being the RuneScape usernames, E.G. $players["Das Wanderer"] will give you access to a player object., (*10)

Using a player object

Properties

Player objects use magic methods to access the properties for a player., (*11)

Each attribute holds its values in a PlayerValue class, when treated like a string it will return the level for skills and rank for anything else., (*12)

So to access a players attack level you do:, (*13)

// Short syntax
echo $player->attack;
// Longer syntax
echo $player->attack->level;

Each PlayerValue object holds other values, for skills it holds * Rank * Xp * Level, (*14)

For minigames it holds: * Rank * Score, (*15)

Minigames are access as they are named in the api documentation and spaces are replaced with underscores, so to access the information for a player on Dominion Tower you use $player->dominion_tower->rank., (*16)

Combat levels

You can access both the standard combat level and the legacy combat level on a player object with the following methods, get_legacy_combat_level and get_combat_level., (*17)

Converting to Array

You can convert the player object to an array if you need to by calling the to_array method., (*18)

Issues

If you have any issues please raise them via github, (*19)

The Versions

14/02 2018

dev-master

9999999-dev

A set of classes to better manipulate the RuneScape lite highscores API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christopher Rolfe

api runescape highscores

14/02 2018

2.1.6

2.1.6.0

A set of classes to better manipulate the RuneScape lite highscores API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christopher Rolfe

api runescape highscores

06/02 2018

2.1.5

2.1.5.0

A set of classes to better manipulate the RuneScape lite highscores API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christopher Rolfe

api runescape highscores

03/01 2018

2.1.4

2.1.4.0

A set of classes to better manipulate the RuneScape lite highscores API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christopher Rolfe

api runescape highscores

25/04 2016

2.1.3

2.1.3.0

A set of classes to better manipulate the RuneScape lite highscores API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christopher Rolfe

api runescape highscores

29/01 2016

v2.1.2

2.1.2.0

A set of classes to better manipulate the RuneScape lite highscores API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christopher Rolfe

api runescape highscores

05/07 2015

v2.1.1

2.1.1.0

A set of classes to better manipulate the RuneScape lite highscores API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christopher Rolfe

api runescape highscores

03/04 2015

v2.1.0

2.1.0.0

A set of classes to better manipulate the RuneScape lite highscores API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christopher Rolfe

api runescape highscores

18/09 2014

v2.0.0

2.0.0.0

A set of classes to better manipulate the RuneScape lite highscores API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christopher Rolfe

api runescape highscores

18/09 2014

dev-guzzle

dev-guzzle

A set of classes to better manipulate the RuneScape lite highscores API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christopher Rolfe

api runescape highscores

26/07 2014

1.2.0

1.2.0.0

A set of classes to better manipulate the RuneScape lite highscores API

  Sources   Download

MIT

The Development Requires

by Christopher Rolfe

api runescape highscores

12/04 2014

v1.1.0

1.1.0.0

A set of classes to better manipulate the RuneScape lite highscores API

  Sources   Download

MIT

The Development Requires

by Christopher Rolfe

api runescape highscores

25/01 2014

dev-dev-master

dev-dev-master

A set of classes to better manipulate the RuneScape lite highscores API

  Sources   Download

MIT

The Development Requires

by Christopher Rolfe

api runescape highscores

25/01 2014

v1.0.0

1.0.0.0

A set of classes to better manipulate the RuneScape lite highscores API

  Sources   Download

MIT

The Development Requires

by Christopher Rolfe

api runescape highscores