Rename an API method and add a spec for api.rb.