anchor.diff:  			{error, 500}
   	end;
   get_usage(Query) ->
  -erlang:display({?MODULE, ?LINE, Query}),
   	case lists:keyfind("type", 1, Query) of
   		{_, "AAAAccessUsage"} ->
  -			get_auth_usage(Query);
  +			get_auth_usage(lists:keydelete("type", 1, Query));
   		{_, "AAAAccountingUsage"} ->
  -			get_acct_usage(Query);
  +			get_acct_usage(lists:keydelete("type", 1, Query));
   		_ ->
   			{error, 404}
   	end.
  
positive.code: 			Headers = [{content_type, "application/json"},
  					{content_range, ContentRange}],
  			{ok, Headers, Body}
  	end.
  
  
negative.code: 	FileName = Directory ++ "/" ++ Id,
  	read_ipdr(FileName, MaxItems).
  	
  -spec get_usagespec(Query) -> Result
  	when
  		Query :: [{Key :: string(), Value :: string()}],
  		Result :: {ok, Headers :: [tuple()], Body :: iolist()}.
  %% @doc Body producing function for
  %% 	`GET /usageManagement/v1/usageSpecification'
  %% 	requests.
  get_usagespec([] = _Query) ->
  	Headers = [{content_type, "application/json"}],
  	Body = mochijson:encode({array, [spec_aaa_auth(),
  			spec_aaa_acct(), spec_public_wlan()]}),
  	{ok, Headers, Body}.
  
  -spec get_usagespec(Id, Query) -> Result
  	when
  		Id :: string(),
  		Query :: [{Key :: string(), Value :: string()}],
  		Result :: {ok, Headers :: [tuple()], Body :: iolist()}
  				| {error, ErrorCode :: integer()}.
  %% @doc Body producing function for
  %% 	`GET /usageManagement/v1/usageSpecification/{id}'
  %% 	requests.
  get_usagespec("AAAAccessUsageSpec", [] = _Query) ->
  	Headers = [{content_type, "application/json"}],
  	Body = mochijson:encode(spec_aaa_auth()),
  	{ok, Headers, Body};
  get_usagespec("AAAAccountingUsageSpec", [] = _Query) ->
  	Headers = [{content_type, "application/json"}],
  	Body = mochijson:encode(spec_aaa_acct()),
  	{ok, Headers, Body};
  get_usagespec("PublicWLANAccessUsageSpec", [] = _Query) ->
  	Headers = [{content_type, "application/json"}],
  	Body = mochijson:encode(spec_public_wlan()),
  	{ok, Headers, Body};
  get_usagespec(_Id, _Query) ->
  	{error, 404}.
  
  %%----------------------------------------------------------------------
  