Method HIUGCSpawnAsset
HIUGCSpawnAsset(String, String, Object, APIContentType)
API for creating new assets.
Declaration
public System.Threading.Tasks.Task<Den.Dev.Grunt.Models.HaloApiResultContainer<Den.Dev.Grunt.Models.HaloInfinite.AuthoringAsset,Den.Dev.Grunt.Models.RawResponseContainer>> HIUGCSpawnAsset (string title, string assetType, object? asset = default, Den.Dev.Grunt.Models.APIContentType contentType = Den.Dev.Grunt.Models.APIContentType.BondCompactBinary);
Parameters
Type | Name | Description |
---|---|---|
System.String | title | Title for the game for which the authoring session needs to be spawned. Example variant is "hi" for "Halo Infinite". |
System.String | assetType | Type of asset to check. Example value is "UgcGameVariants", "Maps", or "Prefabs". |
System.Object | asset | Asset definition, containing information about the asset to be created. |
APIContentType | contentType | Content type to be used for the request. Default value uses the Bond encoding. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<HaloApiResultContainer<AuthoringAsset,RawResponseContainer>> | If successful, returns an instance of AuthoringAsset containing asset information. Otherwise, returns null. |
Remarks
This API is used to create new assets in the user's file browser. The game generally uses Bond-encoded requests, so it's
still up to discovery to figure out what the values for the POST request are.
TODO: Need to figure out what the actual data model is for the POST request.
Examples
Here is an example response from the API, as snapshotted on 7/18/2022:
{
"AssetId": "935cb8fb-d39c-40aa-9704-4c54a5346145",
"Kind": 6,
"OriginalOwner": "xuid(PLAYER_XUID_HERE)",
"Admin": "xuid(PLAYER_XUID_HERE)",
"LastModifiedDateUtc": {
"ISO8601Date": "2022-07-19T05:23:41.041Z"
},
"CreatedDateUtc": {
"ISO8601Date": "2022-07-19T05:23:41.036Z"
},
"InternalName": "Attrition-AttritionFFAS2EventShottySnipes-UGC",
"Description": "",
"HardDeleteTimeUtc": null,
"Permissions": [
{
"CanonicalToken": "xuid(PLAYER_XUID_HERE)",
"AuthoringRole": 6,
"GrantedBy": "the_guardians",
"GrantedOnDateUtc": {
"ISO8601Date": "2022-07-19T05:23:41.036Z"
}
}
],
"AssetStats": {
"Favorites": 0,
"FilmBookmarks": 0,
"Likes": 0,
"Ratings": {
"AverageRating": 0.0,
"TotalCount": 0,
"Ratings": []
},
"ParentAssetCount": 0,
"LastModifiedDateUtc": {
"ISO8601Date": ""
},
"IgnoreReports": false
},
"AssetHome": 2,
"IsCurrentlyBeingEdited": false
}