const baseurl = 'https://us-central1-tagfer-inc.cloudfunctions.net/api';
const endpoints = {
  login: {
    method: 'POST',
    url: `${baseurl}/auth/signin`
  },
  passwordReset: {
    method: 'POST',
    url: `${baseurl}/auth/passwordReset`
  },
  emailExists: (email) => ({
    method: 'GET',
    url: `${baseurl}/auth/email/${email}/exists`
  }),
  tagferIdExists: (tagferId) => ({ 
    method: 'GET', 
    url: `${baseurl}/auth/tagferId/${tagferId}/exists` 
  }),
  twitterToken: {
    method: 'GET',
    url: `${baseurl}/auth/twitter/token`
  },
  sendCode: {
    method: 'POST',
    url: `${baseurl}/auth/phone/code`
  },
  verifyCode: {
    method: 'POST',
    url: `${baseurl}/auth/phone/verify`
  },
  findUsersByPhone: {
    method: 'POST',
    url: `${baseurl}/auth/findUsers/byPhone`
  },
  suggestProfiles: {
    method: 'GET',
    url: `${baseurl}/profiles/suggest`
  },
  signup: {
    method: 'PUT',
    url: `${baseurl}/auth/signup`
  },
  getConnectionRequests: {
    method: 'GET',
    url: `${baseurl}/connections/me/requests`
  },
  sendConnectionRequest: (profileN) => ({
    method: 'PUT',
    url: `${baseurl}/connections/me/${profileN}`
  }),
  acceptConnectionRequest: (profileN) => ({
    method: 'POST',
    url: `${baseurl}/connections/me/${profileN}`
  }),
  removeConnectionRequest: {
    method: 'DELETE',
    url: `${baseurl}/connections/me`
  },
  getAllConnections: {
    method: 'GET',
    url: `${baseurl}/connections/me`
  },
  getProfileSelf: (profileN) => ({
    method: 'GET',
    url: `${baseurl}/profiles/me/${profileN}`
  }),
  getProfile: (tagferId) => ({
    method: 'GET',
    url: `${baseurl}/profiles/${tagferId}`
  }),
  getConnectionCountSelf: {
    method: 'GET',
    url: `${baseurl}/connections/me/count`
  },
  getConnectionCount: (tagferId) => ({
    method: 'GET',
    url: `${baseurl}/connections/${tagferId}/count`
  })
};

export default endpoints;
