Add localstorage api.