Add an action to get family names by class and kingdom
/* global angular */

angular
  .module('speciesApp')
  .factory('SpeciesService', [
    'API_BASE_URL',
    '$resource',
    SpeciesService
  ])

function SpeciesService (API_BASE_URL, $resource) {
  return $resource(
    API_BASE_URL,
    null,
    {
      getKingdoms: {
        method: 'GET',
        isArray: false,
        params: {
          op: 'getkingdomnames'
        }
      },
      getClasses: {
        method: 'GET',
        isArray: false,
        params: {
          op: 'getclassnames'
        }
      },
      getFamilies: {
        method: 'GET',
        isArray: false,
        params: {
          op: 'getfamilynames'
        }
      }
    }
  )
}

/* global angular */

angular
  .module('speciesApp')
  .factory('SpeciesService', [
    'API_BASE_URL',
    '$resource',
    SpeciesService
  ])

function SpeciesService (API_BASE_URL, $resource) {
  return $resource(
    API_BASE_URL,
    null,
    {
      getKingdoms: {
        method: 'GET',
        isArray: false,
        params: {
          op: 'getkingdomnames'
        }
      },
      getClasses: {
        method: 'GET',
        isArray: false,
        params: {
          op: 'getclassnames'
        }
      }
    }
  )
}
