C# Class SteamWebAPI.SteamAPISession

Class allowing you to use the Steam Web API to log in and use Steam Friends functionality.
Afficher le fichier Open project: Overv/SteamWebAPI Class Usage Examples

Méthodes publiques

Méthode Description
Authenticate ( String accessToken ) : LoginStatus

Authenticate with an access token previously retrieved with a username and password (and SteamGuard code).

Authenticate ( String username, String password, String emailauthcode = "" ) : LoginStatus

Authenticate with a username and password. Sends the SteamGuard e-mail if it has been set up.

GetFriends ( String steamid = null ) : List

Fetch all friends of a given user.

This function does not provide detailed information.

GetGroupAvatar ( GroupInfo group, AvatarSize size = AvatarSize.Small ) : Bitmap

Retrieve the avatar of the specified group in the specified format.

GetGroupInfo ( String steamid ) : GroupInfo
GetGroupInfo ( List groups ) : List
GetGroupInfo ( List steamids ) : List

Retrieve information about the specified groups.

GetGroups ( String steamid = null ) : List

Fetch all groups of a given user.

GetServerInfo ( ) : ServerInfo

Retrieves information about the server.

GetUserAvatar ( User user, AvatarSize size = AvatarSize.Small ) : Bitmap

Retrieve the avatar of the specified user in the specified format.

GetUserInfo ( List friends ) : List
GetUserInfo ( List steamids ) : List

Retrieve information about the specified users.

This function doesn't have the 100 users limit the original API has.

GetUserInfo ( String steamid = null ) : User
Poll ( ) : List

Check for updates and new messages.

SendMessage ( String steamid, String message ) : bool
SendMessage ( User user, String message ) : bool

Send a text message to the specified user.

SendTypingNotification ( User user ) : bool

Let a user know you're typing a message. Should be called periodically.

Private Methods

Méthode Description
login ( ) : bool

Helper function to complete the login procedure and check the credentials.

steamRequest ( String get, String post = null ) : String

Helper function to perform Steam API requests.

unixTimestamp ( long timestamp ) : System.DateTime

Method Details

Authenticate() public méthode

Authenticate with an access token previously retrieved with a username and password (and SteamGuard code).
public Authenticate ( String accessToken ) : LoginStatus
accessToken String Access token retrieved with credentials
Résultat LoginStatus

Authenticate() public méthode

Authenticate with a username and password. Sends the SteamGuard e-mail if it has been set up.
public Authenticate ( String username, String password, String emailauthcode = "" ) : LoginStatus
username String Username
password String Password
emailauthcode String SteamGuard code sent by e-mail
Résultat LoginStatus

GetFriends() public méthode

Fetch all friends of a given user.
This function does not provide detailed information.
public GetFriends ( String steamid = null ) : List
steamid String steamid of target user or self
Résultat List

GetGroupAvatar() public méthode

Retrieve the avatar of the specified group in the specified format.
public GetGroupAvatar ( GroupInfo group, AvatarSize size = AvatarSize.Small ) : Bitmap
group GroupInfo Group
size AvatarSize Requested avatar size
Résultat System.Drawing.Bitmap

GetGroupInfo() public méthode

public GetGroupInfo ( String steamid ) : GroupInfo
steamid String
Résultat GroupInfo

GetGroupInfo() public méthode

public GetGroupInfo ( List groups ) : List
groups List
Résultat List

GetGroupInfo() public méthode

Retrieve information about the specified groups.
public GetGroupInfo ( List steamids ) : List
steamids List 64-bit SteamIDs of groups
Résultat List

GetGroups() public méthode

Fetch all groups of a given user.
public GetGroups ( String steamid = null ) : List
steamid String SteamID
Résultat List

GetServerInfo() public méthode

Retrieves information about the server.
public GetServerInfo ( ) : ServerInfo
Résultat ServerInfo

GetUserAvatar() public méthode

Retrieve the avatar of the specified user in the specified format.
public GetUserAvatar ( User user, AvatarSize size = AvatarSize.Small ) : Bitmap
user User User
size AvatarSize Requested avatar size
Résultat System.Drawing.Bitmap

GetUserInfo() public méthode

public GetUserInfo ( List friends ) : List
friends List
Résultat List

GetUserInfo() public méthode

Retrieve information about the specified users.
This function doesn't have the 100 users limit the original API has.
public GetUserInfo ( List steamids ) : List
steamids List 64-bit SteamIDs of users
Résultat List

GetUserInfo() public méthode

public GetUserInfo ( String steamid = null ) : User
steamid String
Résultat User

Poll() public méthode

Check for updates and new messages.
public Poll ( ) : List
Résultat List

SendMessage() public méthode

public SendMessage ( String steamid, String message ) : bool
steamid String
message String
Résultat bool

SendMessage() public méthode

Send a text message to the specified user.
public SendMessage ( User user, String message ) : bool
user User
message String Message contents
Résultat bool

SendTypingNotification() public méthode

Let a user know you're typing a message. Should be called periodically.
public SendTypingNotification ( User user ) : bool
user User
Résultat bool