class ProfileService { async get_profile(user_id = 'me') { const results = await axios.get(`/api/v1/profile/${user_id}`) if ( results && results.data && results.data.data ) return results.data.data } async get_notify(user_id = 'me') { const results = await axios.get(`/api/v1/profile/${user_id}/notify`) if ( results && results.data && results.data.data ) return results.data.data } async update_profile({ user_id, first_name, last_name, email, tagline = undefined }) { await axios.patch(`/api/v1/profile/${user_id}`, { first_name, last_name, email, tagline }) } async update_notify({ user_id = 'me', app_key, gateway_url }) { await axios.patch(`/api/v1/profile/${user_id}/notify`, { app_key, gateway_url }) } async test_notify({ user_id = 'me' }) { await axios.post(`/api/v1/profile/${user_id}/notify/test`) } } const profile_service = new ProfileService() export { profile_service }