This is a documentation for the AssistiveCards SDK, this module will be accessible from anywhere in game, C# sdk for assistivecards api
Returns an object of type Status which holds information about network connection.
async Task<Status> CheckConnectionStatus()
Example usage;
Status status = new Status();
status = await CheckConnectionStatus();
Takes in a language code of type string and returns an object of type Packs which holds an array of Pack objects in the specified language.
async Task<Packs> GetPacks(string language)
Example usage;
Packs packs = new Packs();
packs = await GetPacks("en");
Takes in a language code and a pack slug of type string as parameters. Returns an object of type Cards which holds an array of Card objects in the specified pack and language.
async Task<Cards> GetCards(string language, string packSlug)
Example usage;
Cards cards = new Cards();
cards = await GetCards("en", "animals");
Takes in a language code of type string and returns an object of type Activities which holds an array of Activity objects in the specified language.
async Task<Activities> GetActivities(string language)
Example usage;
Activities activities = new Activities();
activities = await GetActivities("en");
Returns an object of type Languages which holds an array of Language objects.
async Task<Languages> GetLanguages()
Example usage;
Languges languages = new Languages();
languages = await GetLanguages();
Takes in an object of type Packs as the first parameter and a pack slug of type string as the second parameter. Filters the given array of packs and returns an object of type Pack corresponding to the specified pack slug.
Pack GetPackBySlug(Packs packs, string packSlug)
Example usage;
Pack pack = new Pack();
pack = GetPackBySlug(packs, "animals");
Takes in an object of type Cards as the first parameter and a card slug of type string as the second parameter. Filters the given array of cards and returns an object of type Card corresponding to the specified card slug.
Card GetCardBySlug(Cards cards, string cardSlug)
Example usage;
Card card = new Card();
card = GetCardBySlug(cards, "bee");
Takes in an object of type Activities as the first parameter and an activity slug of type string as the second parameter. Filters the given array of activities and returns an object of type Activity corresponding to the specified activity slug.
Activity GetActivityBySlug(Activities activities, string slug)
Example usage;
Activity activity = new Activity();
activity = GetActivityBySlug(activities, "practicing-speaking");
Takes in an object of type Languages as the first parameter and a language code of type string as the second parameter. Filters the given array of languages and returns an object of type Language corresponding to the specified language code.
Language GetLanguageByCode(Languages languages, string languageCode)
Example usage;
Language language = new Language();
language = GetLanguageByCode(languages, "en");
Takes in a pack slug of type string as the first parameter and an optional image size of type integer as the second parameter. Returns an object of type Texture2D corresponding to the specified pack slug and image size.
Default image size is 256x256
async Task<Texture2D> GetPackImage(string packSlug, int imgSize)
Example usage;
Texture2D texture;
texture = await GetPackImage("animals", 512);
Takes in a pack slug of type string as the first parameter, a card slug of type string as the second parameter and an optional image size of type integer as the third parameter. Returns an object of type Texture2D corresponding to the specified pack slug, card slug and image size.
Default image size is 256x256
async Task<Texture2D> GetCardImage(string packSlug, string cardSlug, int imgSize)
Example usage;
Texture2D texture;
texture = await GetCardImage("animals", "bee", 512);
Takes in an activity slug of type string and returns an object of type Texture2D corresponding to the specified activity slug.
Note that the image size is 1200x800
async Task<Texture2D> GetActivityImage(string activitySlug)
Example usage;
Texture2D texture;
texture = await GetActivityImage("brushing-teeth");
Takes in an avatar ID of type string as the first parameter and an optional image size of type integer as the second parameter. Returns an object of type Texture2D corresponding to the specified avatar ID and image size.
Default image size is 256x256
Note that avatar types have a maximum of 33 assets for the category "boy", 27 assets for the category "girl" and 29 assets for the category "misc".
e.g. boy13, girl23, misc05
async Task<Texture2D> GetAvatarImage(string avatarId, int imgSize)
Example usage;
Texture2D texture;
texture = await GetAvatarImage("girl23",512);
Returns an object of type Apps which holds an array of App objects.
async Task<Apps> GetApps()
Example usage;
Apps apps = new Apps();
apps = await GetApps();
Takes in an app slug of type string as the first parameter and an optional image size of type integer as the second parameter. Returns an object of type Texture2D corresponding to the specified app slug and image size.
Default image size is 1024x1024
async Task<Texture2D> GetAppIcon(string appSlug, int imgSize)
Example usage;
Texture2D texture;
texture = await GetAppIcon("leeloo",683);
Returns an object of type Games which holds a list of Game objects.
Games GetGames()
Example usage;
Games games = new Games();
games = GetGames();
Takes in a game slug of type string as the first parameter and an optional image size of type integer as the second parameter. Returns an object of type Texture2D corresponding to the specified game slug and image size.
Default image size is 1024x1024
async Task<Texture2D> GetGameIcon(string gameSlug, int imgSize)
Example usage;
Texture2D texture;
texture = await GetGameIcon("memory",256);
Takes in a language code of type string as the first parameter, a pack slug of type string as the second parameter and an optional image size of type integer as the third parameter. Returns an array of Texture2D objects corresponding to the specified language, pack slug and image size.
Default image size is 256x256
async Task<Texture2D[]> GetCardImagesByPack(string languageCode, string packSlug, int imgSize)
Example usage;
Texture2D[] textures;
texture = await GetCardImagesByPack("en", "school", 512);
Takes in a category of type string as the first parameter and an optional image size of type integer as the second parameter. Returns an array of Texture2D objects corresponding to the specified category and image size.
Default image size is 256x256
async Task<Texture2D[]> GetAvatarImagesByCategory(string category, int imgSize)
Example usage;
Texture2D[] textures;
texture = await GetAvatarImagesByCategory("misc",512);