add javascript function stubs for api calls