Interface IMetadataApi
Metadata related APIs.
Namespace: Microsoft.XboxStudios.SQTech.Roster.Client
Assembly: Microsoft.XboxStudios.SQTech.Roster.Client.Common.dll
Syntax
public interface IMetadataApi
Methods
View SourceCreateItem(IMetadataItem, Scope)
Creates an new metadata item.
Declaration
IApiRequest CreateItem(IMetadataItem item, Scope scope)
Parameters
Type | Name | Description |
---|---|---|
IMetadataItem | item | The item to create in Roster. |
Scope | scope | The scope of the item. |
Returns
Type | Description |
---|---|
IApiRequest | A task representing the work to create an item. |
DeleteItem(IMetadataItem, Scope, Boolean)
Deletes a metadata item.
Declaration
IApiRequest DeleteItem(IMetadataItem item, Scope scope, bool ignoreNotFoundException = false)
Parameters
Type | Name | Description |
---|---|---|
IMetadataItem | item | The metadata item to delete. |
Scope | scope | The scope of the item. |
System.Boolean | ignoreNotFoundException | True to ignore throwing RosterMetadataItemNotFoundException. Otherwise false. |
Returns
Type | Description |
---|---|
IApiRequest | A task representing the work to delete a metadata item. |
GetItemByName<TOut>(String, String, Scope)
Gets a metadata item by name.
Declaration
IApiRequest<TOut> GetItemByName<TOut>(string name, string containerName, Scope scope)
where TOut : IMetadataItem, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the metadata item. |
System.String | containerName | The item container to query. |
Scope | scope | The scope of the item. |
Returns
Type | Description |
---|---|
IApiRequest<TOut> | A enumeration of objects. |
Type Parameters
Name | Description |
---|---|
TOut | The type in which to deserialize the response. |
GetItemsByContainer<TOut>(String, Scope)
Gets metadata items by container.
Declaration
IApiRequest<IEnumerable<TOut>> GetItemsByContainer<TOut>(string containerName, Scope scope)
where TOut : IMetadataItem, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | containerName | The item container to query. |
Scope | scope | The scope of the item. |
Returns
Type | Description |
---|---|
IApiRequest<IEnumerable<TOut>> | A enumeration of metadata items. |
Type Parameters
Name | Description |
---|---|
TOut | The type in which to deserialize the response. |
GetItemsByOwner<TOut>(String, Scope)
Gets metadata items by owner.
Declaration
IApiRequest<IEnumerable<TOut>> GetItemsByOwner<TOut>(string containerName, Scope scope)
where TOut : IMetadataItem, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | containerName | The item container to query. |
Scope | scope | The scope of the item. |
Returns
Type | Description |
---|---|
IApiRequest<IEnumerable<TOut>> | A enumeration of metadata items. |
Type Parameters
Name | Description |
---|---|
TOut | The type in which to deserialize the response. |
UpdateItem(IMetadataItem, Scope)
Updates an item.
Declaration
IApiRequest UpdateItem(IMetadataItem item, Scope scope)
Parameters
Type | Name | Description |
---|---|---|
IMetadataItem | item | The item to set. This value must inherit from IMetadataItem. |
Scope | scope | The scope of the item. |
Returns
Type | Description |
---|---|
IApiRequest | The original object with its updated metadata. |
UpdateOrCreateItem(IMetadataItem, Scope)
Updates the provided item if it exists. Otherwise it is created.
Declaration
IApiRequest UpdateOrCreateItem(IMetadataItem item, Scope scope)
Parameters
Type | Name | Description |
---|---|---|
IMetadataItem | item | The item to set. This value must inherit from IMetadataItem. |
Scope | scope | The scope of the item. |
Returns
Type | Description |
---|---|
IApiRequest | The original object with its updated metadata. |