module Wakdata::RestAPI::CryoMongo

Defined in:

wakdata/rest-api/cryomongo.cr

Constant Summary

CLIENT = Mongo::Client.new(CONFIG.mongo_connection_string)
CONFIG = Config.from_json(CONFIG_FILE)
CONFIG_FILE = File.open("./mongo-config.json")
DB = CLIENT[CONFIG.database]
VERSIONS_DATA = DB["versions"]

Class Method Summary

Macro Summary

Class Method Detail

def self.add_version_to_mongo_versions(all_data_name : String, version : String) #

[View source]
def self.retrieve_actions_for(version : String) : Array(Wakdata::Action) | Nil #

def self.retrieve_blueprints_for(version : String) : Array(Wakdata::Blueprint) | Nil #

def self.retrieve_collectibleResources_for(version : String) : Array(Wakdata::CollectibleResource) | Nil #

def self.retrieve_equipmentItemTypes_for(version : String) : Array(Wakdata::ItemType) | Nil #

def self.retrieve_harvestLoots_for(version : String) : Array(Wakdata::HarvestLoot) | Nil #

def self.retrieve_itemProperties_for(version : String) : Array(Wakdata::ItemProperty) | Nil #

def self.retrieve_items_for(version : String) : Array(Wakdata::Item) | Nil #

def self.retrieve_itemTypes_for(version : String) : Array(Wakdata::ItemType) | Nil #

def self.retrieve_jobItems_for(version : String) : Array(Wakdata::JobItem) | Nil #

def self.retrieve_recipeCategories_for(version : String) : Array(Wakdata::RecipeCategory) | Nil #

def self.retrieve_recipeIngredients_for(version : String) : Array(Wakdata::RecipeIngredient) | Nil #

def self.retrieve_recipeResults_for(version : String) : Array(Wakdata::RecipeResult) | Nil #

def self.retrieve_recipes_for(version : String) : Array(Wakdata::Recipe) | Nil #

def self.retrieve_resources_for(version : String) : Array(Wakdata::Resource) | Nil #

def self.retrieve_resourceTypes_for(version : String) : Array(Wakdata::ResourceType) | Nil #

def self.retrieve_states_for(version : String) : Array(Wakdata::State) | Nil #

def self.retrieve_versions(all_data_name : String) : VersionData | Nil #

[View source]
def self.save_actions_for(version : String, data : Array(Wakdata::Action)) #

def self.save_blueprints_for(version : String, data : Array(Wakdata::Blueprint)) #

def self.save_collectibleResources_for(version : String, data : Array(Wakdata::CollectibleResource)) #

def self.save_equipmentItemTypes_for(version : String, data : Array(Wakdata::ItemType)) #

def self.save_harvestLoots_for(version : String, data : Array(Wakdata::HarvestLoot)) #

def self.save_itemProperties_for(version : String, data : Array(Wakdata::ItemProperty)) #

def self.save_items_for(version : String, data : Array(Wakdata::Item)) #

def self.save_itemTypes_for(version : String, data : Array(Wakdata::ItemType)) #

def self.save_jobItems_for(version : String, data : Array(Wakdata::JobItem)) #

def self.save_recipeCategories_for(version : String, data : Array(Wakdata::RecipeCategory)) #

def self.save_recipeIngredients_for(version : String, data : Array(Wakdata::RecipeIngredient)) #

def self.save_recipeResults_for(version : String, data : Array(Wakdata::RecipeResult)) #

def self.save_recipes_for(version : String, data : Array(Wakdata::Recipe)) #

def self.save_resources_for(version : String, data : Array(Wakdata::Resource)) #

def self.save_resourceTypes_for(version : String, data : Array(Wakdata::ResourceType)) #

def self.save_states_for(version : String, data : Array(Wakdata::State)) #

Macro Detail

macro define_retrieve_data_for(all_data_name, struct_name) #

[View source]
macro define_save_data_for(all_data_name, struct_name) #

[View source]