2017 © Pedro Peláez
 

library steamrep

steamrep.com web API wrapper

image

fisk/steamrep

steamrep.com web API wrapper

  • Wednesday, January 10, 2018
  • by fisk
  • Repository
  • 1 Watchers
  • 1 Stars
  • 31 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 7 % Grown

The README.md

SteamRep PHP API Travis

Provides bindings for the public SteamRep web APIs to fetch reputation for a user., (*1)

Composer

composer require fisk/steamrep

Usage

Typical usage is as follows:, (*2)

<?php
use SteamRep\SteamRep;

$client = new SteamRep();
$response = $client->getUser("76561197971691194");

$tags = $response->getReputation()->getTags();

foreach ($tags as $tag) {
    print("{$tag->getAuthority()} {$tag->getStatus()}\n"); // SR ADMIN
}

SteamRepResponse

SteamRepResponse is the response object for a successful call., (*3)

isValid(): bool

Although a call to the SteamRep API may be successful, the input SteamId64 may be incorrect, or refers to a profile not yet tracked on SteamRep., (*4)

This asserts that the value of steamrep.flags.status is valid., (*5)

getLastSyncTime(): int

Get the time of the last update for the SteamRep profile., (*6)

getReputation(): Reputation

Returns a Reputation entity which provides helper functions for the steamrep.reputation document., (*7)

getStats(): Stats

Returns a Stats entity which provides helper functions for the steamrep.stats document., (*8)

Reputation

The Reputation class exposes the reputation data for a user., (*9)

getSummary(): string

Returns the value provided by steamrep.reputation.summary. Known values are as follows:, (*10)

  • none
  • SCAMMER
  • CAUTION
  • ADMIN
  • MIDDLEMAN
  • TRUSTED SELLER (disused)

getTagString(): string

A delimited list of tag names provided by steamrep.reputation.full., (*11)

Tags in the tag string are sorted by tag category, with miscellaneous tags appearing last., (*12)

getTags(): Tag[]

Returns an array of Tag objects representing the steamrep.reputation.tags document., (*13)

Tags in this array are sorted in chronological order., (*14)

Tag

A Tag represents a SteamRep tag, which consists of an authority and a status. This library supplies some helper methods to extract this information., (*15)

getName(): string

Get the name for this tag, e.g. SOP ADMIN, (*16)

getAuthority(): string

Get the authority for this tag, e.g. SOP, (*17)

getStatus(): string

Get the status for this tag, e.g. ADMIN, (*18)

getTimestamp(): int

Get the creation time of the tag as a UNIX timestamp., (*19)

getDateTime(): DateTime

Get the creation time of the tag as a PHP DateTime object., (*20)

NB: The SteamRep API provides a date string, however this does not include the timezone. If you need "SteamRep time", set the timezone of the returned object to CST6CDT., (*21)

getCategory(): string

Get the category of the tag. This can be one of the following:, (*22)

  • trusted - indicates a trusted user group; partner community, middleman, SteamRep admin, etc.
  • misc - used for the SteamRep donator label.
  • evil - scammer tags.
  • warning - caution tags.

Stats

getBannedFriendsCount(): int

Return the number of friends with SCAMMER tags., (*23)

getUnconfirmedReportsCount(): int

Returns the count of unconfirmed reports (the number of forum threads with non-conclusive tags)., (*24)

Error handling

  • The client will throw a GuzzleException for Guzzle client errors, or a SteamRepException if the returned data is malformed., (*25)

  • Always check the SteamRepResponse isFound() method if you aren't totally sure about your inputs. This will be true if the requested SteamID64 is valid., (*26)

The Versions

10/01 2018

dev-master

9999999-dev

steamrep.com web API wrapper

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Avatar fisk

17/10 2017

1.1.0

1.1.0.0

steamrep.com web API wrapper

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Avatar fisk

16/10 2017

1.0.0

1.0.0.0

steamrep.com web API wrapper

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Avatar fisk

16/10 2017

0.1.3

0.1.3.0

steamrep.com web API wrapper

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Avatar fisk

16/10 2017

0.1.2

0.1.2.0

steamrep.com web API wrapper

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Avatar fisk

16/10 2017

0.1.1

0.1.1.0

steamrep.com web API wrapper

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Avatar fisk

16/10 2017

0.1.0

0.1.0.0

steamrep.com web API wrapper

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Avatar fisk