emod_api.campaign module

You use this simple campaign builder by importing it, adding valid events via “add”, and writing it out with “save”.

emod_api.campaign.add(event, name=None, first=False)

Adds an event to the campaign. event is assumed to be a dict, and a valid event. Not checked here.

emod_api.campaign.save(filename='campaign.json')

Save ‘camapign_dict’ as ‘filename’.

emod_api.campaign.get_adhocs()
emod_api.campaign.get_schema()
emod_api.campaign.get_event(event)

Basic placeholder functionality for now. This will map new ad-hoc events to GP_EVENTs and manage that ‘cache’ If event in built-ins, return event, else if in adhoc map, return mapped event, else add to adhoc_map and return mapped event.