C# Класс SteamWebAPI.SteamAPISession

Class allowing you to use the Steam Web API to log in and use Steam Friends functionality.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

Authenticate() публичный Метод

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
Результат LoginStatus

Authenticate() публичный Метод

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
Результат LoginStatus

GetFriends() публичный Метод

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
Результат List

GetGroupAvatar() публичный Метод

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
Результат System.Drawing.Bitmap

GetGroupInfo() публичный Метод

public GetGroupInfo ( String steamid ) : GroupInfo
steamid String
Результат GroupInfo

GetGroupInfo() публичный Метод

public GetGroupInfo ( List groups ) : List
groups List
Результат List

GetGroupInfo() публичный Метод

Retrieve information about the specified groups.
public GetGroupInfo ( List steamids ) : List
steamids List 64-bit SteamIDs of groups
Результат List

GetGroups() публичный Метод

Fetch all groups of a given user.
public GetGroups ( String steamid = null ) : List
steamid String SteamID
Результат List

GetServerInfo() публичный Метод

Retrieves information about the server.
public GetServerInfo ( ) : ServerInfo
Результат ServerInfo

GetUserAvatar() публичный Метод

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
Результат System.Drawing.Bitmap

GetUserInfo() публичный Метод

public GetUserInfo ( List friends ) : List
friends List
Результат List

GetUserInfo() публичный Метод

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
Результат List

GetUserInfo() публичный Метод

public GetUserInfo ( String steamid = null ) : User
steamid String
Результат User

Poll() публичный Метод

Check for updates and new messages.
public Poll ( ) : List
Результат List

SendMessage() публичный Метод

public SendMessage ( String steamid, String message ) : bool
steamid String
message String
Результат bool

SendMessage() публичный Метод

Send a text message to the specified user.
public SendMessage ( User user, String message ) : bool
user User
message String Message contents
Результат bool

SendTypingNotification() публичный Метод

Let a user know you're typing a message. Should be called periodically.
public SendTypingNotification ( User user ) : bool
user User
Результат bool