'use strict'
objUtil = null
MSG_NOT_ARRAY = 'items must be an array and have $isArray attribute eq true'
angular
.module('json-api', ['object-util'])
.provider 'jsonApi', () ->
idKey = null
base = null
@idKey = (val) ->
return idKey unless val?
idKey = val
@
@base = (val) ->
return base unless val?
base = val
@
@$get = (jsonApiBuilder) ->
opts = {}
opts.idKey = idKey if idKey?
opts.base = base if base?
client = jsonApiBuilder.newClient(opts)
return
.factory 'jsonApiBuilder', ($http, _ou) ->
objUtil = _ou
clientsBuilder = new JsonApiBuilder( idKey: 'id', http: $http, base: '/')