<commit_before>
import Ember from 'ember';
import Family from 'web/models/family';
import FamilyMember from 'web/models/familyMember';
import ListResult from 'web/models/listResult';


export default Ember.Service.extend({
  client: Ember.inject.service('client'),
  searchFamilies:function(){
    const client = this.get('client');
    let results = ListResult.create({childType:Family});

    let searchUrl = '/auditioner/families';

    client.getResource(searchUrl,results);

    return results;
  },
  loadFamilyById:function(familyId)
  {
    const client = this.get('client');
    const url = '/auditioner/families/' + familyId;

    const family = Family.create();

    family.set('client',client);
    family.set('path',url);

    client.getResource(url,family);

    return family;
  },
  saveFamily:function(family)
  {
    const client = this.get('client');
    if(family.get('location')) {
      return client.putResource(family);
    }
    else {
      return client.postResource("/auditioner/families", family);
    }
  },
  reloadFamily:function(family)
  {
    const client = this.get('client');

    client.getResource(family.get('location'),family);

    return family;
  },
  deleteFamily:function(family)
  {
    const client = this.get('client');

    return client.deleteResource(family);
  },
  createFamily:function()
  {
    const client = this.get('client');
    const family = Family.create();
    family.set('client',client);
    return family;
  },
  deleteFamilyMember:function(familyMember)
  {
    const client = this.get('client');

    return client.deleteResource(familyMember);
  },
  createFamilyMember:function()
  {
    const client = this.get('client');
    const familyMember = FamilyMember.create();
    familyMember.set('client',client);
    return familyMember;
  },
  saveFamilyMember:function(saveFamilyMember)
  {
    const client = this.get('client');

    return client.putResource(saveFamilyMember);
  },

});
<commit_msg>updated the family service to include to getters for family members<commit_after>
import Ember from 'ember';
import Family from 'web/models/family';
import FamilyMember from 'web/models/familyMember';
import ListResult from 'web/models/listResult';


export default Ember.Service.extend({
  client: Ember.inject.service('client'),
  searchFamilies:function(){
    const client = this.get('client');
    let results = ListResult.create({childType:Family});

    let searchUrl = '/auditioner/families';

    client.getResource(searchUrl,results);

    return results;
  },
  loadFamilyById:function(familyId)
  {
    const client = this.get('client');
    const url = '/auditioner/families/' + familyId;

    const family = Family.create();

    family.set('client',client);
    family.set('path',url);

    client.getResource(url,family);

    return family;
  },
  saveFamily:function(family)
  {
    const client = this.get('client');
    if(family.get('location')) {
      return client.putResource(family);
    }
    else {
      return client.postResource("/auditioner/families", family);
    }
  },
  reloadFamily:function(family)
  {
    const client = this.get('client');

    client.getResource(family.get('location'),family);

    return family;
  },
  deleteFamily:function(family)
  {
    const client = this.get('client');

    return client.deleteResource(family);
  },
  createFamily:function()
  {
    const client = this.get('client');
    const family = Family.create();
    family.set('client',client);
    return family;
  },
  loadFamilyMemberById:function(familyId,familyMemberId)
  {
    const client = this.get('client');
    const url = '/auditioner/families/' + familyId + '/family_member/' + familyMemberId;

    const familyMember = FamilyMember.create();

    familyMember.set('client',client);
    familyMember.set('path',url);

    client.getResource(url,familyMember);

    return familyMember;
  },
  loadFamilyMembersByFamilyId: function(familyId) {
    const client = this.get('client');
    let results = ListResult.create({childType:FamilyMember});

    let searchUrl = '/auditioner/families/' + familyId + '/famil_member/';

    client.getResource(searchUrl,results);

    return results;
  },
  deleteFamilyMember:function(familyMember)
  {
    const client = this.get('client');

    return client.deleteResource(familyMember);
  },
  createFamilyMember:function()
  {
    const client = this.get('client');
    const familyMember = FamilyMember.create();
    familyMember.set('client',client);
    return familyMember;
  },
  saveFamilyMember:function(saveFamilyMember)
  {
    const client = this.get('client');

    return client.putResource(saveFamilyMember);
  },

});

{'fraction_non_alphanumeric': 0.13892445582586427, 'fraction_numerical': 0.0, 'mean_word_length': 3.9078534031413614, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7039853', 'n_tokens_mistral': 1407, 'n_tokens_neox': 1353, 'n_words': 258}