Skip to content

Commit 772a7d2

Browse files
committed
Update steamworks-rs and add playtime tracking methods to client.d.ts
1 parent 2a363b8 commit 772a7d2

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ napi = { version = "2.16.8", features = ["tokio_rt", "napi6", "serde-json"] }
1111
napi-derive = "2.16.9"
1212
lazy_static = "1"
1313
tokio = { version = "1", features = ["sync", "time"] }
14-
steamworks = { git = "https://github.com/Noxime/steamworks-rs/", rev = "40a457a61f5ef714d93804e51e0c5e3d405145a3", features = ["serde"] }
14+
steamworks = { git = "https://github.com/Noxime/steamworks-rs/", rev = "b1ec75c5156c905a00292aee0292e17ddb99ef7c", features = ["serde"] }
1515
serde = "1"
1616
serde_json = "1"
1717

client.d.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,4 +600,38 @@ export declare namespace workshop {
600600
export function getItems(items: Array<bigint>, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopItemsResult>
601601
export function getAllItems(page: number, queryType: UGCQueryType, itemType: UGCType, creatorAppId: number, consumerAppId: number, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopPaginatedResult>
602602
export function getUserItems(page: number, accountId: number, listType: UserListType, itemType: UGCType, sortOrder: UserListOrder, appIds: AppIDs, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopPaginatedResult>
603+
/**
604+
* Start tracking playtime on a set of workshop items.
605+
*
606+
* When your app shuts down, playtime tracking will automatically stop.
607+
*
608+
* @param itemIds - The array of workshop items you want to start tracking. (Maximum of 100 items.)
609+
* @returns Promise that resolves when the operation completes
610+
*
611+
* {@link https://partner.steamgames.com/doc/api/ISteamUGC#StartPlaytimeTracking}
612+
*/
613+
export function startPlaytimeTracking(itemIds: Array<bigint>): Promise<void>
614+
/**
615+
* Stop tracking playtime on a set of workshop items.
616+
*
617+
* This will increment the number of "playtime" sessions for those items by one.
618+
* When your app shuts down, playtime tracking will automatically stop.
619+
*
620+
* @param itemIds - The array of workshop items you want to stop tracking. (Maximum of 100 items.)
621+
* @returns Promise that resolves when the operation completes
622+
*
623+
* {@link https://partner.steamgames.com/doc/api/ISteamUGC#StopPlaytimeTracking}
624+
*/
625+
export function stopPlaytimeTracking(itemIds: Array<bigint>): Promise<void>
626+
/**
627+
* Stop tracking playtime of all workshop items.
628+
*
629+
* When your app shuts down, playtime tracking will automatically stop.
630+
* This will increment the number of "playtime" sessions for all items that were being tracked by one.
631+
*
632+
* @returns Promise that resolves when the operation completes
633+
*
634+
* {@link https://partner.steamgames.com/doc/api/ISteamUGC#StopPlaytimeTrackingForAllItems}
635+
*/
636+
export function stopPlaytimeTrackingForAllItems(): Promise<void>
603637
}

0 commit comments

Comments
 (0)