Class ArchetypeService

Inheritance Relationships

Base Type

Class Documentation

class ArchetypeService : public axr::sdk::ServiceBase<ArchetypeDefinition>

Public Functions

inline ArchetypeService(std::shared_ptr<Configuration> config, std::shared_ptr<net::IApiClient> apiClient)
inline ~ArchetypeService()
pplx::task<std::vector<std::shared_ptr<ArchetypeDefinition>>> FindAll(const utility::string_t &personaUid, const std::map<utility::string_t, utility::string_t> *searchParams = nullptr, const uint16_t startIndex = 0, const uint16_t maxResults = 1000, const utility::string_t &sortBy = _XPLATSTR(""))

Retrieves a list of all archetypes that the given persona has activated.

Parameters
  • personaUid – The unique identifier of the persona whose archetypes will be returned.

  • searchParams – A map of property names to values to search for.

  • startIndex – The index of the first object to include in the result.

  • maxResults – The maximum number of objects to evaluate during the search.

  • sortBy – The property name and order direction to sort the results using. (e.g. “MyProperty=ASC” to sort by MyProperty in ascending order, “MyProperty=DESC” to sort by MyProperty in descending order).

Returns

A task whose result is a list of objects matching the specified search parameters.

pplx::task<void> DeactivateAll(const utility::string_t &personaUid)

Stops tracking all progress for all archetypes and persona.

Parameters

personaUid – The unique identifier of the persona whose archetypes will be deactivated.

Returns

A task.

pplx::task<uint64_t> Count(const utility::string_t &personaUid, const std::map<utility::string_t, utility::string_t> *searchParams = nullptr, const uint16_t startIndex = 0, const uint16_t maxResults = 1000)

Returns the count of archetypes that a persona has activated.

Parameters
  • personaUid – The unique identifier of the persona whose archetypes will be counted.

  • searchParams – A map of property names to values to search for.

  • startIndex – The index of the first object to include in the result.

  • maxResults – The maximum number of objects to evaluate during the search. Value cannot exceed 1000.

Returns

A task whose result is the number of objects matching the specified search parameters.

pplx::task<std::shared_ptr<ArchetypeDefinition>> FindById(const utility::string_t &personaUid, const utility::string_t &archetypeUid)

Retrieves an instance of ArchetypeDefinition with the specified unique identifier.

Parameters
  • personaUid – The unique identifier of the persona.

  • archetypeUid – The unique identifier of the archetype.

Returns

A task whose result is the object with the specified identifier if found.

pplx::task<void> Deactivate(const utility::string_t &personaUid, const utility::string_t &archetypeUid)

Stops tracking all progress for the given archetype and persona.

Parameters
  • personaUid – The unique identifier of the persona.

  • archetypeUid – The unique identifier of the archetype.

Returns

A task.

pplx::task<void> Toggle(const utility::string_t &personaUid, const utility::string_t &archetypeUid, std::shared_ptr<ArchetypeActivation> obj)

Toggles the activation state of all skill progress for a given archetype and persona.

Parameters
  • personaUid – The unique identifier of the persona.

  • archetypeUid – The unique identifier of the archetype.

  • obj – The activation state to toggle the archetype to.

Returns

A task.

Public Static Functions

static inline const utility::char_t *ClassName()

Returns the fully qualified name of the class.