code: function(data) {
          return this.all(data).then(function(response) {
            return angular.isArray(response) ? response[0] : response;
          }, function() {
            return null;
          });
        }
docs: @ngdoc function
  @name first
  @methodOf ur.model:$class
  @param {object=} data Configuration of the request that will be sent to your API
  
  @description
  Retrieve a single post instances from the API
  @example
  ```
  model('posts').first({name: 'some post'}).then(function(post) {
  console.log(post._id);
  });
  => 42
  ```
  @returns {object} Promise from an API request