steamworks/FileInfo

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
 
{{Func
 
{{Func
 
|Description=Retrieves info about supplied Steam Workshop addon.
 
|Description=Retrieves info about supplied Steam Workshop addon.
 +
 +
{{NextUpdate|Will also return vote info.}}
 
|Realm=Client and Menu
 
|Realm=Client and Menu
 
|IsClass=No
 
|IsClass=No
Line 16: Line 18:
 
}}
 
}}
 
{{Example
 
{{Example
|Description=Retries all info of gm_construct_Beta Steam Workshop addon.
+
|Description=Retrieves all info of the "Wiremod" Steam Workshop addon.
|Code=steamworks.FileInfo( 21197, function( result ) PrintTable( result ) end)
+
|Code=steamworks.FileInfo( 160250458, function( result ) PrintTable( result ) end)
 
|OutputFixedWidth=Fixed width
 
|OutputFixedWidth=Fixed width
|Output=created = 1333727232
+
|Output=banned = false
description = "removed, too long"
+
children = {}
tags = fun, water, map, build
+
created = 1373845248
id = 21197
+
description = "too long, removed"
owner = 76561198017133973
+
disabled = false
previewsize = 213278
+
fileid = 763849701485673437
previewid = 559813303754221947
+
id = 160250458
updated = 1347588992
+
installed = false
ownername = HighVoltage
+
owner = 76561198096613988
title = Gm_construct_Beta
+
ownername = WireTeam
disabled = false
+
previewid = 597008945885476119
installed = true
+
previewsize = 36221
banned = false
+
size = 7375691
size = 12060498
+
tags = Addon,tool,Build,Fun
fileid = 596981587425748684
+
title = Wiremod
 +
updated = 1571560576
 +
 
 +
score = 0.92941749095917
 +
total = 49119
 +
up = 45695
 +
down = 3424
 
}}
 
}}

Latest revision as of 17:21, 27 November 2019

 steamworks.FileInfo( )

Contents

Description

Retrieves info about supplied Steam Workshop addon.


Next Update Change

Will also return vote info.

Arguments

string workshopItemID

The ID of Steam Workshop item.

Arguments

function resultCallback

The function to process retrieved data, with the following arguments:

Examples

Example

Retrieves all info of the "Wiremod" Steam Workshop addon.

steamworks.FileInfo( 160250458, function( result ) PrintTable( result ) end)

Output:

banned	=	false
children = {}
created	=	1373845248
description	=	"too long, removed"
disabled	=	false
fileid	=	763849701485673437
id	=	160250458
installed	=	false
owner	=	76561198096613988
ownername	=	WireTeam
previewid	=	597008945885476119
previewsize	=	36221
size	=	7375691
tags	=	Addon,tool,Build,Fun
title	=	Wiremod
updated	=	1571560576

score	=	0.92941749095917
total	=	49119
up	=	45695
down	=	3424
Personal tools
Navigation