Loading...
Searching...
No Matches
WorkshopCatalogueApi Interface Reference

Static Public Member Functions

static proto WorkshopInitState GetState ()
 Returns current state of the Workshop.
 
static proto void OnReady (BackendCallback callback)
 Sets callback on which:
 
static proto int GetMaxSize ()
 Returns maximum supported size of catalogue for pages/offsets.
 
static proto void SetSize (int size)
 Will set size of catalogue which determines how many items fit into single page/offset.
 
static proto int GetSize ()
 Returns currently set size of catalogue for pages/offsets.
 
static proto void RequestPage (notnull BackendCallback pCallback, int page)
 Will request load of data for specific page of catalogue.
 
static proto void RequestOffset (notnull BackendCallback pCallback, int offset)
 Will request load of data for offset from first item If data are already cached then callback is invoked immediately with this method and no request is sent to the backend.
 
static proto void RequestRefresh (notnull BackendCallback pCallback)
 Will request forced refresh of currently loaded page/offset.
 
static proto void SetFilters (WorkshopCatalogueFilters filters)
 Will set pointer to filters object for the catalogue.
 
static proto WorkshopCatalogueFilters GetFilters ()
 Will return pointer to object of currently applied filters for the catalogue.
 
static proto bool AppendOrderBy (EBackendCatalogueOrderDir orderDir, EWorkshopCatalogueOrderBy orderBy)
 Will append new order by field for sorting catalogue.
 
static proto void ClearOrderBy ()
 Will clear ordering of catalogue list.
 
static proto void GetItems (out notnull array< WorkshopAssetBase > assetsOut)
 Getter for items of currently loaded page/offset.
 
static proto int GetPageCount ()
 Returns count of how many pages of data exists with current configuration of catalogue.
 
static proto int GetPageNumber ()
 Returns index number of currently loaded page.Index 0 is first page.
 
static proto int GetTotalItemCount ()
 Return total count of how many items exists with current configuration of catalogue.
 
static proto int GetOffsetIndex ()
 Returns index number of currently loaded offset - index of first item in offset.
 
static proto int GetCurrentItemCount ()
 Returns count of items on currently loaded page / offset.
 
static proto WorkshopJob GetCurrentJob ()
 Returns currently PREPARING/ACTIVE job or null.
 
static proto void GetQueuedJobs (out notnull array< WorkshopJob > jobsOut)
 Returns array of queued jobs including the active (first item in array).
 
static proto int GetQueuedJobsCount ()
 Returns total count of queued jobs.
 
static proto void PauseAllJobs ()
 Will pause all currently queued and active jobs.
 
static proto void GetPausedJobs (out notnull array< WorkshopJob > jobsOut)
 Returns array of paused jobs.
 
static proto int GetPausedJobsCount ()
 Returns total count of paused jobs.
 
static proto void GetLocalAssets (out notnull array< WorkshopAssetBase > assetsOut)
 Returns list of locally downloaded assets.
 
static proto int GetBlockedAssetsCount ()
 Returns count of how many assets does user have blocked.
 
static proto int GetSubscribedAssetsCount ()
 Returns count of how many assets does user have subscribed.
 
static proto int GetRatedAssetsCount ()
 Returns count of how many assets did user submit some rating.
 

Member Function Documentation

◆ AppendOrderBy()

static proto bool WorkshopCatalogueApi.AppendOrderBy ( EBackendCatalogueOrderDir orderDir,
EWorkshopCatalogueOrderBy orderBy )
static

Will append new order by field for sorting catalogue.

Once field is appended it cannot be reused until clear. You cannot order by more than 3 categories.

Exceptions
VME- if field was already appended for sorting.
  • if you try to exceed limit of categories to order by.
  • if API is disabled for the project.

◆ ClearOrderBy()

static proto void WorkshopCatalogueApi.ClearOrderBy ( )
static

Will clear ordering of catalogue list.

◆ GetBlockedAssetsCount()

static proto int WorkshopCatalogueApi.GetBlockedAssetsCount ( )
static

Returns count of how many assets does user have blocked.

◆ GetCurrentItemCount()

static proto int WorkshopCatalogueApi.GetCurrentItemCount ( )
static

Returns count of items on currently loaded page / offset.

Note
If this value is less that currently configured size of the catalogue then you are at the end.

◆ GetCurrentJob()

static proto WorkshopJob WorkshopCatalogueApi.GetCurrentJob ( )
static

Returns currently PREPARING/ACTIVE job or null.

◆ GetFilters()

static proto WorkshopCatalogueFilters WorkshopCatalogueApi.GetFilters ( )
static

Will return pointer to object of currently applied filters for the catalogue.

Note
Can return null if no filters are set in the catalogue. In that case catalogue will provide all items without any filtering.

◆ GetItems()

static proto void WorkshopCatalogueApi.GetItems ( out notnull array< WorkshopAssetBase > assetsOut)
static

Getter for items of currently loaded page/offset.

◆ GetLocalAssets()

static proto void WorkshopCatalogueApi.GetLocalAssets ( out notnull array< WorkshopAssetBase > assetsOut)
static

Returns list of locally downloaded assets.

Note
List is currently not sorted in any specific way and might change during runtime
Warning
Do not use for listing as pages or scrolling of locally downloaded assets. For this operation we will add filter for local assets so that they can be listed via RequestPage() or RequestOffset().

