/// <summary> /// Calls a specific GET method on whatever interface this class represents. For example "IsPlayingSharedGame" is a method on the "PlayerService" web interface. /// </summary> /// <typeparam name="T">The type to parse the JSON response into and return</typeparam> /// <param name="methodName">The method name to call</param> /// <param name="version">The version of the method to call</param> /// <param name="parameters">An optional list of parameters to include with the call</param> /// <returns></returns> public async Task <ISteamWebResponse <T> > GetAsync <T>(string methodName, int version, IList <SteamWebRequestParameter> parameters = null) { Debug.Assert(!String.IsNullOrWhiteSpace(methodName)); Debug.Assert(version > 0); return(await steamWebRequest.GetAsync <T>(interfaceName, methodName, version, parameters)); }
/// <summary> /// Calls a specific GET method on whatever interface this class represents. For example "IsPlayingSharedGame" is a method on the "PlayerService" web interface. /// </summary> /// <typeparam name="T">The type to parse the JSON response into and return</typeparam> /// <param name="methodName">The method name to call</param> /// <param name="version">The version of the method to call</param> /// <param name="parameters">An optional list of parameters to include with the call</param> /// <returns></returns> public async Task <ISteamWebResponse <T> > GetAsync <T>(string methodName, int version, IList <SteamWebRequestParameter> parameters = null) { if (string.IsNullOrWhiteSpace(methodName)) { throw new ArgumentNullException(nameof(methodName)); } if (version <= 0) { throw new ArgumentOutOfRangeException(nameof(version)); } return(await steamWebRequest.GetAsync <T>(interfaceName, methodName, version, parameters)); }