C# Class CSharpTradeOffers.Community.CommunityHandler

Handles commmunity related tasks
Exibir arquivo Open project: FatherFoxxy/CSharpTradeOffers

Public Methods

Method Description
AcceptFriendRequest ( ulong steamId ) : bool

Accepts a friend request.

AddFriend ( ulong steamId ) : CSharpTradeOffers.Community.AddFriendResponse

Sends a friend request to the specified user.

CommunityHandler ( Account account ) : System
DeleteTopic ( ulong forumId, ulong topicId ) : CSharpTradeOffers.Community.DefaultResult
DeleteTopicComment ( ulong commentId, ulong topicId, ulong forumId, ulong groupId, CSharpTradeOffers.Community.ForumInfo forumInfo, ulong start, ulong count = 15, bool oldestFirst = false, bool includeRawComments = false ) : CSharpTradeOffers.Community.DeleteTopicCommentResult

Used to delete a comment

EditTopic ( string title, string text, ulong forumId, ulong topicId ) : CSharpTradeOffers.Community.DefaultResult
GetProfileComments ( ulong steamId, int totalCount, int count, int start ) : GetCommentsResponse

Gets the profile comments of the specified SteamId64

GetTopicsHtml ( ulong forumId, ulong start, ulong count ) : CSharpTradeOffers.Community.GetTopicsHtmlResult
GroupAnnounce ( string groupName, string headLine, string body ) : IResponse

Posts an announcement to the specified group.

GroupEvent ( string groupName, string eventName, string eventNotes, string eventType, System.DateTime startDateAndTime, string timeChoice = "quick", string serverPassword = "", IPAddress serverAddress = null, int appId = -1, int timezoneOffset = -18000 ) : IResponse

Posts an event to the specified group.

InviteUserToGroup ( ulong steamId, bool json, ulong group ) : CSharpTradeOffers.Community.InviteResponse

Invites the specified user to a group.

InviteUsersToGroup ( ulong steamIds, bool json, ulong group ) : CSharpTradeOffers.Community.MultiInviteResponse

Invites the specified users to a group.

JoinGroup ( string groupName ) : IResponse

Join a public group.

LeaveGroup ( ulong groupId ) : IResponse

Leave a group.

ModerateTopic ( string action, string flag, bool value, ulong forumId, ulong topicId ) : CSharpTradeOffers.Community.ModerateTopicResult
PostClanComment ( ulong clanId, string comment, int count ) : CSharpTradeOffers.Community.ClanCommentResponse

Posts a comment to the specified clan.

PostComment ( ulong steamId, string comment ) : CSharpTradeOffers.Community.CommentResponse

Posts a comment to the specified profile.

RemoveFriend ( ulong steamId ) : bool

Removes a friend.

RequestAllMemberLists ( string groupName, int retryWait, int retryCount = 10 ) : List

Requests group information as well as the all pages of users.

RequestAllMemberLists ( ulong groupId, int retryWait, int retryCount = 10 ) : List

Requests group information as well as all pages of users.

RequestMemberList ( string groupName ) : CSharpTradeOffers.Community.MemberList

Requests group information as well as the first page of users.

RequestMemberList ( ulong groupId ) : CSharpTradeOffers.Community.MemberList

Requests group information as well as the first page of users.

SetPrivacySettings ( PrivacySettings settings, Account account ) : void

Sets the privacy settings of the account.

SetProfile ( Profile profile, Account account ) : bool

Sets the user's public profile settings to the exact settings specified in the Profile object.

Private Methods

Method Description
ToJArray ( IEnumerable items ) : string

Converts an array of SteamId64s to an array of the format ["0","1"]

Method Details

AcceptFriendRequest() public method

Accepts a friend request.
public AcceptFriendRequest ( ulong steamId ) : bool
steamId ulong SteamId64 of the person who sent the request.
return bool

AddFriend() public method

Sends a friend request to the specified user.
public AddFriend ( ulong steamId ) : CSharpTradeOffers.Community.AddFriendResponse
steamId ulong SteamId64 of the user to add.
return CSharpTradeOffers.Community.AddFriendResponse

CommunityHandler() public method

public CommunityHandler ( Account account ) : System
account CSharpTradeOffers.Web.Account
return System

DeleteTopic() public method

public DeleteTopic ( ulong forumId, ulong topicId ) : CSharpTradeOffers.Community.DefaultResult
forumId ulong
topicId ulong
return CSharpTradeOffers.Community.DefaultResult

DeleteTopicComment() public method

Used to delete a comment
public DeleteTopicComment ( ulong commentId, ulong topicId, ulong forumId, ulong groupId, CSharpTradeOffers.Community.ForumInfo forumInfo, ulong start, ulong count = 15, bool oldestFirst = false, bool includeRawComments = false ) : CSharpTradeOffers.Community.DeleteTopicCommentResult
commentId ulong The id of the comment
topicId ulong The id of the topic
forumId ulong The id of the forum
groupId ulong
forumInfo CSharpTradeOffers.Community.ForumInfo
start ulong Use if includeRawComments is set. This will specify the comment # to start at.
count ulong The number of comments to grab if includeRawComments is set.
oldestFirst bool Order of the comments
includeRawComments bool Include the comments or not
return CSharpTradeOffers.Community.DeleteTopicCommentResult

EditTopic() public method

public EditTopic ( string title, string text, ulong forumId, ulong topicId ) : CSharpTradeOffers.Community.DefaultResult
title string
text string
forumId ulong
topicId ulong
return CSharpTradeOffers.Community.DefaultResult

GetProfileComments() public method

