"""Api Network.""" from podcast.models.api_base import ApiBase class ApiNetwork(ApiBase): """API to talk to megaphone for the network model.""" def create(self, name, code): """Create network.""" return self._post('networks', {'name': name, 'code': code}) def delete(self, megaphone_id): """Delete network.""" return self._delete('networks/{}'.format(megaphone_id))