Class ServiceBase#

Inheritance Relationships#

Derived Types#

Class Documentation#

class xbe.sdk.ServiceBase#

Provides a common abstract base class for all Service utility classes.

Subclassed by xbe.sdk.QuestDefinitionService, xbe.sdk.Services.AccessControlListService, xbe.sdk.Services.AchievementDefinitionService, xbe.sdk.Services.AchievementService, xbe.sdk.Services.ArchetypeDefinitionService, xbe.sdk.Services.ArchetypeService, xbe.sdk.Services.AssetService, xbe.sdk.Services.AssetStorageLocationService, xbe.sdk.Services.AuthBasicService, xbe.sdk.Services.AuthEmailService, xbe.sdk.Services.AuthOAuthService, xbe.sdk.Services.AuthPhoneService, xbe.sdk.Services.AuthSteamService, xbe.sdk.Services.AuthTokenService, xbe.sdk.Services.AuthTotpService, xbe.sdk.Services.AuthXsollaService, xbe.sdk.Services.BackupService, xbe.sdk.Services.BackupStorageLocationService, xbe.sdk.Services.ContactService, xbe.sdk.Services.EventService, xbe.sdk.Services.LaunchProfileService, xbe.sdk.Services.LeaderboardRecordService, xbe.sdk.Services.LeaderboardService, xbe.sdk.Services.MailService, xbe.sdk.Services.MessageService, xbe.sdk.Services.OAuthClientService, xbe.sdk.Services.OAuthProviderService, xbe.sdk.Services.OAuthService, xbe.sdk.Services.OrderService, xbe.sdk.Services.OrganizationService, xbe.sdk.Services.PaymentService, xbe.sdk.Services.PersonaResourceService, xbe.sdk.Services.PersonaService, xbe.sdk.Services.PersonaStatDefinitionService, xbe.sdk.Services.PersonaStatService, xbe.sdk.Services.ProductCategoryService, xbe.sdk.Services.ProductFeatureService, xbe.sdk.Services.ProductService, xbe.sdk.Services.ProfileService, xbe.sdk.Services.PromoCodeService, xbe.sdk.Services.PurchaseService, xbe.sdk.Services.PurchaseValidationService, xbe.sdk.Services.QuestService, xbe.sdk.Services.RelationshipService, xbe.sdk.Services.ResourceService, xbe.sdk.Services.RestoreService, xbe.sdk.Services.RoleService, xbe.sdk.Services.ScalingPolicyService, xbe.sdk.Services.ScriptService, xbe.sdk.Services.ServerInstanceService, xbe.sdk.Services.SessionService, xbe.sdk.Services.ShardService, xbe.sdk.Services.SkillService, xbe.sdk.Services.SnapshotService, xbe.sdk.Services.SystemService, xbe.sdk.Services.TicketService, xbe.sdk.Services.TransactionService, xbe.sdk.Services.UserSecretService, xbe.sdk.Services.UserService, xbe.sdk.SkillDefinitionService, xbe.sdk.ZoneService

Public Functions

ServiceBase ()#

Properties

string Path { get; set; }#

The compiled url path.

Protected Functions

Task<List<T>> FindAll<T> (Dictionary<string, string> query = null)#

Returns all entities from the system that the user has access to.

Tparam T:

Entity Type

Param Path:

Service URL path

Param query:

The optional map containing the query parameters that will be appended to the url.

Return:

Task with result of a List of all Entities

Task<List<T>> FindAll<T> (string path, Dictionary<string, string> query = null)

Returns all entities from the system that the user has access to.

Tparam T:

Entity Type

Param Path:

Service URL path

Param query:

The optional map containing the query parameters that will be appended to the url.

Return:

Task with result of a List of all Entities

Task<T> Create<T> (Object obj, Dictionary<string, string> query = null, Dictionary<string, string> headers = null)#

Creates a new instance of T, storing the object on the remote service and returning the final result.

Tparam T:

Entity Type

Param Path:

Service URL path

Param query:

The optional map containing the query parameters that will be appended to the url.

Return:

Task with resulting created Entity

Task<T> Create<T> (string path, Object obj, Dictionary<string, string> query = null, Dictionary<string, string> headers = null)

Creates a new instance of T, storing the object on the remote service and returning the final result.

Tparam T:

Entity Type

Param Path:

Service URL path

Param query:

The optional map containing the query parameters that will be appended to the url.

Return:

Task with resulting created Entity

Task<long?> CountInternal (Dictionary<string, string> query = null)#

Retrieves the Entities Count based on the given criteria.

Return:

Entity Count

Task<long?> CountInternal (string path, Dictionary<string, string> query = null)

Retrieves the Entities Count based on the given criteria.

Return:

Entity Count

Task<long?> CountLegacy<T> (Dictionary<string, string> query = null, Dictionary<string, string> headers = null)#

Retrieves the Entities Count based on the given criteria.

Return:

Entity Count

Task<T> FindById<T> (Guid id)#

Retrieves an Entity by ID.

Tparam T:

Entity Type

Param id:

Id of the entity retrieved

Return:

Task with result of Entity related to given ID

Task<T> FindById<T> (string url)

Retrieves an Entity by ID.

Tparam T:

Entity Type

Param id:

Id of the entity retrieved

Return:

Task with result of Entity related to given ID

Task<T> Update<T> (Guid id, T obj)#

Updates an Entity by ID.

Tparam T:

Entity Type

Param id:

Id of the entity updated

Param obj:

Entity Updated

Return:

Task with result Updated Entity related to given ID

Task<T> Update<T> (string path, T obj)

Updates an Entity by ID.

Tparam T:

Entity Type

Param id:

Id of the entity updated

Param obj:

Entity Updated

Return:

Task with result Updated Entity related to given ID

Task<T> Get<T> (string url)#
Tparam T:

Param url:

Return:

Task<T> Get<T> (string url, string id)
Tparam T:

Param url:

Return:

Task DeleteInternal (string id)#

Deletes an instance of T with the specified unique identifier.

Return:

Task

Task TruncateInternal (Dictionary<string, string> query = null)#

Deletes all Entities from the service.

Return:

Task

Protected Attributes

IAPIClient apiClient#
Configuration config#

Protected Static Functions

Dictionary<string, string> CreateAccessTokenQuery (string accessToken)#

Get query for auth/connect if you already have the accessToken (via 3rd-party SDK).

Param accessToken:

The final, authenticated token to allow S2S requests

Return:

Returns { access_token }