Gets the profile comments of the specified SteamId64
public GetProfileComments ( ulong steamId, int totalCount, int count, int start ) : GetCommentsResponse
steamId ulong SteamId of the profile to get comments from
totalCount int Number of comments to retrieve
count int The number of comments previously retrieved
start int Starting index
return GetCommentsResponse

GetTopicsHtml() public method

public GetTopicsHtml ( ulong forumId, ulong start, ulong count ) : CSharpTradeOffers.Community.GetTopicsHtmlResult
forumId ulong
start ulong
count ulong
return CSharpTradeOffers.Community.GetTopicsHtmlResult

GroupAnnounce() public method

Posts an announcement to the specified group.
public GroupAnnounce ( string groupName, string headLine, string body ) : IResponse
groupName string Groupname of the steam group.
headLine string The headline of the announcement.
body string The body of the announcement.
return IResponse

GroupEvent() public method

Posts an event to the specified group.
public GroupEvent ( string groupName, string eventName, string eventNotes, string eventType, System.DateTime startDateAndTime, string timeChoice = "quick", string serverPassword = "", IPAddress serverAddress = null, int appId = -1, int timezoneOffset = -18000 ) : IResponse
groupName string Groupname of the steam group.
eventName string The name of the event.
eventNotes string The notes of the event.
eventType string
startDateAndTime System.DateTime
timeChoice string "quick" which means now, or "specific" which means will start at the given date/time.
serverPassword string Password to the server.
serverAddress System.Net.IPAddress
appId int
timezoneOffset int
return IResponse

InviteUserToGroup() public method

Invites the specified user to a group.
public InviteUserToGroup ( ulong steamId, bool json, ulong group ) : CSharpTradeOffers.Community.InviteResponse
steamId ulong The SteamId64 of the person to invite.
json bool I forgot... oops.
group ulong The SteamId64 of the group to invite to.
return CSharpTradeOffers.Community.InviteResponse

InviteUsersToGroup() public method

Invites the specified users to a group.
public InviteUsersToGroup ( ulong steamIds, bool json, ulong group ) : CSharpTradeOffers.Community.MultiInviteResponse
steamIds ulong The SteamId64s of the users to invite.
json bool I forgot... oops.
group ulong The SteamId64 of the group to invite the users to.
return CSharpTradeOffers.Community.MultiInviteResponse

JoinGroup() public method

Join a public group.
public JoinGroup ( string groupName ) : IResponse
groupName string The name of the group found in the group url.
return IResponse

LeaveGroup() public method

Leave a group.
public LeaveGroup ( ulong groupId ) : IResponse
groupId ulong The GroupID of the steam group.
return IResponse

ModerateTopic() public method

public ModerateTopic ( string action, string flag, bool value, ulong forumId, ulong topicId ) : CSharpTradeOffers.Community.ModerateTopicResult
action string
flag string
value bool
forumId ulong
topicId ulong
return CSharpTradeOffers.Community.ModerateTopicResult

PostClanComment() public method

Posts a comment to the specified clan.
public PostClanComment ( ulong clanId, string comment, int count ) : CSharpTradeOffers.Community.ClanCommentResponse
clanId ulong SteamID64 of the clan to post the comment to.
comment string The comment to post.
count int Almost certainly useless and never needs to be touched. /// I assume that it is the member count but it can be null, non-existant, or any number under the sun.
return CSharpTradeOffers.Community.ClanCommentResponse

PostComment() public method

Posts a comment to the specified profile.
public PostComment ( ulong steamId, string comment ) : CSharpTradeOffers.Community.CommentResponse
steamId ulong The SteamId64 of the profile to post to.
comment string The comment text.
return CSharpTradeOffers.Community.CommentResponse

RemoveFriend() public method

Removes a friend.
public RemoveFriend ( ulong steamId ) : bool
steamId ulong SteamId64 of the friend to remove.
return bool

RequestAllMemberLists() public method

Requests group information as well as the all pages of users.
public RequestAllMemberLists ( string groupName, int retryWait, int retryCount = 10 ) : List
groupName string The name of the group to request information about.
retryWait int The number of miliseconds to wait between each retry.
retryCount int The number of times to retry before inserting a null MemberList object.
return List

RequestAllMemberLists() public method

Requests group information as well as all pages of users.
public RequestAllMemberLists ( ulong groupId, int retryWait, int retryCount = 10 ) : List
groupId ulong The SteamId64 of the group to request information about.
retryWait int The number of miliseconds to wait between each retry.
retryCount int The number of times to retry before inserting a null MemberList object.
return List

RequestMemberList() public method

Requests group information as well as the first page of users.
public RequestMemberList ( string groupName ) : CSharpTradeOffers.Community.MemberList
groupName string The name of the group to request information about.
return CSharpTradeOffers.Community.MemberList

RequestMemberList() public method

Requests group information as well as the first page of users.
public RequestMemberList ( ulong groupId ) : CSharpTradeOffers.Community.MemberList
groupId ulong The SteamId64 of the group to request information about.
return CSharpTradeOffers.Community.MemberList

SetPrivacySettings() public method

Sets the privacy settings of the account.
public SetPrivacySettings ( PrivacySettings settings, Account account ) : void
settings PrivacySettings Settings to set.
account CSharpTradeOffers.Web.Account Account of settings to change.
return void

SetProfile() public method

Sets the user's public profile settings to the exact settings specified in the Profile object.
public SetProfile ( Profile profile, Account account ) : bool
profile Profile The object to specify the new profile data.
account CSharpTradeOffers.Web.Account The account of the profile to modify.
return bool