steamUtils
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Dannyps\Steam\SteamUser Class Reference

Useful functions to convert SteamIDs and extract information from Steam about Users.
There are several representations for steam IDs. Check them out at steamIDFormats.
You can also use the customURL nick defined by the user. (e.g. http://steamcommunity.com/id/nick) More...

Inheritance diagram for Dannyps\Steam\SteamUser:
[legend]
Collaboration diagram for Dannyps\Steam\SteamUser:
[legend]

Public Member Functions

 __construct ($id)
 
 refresh ()
 Forces an update of the XML information currently cached. More...
 
 getSteamName ()
 
 isOnline ()
 
 getStateMessage ()
 
 getPrivacyState ()
 
 getVisibilityState ()
 
 getCustomURL ($full=TRUE)
 
 getMemberSince ($timestamp=FALSE)
 
 getHeadline ()
 
 getLocation ()
 
 getRealName ()
 
 getSummary ()
 
 getGroups ()
 
 getPrimaryGroupId ()
 
 getPrimaryGroupName ()
 
 getHoursPlayedInLast2Weeks ($original=true)
 
 getMostPlayedGames ()
 
- Public Member Functions inherited from Dannyps\Steam\SteamID
 __construct ($id)
 
 isUser ()
 
 isGroup ()
 
 getSteamID64 ()
 
 getSteamID3 ()
 
 getSteamID ()
 

Private Member Functions

 getXML ()
 get the XML content from the steam Servers, if we don't have it already. More...
 
 getXMLbyURLnick ($nick)
 get the XML content from the steam Servers, if we don't have it already, but do it using the user's customURL. More...
 

Private Attributes

 $XML =NULL
 The XML content corresponding to the user's page. More...
 

Additional Inherited Members

- Protected Attributes inherited from Dannyps\Steam\SteamID
 $steamID
 The internal representation is the SteamID64. More...
 

Detailed Description

Useful functions to convert SteamIDs and extract information from Steam about Users.
There are several representations for steam IDs. Check them out at steamIDFormats.
You can also use the customURL nick defined by the user. (e.g. http://steamcommunity.com/id/nick)

Author
Daniel Silva mail@.nosp@m.dann.nosp@m.yps.n.nosp@m.et
Warning
Instantiating this class will result in additional loading time for the user as an XML will be fetched from the steam servers.

Constructor & Destructor Documentation

◆ __construct()

Dannyps\Steam\SteamUser::__construct (   $id)
Parameters
$ida steamID in any of the three formats supported, or the customURL nick.
Exceptions
-1on invalid SteamID.
Here is the call graph for this function:

Member Function Documentation

◆ getCustomURL()

Dannyps\Steam\SteamUser::getCustomURL (   $full = TRUE)
Returns
the customURL for this user.
Parameters
bool$fullwhether the returned URL should contain the text "https://steamcommunity.com/id/" or not (thus not being an URL).

◆ getGroups()

Dannyps\Steam\SteamUser::getGroups ( )
Here is the caller graph for this function:

◆ getHeadline()

Dannyps\Steam\SteamUser::getHeadline ( )
Returns
the user's Headline

◆ getHoursPlayedInLast2Weeks()

Dannyps\Steam\SteamUser::getHoursPlayedInLast2Weeks (   $original = true)
Todo:
docs

◆ getLocation()

Dannyps\Steam\SteamUser::getLocation ( )
Returns
the user's Location

◆ getMemberSince()

Dannyps\Steam\SteamUser::getMemberSince (   $timestamp = FALSE)
Returns
the date when the account was created.
Parameters
bool$timestampwhether the output should be a timestamp, or the steam representation of the date.

◆ getMostPlayedGames()

Dannyps\Steam\SteamUser::getMostPlayedGames ( )
Todo:
docs
Returns
false if unknown, steamGame array otherwise.

◆ getPrimaryGroupId()

Dannyps\Steam\SteamUser::getPrimaryGroupId ( )
Todo:
docs
Here is the call graph for this function:

◆ getPrimaryGroupName()

Dannyps\Steam\SteamUser::getPrimaryGroupName ( )
Todo:
docs

◆ getPrivacyState()

Dannyps\Steam\SteamUser::getPrivacyState ( )
Returns
the privacy state of the profile. Either public or private.

◆ getRealName()

Dannyps\Steam\SteamUser::getRealName ( )
Returns
the user's Real Name

◆ getStateMessage()

Dannyps\Steam\SteamUser::getStateMessage ( )
Returns
the state message.

◆ getSteamName()

Dannyps\Steam\SteamUser::getSteamName ( )
Returns
the name of the user.

◆ getSummary()

Dannyps\Steam\SteamUser::getSummary ( )
Returns
the user's Summary
Remarks
xml only.

◆ getVisibilityState()

Dannyps\Steam\SteamUser::getVisibilityState ( )
Returns
the visibility state of the profile. Either 1 (Private, Friends Only, etc), or 3 (Public). Reference: https://developer.valvesoftware.com/wiki/Steam_Web_API#Public_Data

◆ getXML()

Dannyps\Steam\SteamUser::getXML ( )
private

get the XML content from the steam Servers, if we don't have it already.

Here is the caller graph for this function:

◆ getXMLbyURLnick()

Dannyps\Steam\SteamUser::getXMLbyURLnick (   $nick)
private

get the XML content from the steam Servers, if we don't have it already, but do it using the user's customURL.

Here is the caller graph for this function:

◆ isOnline()

Dannyps\Steam\SteamUser::isOnline ( )

bool

Returns
whether the user is online.

◆ refresh()

Dannyps\Steam\SteamUser::refresh ( )

Forces an update of the XML information currently cached.

Here is the call graph for this function:

Member Data Documentation

◆ $XML

Dannyps\Steam\SteamUser::$XML =NULL
private

The XML content corresponding to the user's page.


The documentation for this class was generated from the following file: