ArchiSteamFarm/IPC/Controllers/Api/StorageController.cs
/// <summary>
///     Loads entry under specified key from ASF's persistent KeyValue JSON storage.
/// </summary>
Loads entry under specified key from ASF's persistent KeyValue JSON storage.
Loads entry under specified key from ASF ' s persistent KeyValue JSON storage .
[HttpGet]
	[ProducesResponseType(typeof(GenericResponse<JToken>), (int) HttpStatusCode.OK)]
	public ActionResult<GenericResponse> StorageGet(string key) {
		if (string.IsNullOrEmpty(key)) {
			throw new ArgumentNullException(nameof(key));
		}
		if (ASF.GlobalDatabase == null) {
			throw new InvalidOperationException(nameof(ASF.GlobalDatabase));
		}
		JToken? value = ASF.GlobalDatabase.LoadFromJsonStorage(key);
		return Ok(new GenericResponse<JToken>(true, value));
	}
[ HttpGet ] [ ProducesResponseType ( typeof ( GenericResponse < JToken > ) , ( int ) HttpStatusCode . OK ) ] public ActionResult < GenericResponse > StorageGet ( string key ) { if ( string . IsNullOrEmpty ( key ) ) { throw new ArgumentNullException ( nameof ( key ) ) ; } if ( ASF . GlobalDatabase == null ) { throw new InvalidOperationException ( nameof ( ASF . GlobalDatabase ) ) ; } JToken ? value = ASF . GlobalDatabase . LoadFromJsonStorage ( key ) ; return Ok ( new GenericResponse < JToken > ( true , value ) ) ; }
Loads entry under specified key from ASF's persistent KeyValue JSON storage.
Loads entry under specified key from ASF ' s persistent KeyValue JSON storage .
key
string