CSharpTradeOffers.Community.CommunityHandler.InviteUserToGroup C# (CSharp) Method

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
        public InviteResponse InviteUserToGroup(ulong steamId, bool json, ulong group)
        {
            const string url = "https://steamcommunity.com/actions/GroupInvite/";

            string sessionid =
                (from Cookie cookie in _account.AuthContainer.GetCookies(new Uri("https://steamcommunity.com"))
                 where cookie.Name == "sessionid"
                 select cookie.Value).FirstOrDefault();

            var data = new Dictionary<string, string>
            {
                {"json", json.IntValue().ToString()},
                {"type", "groupInvite"},
                {"group", group.ToString()},
                {"sessionID", sessionid},
                {"invitee", steamId.ToString()}
            };
            return _web.Fetch(url, "POST", data, _account.AuthContainer).DeserializeJson<InviteResponse>();
        }