◆ GetMaxSize()

static proto int WorkshopCatalogueApi.GetMaxSize ( )
static

Returns maximum supported size of catalogue for pages/offsets.

◆ GetOffsetIndex()

static proto int WorkshopCatalogueApi.GetOffsetIndex ( )
static

Returns index number of currently loaded offset - index of first item in offset.

Index 0 is the first item of catalogue. Use alongside RequestOffset() and GetTotalItemCount() to determine if you are at the end.

◆ GetPageCount()

static proto int WorkshopCatalogueApi.GetPageCount ( )
static

Returns count of how many pages of data exists with current configuration of catalogue.

◆ GetPageNumber()

static proto int WorkshopCatalogueApi.GetPageNumber ( )
static

Returns index number of currently loaded page.Index 0 is first page.

Use alongside RequestPage() and GetPageCount() to determine if you are at the end.

◆ GetPausedJobs()

static proto void WorkshopCatalogueApi.GetPausedJobs ( out notnull array< WorkshopJob > jobsOut)
static

Returns array of paused jobs.

Jobs are not sorted in any specific way and priority cannot be changed. Previously unfinished jobs are restored after game launch and init of workshop.

◆ GetPausedJobsCount()

static proto int WorkshopCatalogueApi.GetPausedJobsCount ( )
static

Returns total count of paused jobs.

◆ GetQueuedJobs()

static proto void WorkshopCatalogueApi.GetQueuedJobs ( out notnull array< WorkshopJob > jobsOut)
static

Returns array of queued jobs including the active (first item in array).

Items are sorted by priority and can be changed by WorkshopJob.SetQueuePriority(int priority).

◆ GetQueuedJobsCount()

static proto int WorkshopCatalogueApi.GetQueuedJobsCount ( )
static

Returns total count of queued jobs.

◆ GetRatedAssetsCount()

static proto int WorkshopCatalogueApi.GetRatedAssetsCount ( )
static

Returns count of how many assets did user submit some rating.

◆ GetSize()

static proto int WorkshopCatalogueApi.GetSize ( )
static

Returns currently set size of catalogue for pages/offsets.

◆ GetState()

static proto WorkshopInitState WorkshopCatalogueApi.GetState ( )
static

Returns current state of the Workshop.

Warning
if state is DISABLED then it will not be enabled it might be intentionally globally disabled due to some configuration or due to some unrecoverable error.

◆ GetSubscribedAssetsCount()

static proto int WorkshopCatalogueApi.GetSubscribedAssetsCount ( )
static

Returns count of how many assets does user have subscribed.

Warning
this only counts subscribed and not downloaded.

◆ GetTotalItemCount()

static proto int WorkshopCatalogueApi.GetTotalItemCount ( )
static

Return total count of how many items exists with current configuration of catalogue.

◆ OnReady()

static proto void WorkshopCatalogueApi.OnReady ( BackendCallback callback)
static

Sets callback on which:

  • OnSuccess will be invoked when workshop becomes or is READY.
  • OnError will be invoked when workshop becomes or is DISABLED.
Note
Callback will be invoked only once and then it will never be invoked again because workshop is at that point state which will be kept until application restart.

◆ PauseAllJobs()

static proto void WorkshopCatalogueApi.PauseAllJobs ( )
static

Will pause all currently queued and active jobs.

◆ RequestOffset()

static proto void WorkshopCatalogueApi.RequestOffset ( notnull BackendCallback pCallback,
int offset )
static

Will request load of data for offset from first item If data are already cached then callback is invoked immediately with this method and no request is sent to the backend.

Offset 0 represent first item. Int is casted into uint32.

Note
This method should be used for scrolling UI - there is no fixed position where page begins and ends. It can be used even for paging UI implementation but it is recommended to use RequestPage() method for simplicity.
Exceptions
VME- if size was not yet set via SetSize()

◆ RequestPage()

static proto void WorkshopCatalogueApi.RequestPage ( notnull BackendCallback pCallback,
int page )
static

Will request load of data for specific page of catalogue.

If data are already cached then callback is invoked immediately with this method and no request is sent to the backend.

Pages are indexed from 0. Int is casted into uint32.

Note
This method should be used for paging UI where single page with fixed size and offset is visible at the time. It should not be used for scrolling implementation which can possibly show items from 2 pages at once which can introduce issues.
Exceptions
VME- if size was not yet set via SetSize()

◆ RequestRefresh()

static proto void WorkshopCatalogueApi.RequestRefresh ( notnull BackendCallback pCallback)
static

Will request forced refresh of currently loaded page/offset.

Items will be cleared from cache and created again from received data which might be possibly different.

Exceptions
VME- if size was not yet set via SetSize()

◆ SetFilters()

static proto void WorkshopCatalogueApi.SetFilters ( WorkshopCatalogueFilters filters)
static

Will set pointer to filters object for the catalogue.

Filters should be set only once at the beginning and then you can just modify local instance of filters. If set to null then WorkshopCatalogueApi will provide all assets without any filtering.

◆ SetSize()

static proto void WorkshopCatalogueApi.SetSize ( int size)
static

Will set size of catalogue which determines how many items fit into single page/offset.

Note
Configured size must correspond with how many items can be visible in UI at once for optimal functionality of WorkshopCatalogueApi. This will clear cache so UI should be also cleared and request new data,

The documentation for this interface was generated from the following file: