mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Closes #2012
This commit is contained in:
@@ -366,6 +366,20 @@ namespace ArchiSteamFarm {
|
||||
return success ? !string.IsNullOrEmpty(steamApiKey) : null;
|
||||
}
|
||||
|
||||
[PublicAPI]
|
||||
public async Task<bool> JoinGroup(ulong groupID) {
|
||||
if ((groupID == 0) || !new SteamID(groupID).IsClanAccount) {
|
||||
throw new ArgumentOutOfRangeException(nameof(groupID));
|
||||
}
|
||||
|
||||
string request = "/gid/" + groupID;
|
||||
|
||||
// Extra entry for sessionID
|
||||
Dictionary<string, string> data = new(2, StringComparer.Ordinal) { { "action", "join" } };
|
||||
|
||||
return await UrlPostWithSession(SteamCommunityURL, request, data: data, session: ESession.CamelCase).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[PublicAPI]
|
||||
public async Task<(bool Success, HashSet<ulong>? MobileTradeOfferIDs)> SendTradeOffer(ulong steamID, IReadOnlyCollection<Steam.Asset>? itemsToGive = null, IReadOnlyCollection<Steam.Asset>? itemsToReceive = null, string? token = null, bool forcedSingleOffer = false, ushort itemsPerTrade = Trading.MaxItemsPerTrade) {
|
||||
if ((steamID == 0) || !new SteamID(steamID).IsIndividualAccount) {
|
||||
@@ -2207,19 +2221,6 @@ namespace ArchiSteamFarm {
|
||||
return true;
|
||||
}
|
||||
|
||||
internal async Task<bool> JoinGroup(ulong groupID) {
|
||||
if ((groupID == 0) || !new SteamID(groupID).IsClanAccount) {
|
||||
throw new ArgumentOutOfRangeException(nameof(groupID));
|
||||
}
|
||||
|
||||
string request = "/gid/" + groupID;
|
||||
|
||||
// Extra entry for sessionID
|
||||
Dictionary<string, string> data = new(2, StringComparer.Ordinal) { { "action", "join" } };
|
||||
|
||||
return await UrlPostWithSession(SteamCommunityURL, request, data: data, session: ESession.CamelCase).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
internal async Task MarkInventory() {
|
||||
if (ASF.InventorySemaphore == null) {
|
||||
throw new InvalidOperationException(nameof(ASF.InventorySemaphore));
|
||||
|
||||
Reference in New Issue
Block a user