Changed get_namespace into a class method and rescoped private_key and api_url inside it.