<a id=“SuperOffice_WebApi_Agents_IFavouriteAgent”></a> Interface IFavouriteAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll Agent used for retrieveing and setting favourites
Implements
IAgentBase, IDisposableMethods
<a id=“SuperOffice_WebApi_Agents_IFavouriteAgent_AddFavouriteAsync_System_String_System_Int32_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> AddFavouriteAsync(string, int, int, string, RequestOptions)
Add a record in a table as a favourite for an associateParameters
tableName string
Table name, transformed to and from numeric table id by the service layer.
recordId int
Id of a record in your specified table (tableName)
associateId int
Id of a current user
extraInfo string
Any extra information
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return value<a id=“SuperOffice_WebApi_Agents_IFavouriteAgent_AddFavouritesAsync_System_String_System_Int32___System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> AddFavouritesAsync(string, int[], int, string, RequestOptions)
Add a list of record ids as favourites for an associateParameters
tableName string
Table name, transformed to and from numeric table id by the service layer.
recordIds int[]
Ids of records in your specified table (tableName). Corresponding rows will be added as Favourites.
associateId int
Id of a current user
extraInfo string
Any extra information
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return value<a id=“SuperOffice_WebApi_Agents_IFavouriteAgent_AddTicketsToFavouritesByProviderAsync_System_String_SuperOffice_WebApi_Data_ArchiveRestrictionInfo___System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> AddTicketsToFavouritesByProviderAsync(string, ArchiveRestrictionInfo[], int, string, RequestOptions)
Add a list of tickets as favourites that are given by the ticket provider.Parameters
providerName string
Name of a ticket provider
restrictions ArchiveRestrictionInfo[]
Query restrictions to be added to provider. Fixed providers, such as LastTicketsProvider, FavouriteTicketsProvider etc. already have mandatory restrictions setup - in such case extra restrictions will be combined, however for general use case for fixed providers you can pass an empty array and provider will return default results. For selection providers generally you should pass selectionId as a restriction.
associateId int
Id of a current user
extraInfo string
Any extra information
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return value<a id=“SuperOffice_WebApi_Agents_IFavouriteAgent_GetFavouritesAsync_System_String_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetFavouritesAsync(string, int, RequestOptions)
Get all favourites for a table and associateParameters
tableName string
Table name, transformed to and from numeric table id by the service layer.
associateId int
Id of a current user
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<Favourite[]> Requested favourites for a table and associate<a id=“SuperOffice_WebApi_Agents_IFavouriteAgent_IsFavouriteAsync_System_String_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> IsFavouriteAsync(string, int, int, RequestOptions)
Checks if a record in a table is a favourite for an associateParameters
tableName string
Table name, transformed to and from numeric table id by the service layer.
recordId int
Id of a record in your specified table (tableName)
associateId int
Id of a current user
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool> Is Favourite?<a id=“SuperOffice_WebApi_Agents_IFavouriteAgent_RemoveAllFavouritesAsync_System_String_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> RemoveAllFavouritesAsync(string, int, RequestOptions)
Remove all favourites for a table and associateParameters
tableName string
Table name, transformed to and from numeric table id by the service layer.
associateId int
Id of a current user
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return value<a id=“SuperOffice_WebApi_Agents_IFavouriteAgent_RemoveFavouriteAsync_System_String_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> RemoveFavouriteAsync(string, int, int, RequestOptions)
Remove favourite for a table, record id and associateParameters
tableName string
Table name, transformed to and from numeric table id by the service layer.
recordId int
Id of a record in your specified table (tableName)
associateId int
Id of a current user
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return value<a id=“SuperOffice_WebApi_Agents_IFavouriteAgent_RemoveFavouritesAsync_System_String_System_Int32___System_Int32_SuperOffice_WebApi_RequestOptions_”></a> RemoveFavouritesAsync(string, int[], int, RequestOptions)
Remove a list of record ids from favourites for an associateParameters
tableName string
Table name, transformed to and from numeric table id by the service layer.
recordIds int[]
Ids of records in your specified table (tableName). Corresponding rows will be removed from Favourites.
associateId int
Id of a current user
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return value<a id=“SuperOffice_WebApi_Agents_IFavouriteAgent_RemoveFavouritesByIdAsync_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> RemoveFavouritesByIdAsync(int[], RequestOptions)
Remove favourite using favourite idParameters
favouriteIds int[]
Ids of favourite rows to delete
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return value<a id=“SuperOffice_WebApi_Agents_IFavouriteAgent_RemoveTicketsFromFavouritesByProviderAsync_System_String_SuperOffice_WebApi_Data_ArchiveRestrictionInfo___System_Int32_SuperOffice_WebApi_RequestOptions_”></a> RemoveTicketsFromFavouritesByProviderAsync(string, ArchiveRestrictionInfo[], int, RequestOptions)
Remove a list of tickets from favourites that are given by the ticket provider.Parameters
providerName string
Name of a ticket provider
restrictions ArchiveRestrictionInfo[]
Query restrictions to be added to provider. Fixed providers, such as LastTicketsProvider, FavouriteTicketsProvider etc. already have mandatory restrictions setup - in such case extra restrictions will be combined, however for general use case for fixed providers you can pass an empty array and provider will return default results. For selection providers generally you should pass selectionId as a restriction.
associateId int
Id of a current user
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return value<a id=“SuperOffice_WebApi_Agents_IFavouriteAgent_ToggleFavouriteAsync_System_String_System_Int32_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> ToggleFavouriteAsync(string, int, int, string, RequestOptions)
Toggle a record in a table as a favourite for an associateParameters
tableName string
Table name, transformed to and from numeric table id by the service layer.
recordId int
Id of a record in your specified table (tableName)
associateId int
Id of a current user
extraInfo string
Any extra information
requestOptions RequestOptions
Override language/culture codes on this request.