Add API + tests for Swarm

Thinking a bit more. If the input is mandatory, don't make it to default to `None`. The user will be forced to provide it or he won't be able to execute the function.