mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-27 15:15:51 +03:00
FetchItem to QueryFileAsync
This commit is contained in:
parent
c6ac47c0c3
commit
6c0e3df84c
@ -105,7 +105,7 @@ public async Task QueryGarry()
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task QuerySpecificFile()
|
public async Task QuerySpecificFile()
|
||||||
{
|
{
|
||||||
var item = await SteamUGC.FetchItem( 1734427277 );
|
var item = await SteamUGC.QueryFileAsync( 1734427277 );
|
||||||
|
|
||||||
Assert.IsTrue( item.HasValue );
|
Assert.IsTrue( item.HasValue );
|
||||||
Assert.IsNotNull( item.Value.Title );
|
Assert.IsNotNull( item.Value.Title );
|
||||||
|
@ -49,7 +49,7 @@ public static bool Download( PublishedFileId fileId, bool highPriority = false )
|
|||||||
/// Utility function to fetch a single item. Internally this uses Ugc.FileQuery -
|
/// Utility function to fetch a single item. Internally this uses Ugc.FileQuery -
|
||||||
/// which you can use to query multiple items if you need to.
|
/// which you can use to query multiple items if you need to.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task<Ugc.Item?> FetchItem( PublishedFileId fileId )
|
public static async Task<Ugc.Item?> QueryFileAsync( PublishedFileId fileId )
|
||||||
{
|
{
|
||||||
var result = await new Ugc.FileQuery( fileId )
|
var result = await new Ugc.FileQuery( fileId )
|
||||||
.GetPageAsync( 1 );
|
.GetPageAsync( 1 );
|
||||||
|
Loading…
Reference in New Issue
Block a user