function getProfileHistory (profileId) {
  // BASE/user/profile/:id/names also seems to provide the same endpoint
  return fetch(`${CORE_API}/user/profiles/${profileId}/names`, {
    headers: {
      'user-agent': USER_AGENT,
      'accept': 'application/json'
    }
  })
    .then(handleErrors)
    .then(res => {
      if (res.status === 204) throw new Error(`no such profile: ${profileId}`)
      return res.json()
    })
}
function getProfileHistory (profileId) {
  
  return fetch(`${CORE_API}/user/profiles/${profileId}/names`, {
    headers: {
      'user-agent': USER_AGENT,
      'accept': 'application/json'
    }
  })
    .then(handleErrors)
    .then(res => {
      if (res.status === 204) throw new Error(`no such profile: ${profileId}`)
      return res.json()
    })
}
function getProfileHistory ( profileId ) { // BASE/user/profile/:id/names also seems to provide the same endpoint return fetch ( ` ${ CORE_API } ${ profileId } ` , { headers : { 'user-agent' : USER_AGENT , 'accept' : 'application/json' } } ) . then ( handleErrors ) . then ( res => { if ( res . status === 204 ) throw new Error ( ` ${ profileId } ` ) return res . json ( ) } ) }
Gets all name changes for a given player's profile UUID.

@param {string} profileId - profile UUID (does not work with user UUID)
@returns {Promise<{name: string, changedToAt: number}[]>} resolves if profile exists
@see {@link http://wiki.vg/Mojang_API#UUID_-.3E_Name_history}
Gets all name changes for a given player s profile UUID .