code: function listDiagrams(options, callback){
      var self = this;
      function wrappedCB(err, diagram_resources){
        if(err)
          return callback(err);
        var diagrams = diagram_resources.map(function(resource){
          return new CoggleApiDiagram(self, resource);
        });
        return callback(err, diagrams);
      }
      if(options.organisation){
        if(typeof options.organisation !== 'string')
          throw new Error("options.organisation must be a string or undefined");
        if(!/^[a-z]+[a-z0-9-]{2,}$/.test(options.organisation))
          throw new Error("invalid organisation name");
        this.get('/api/1/organisations/' + options.organisation + '/diagrams', '', wrappedCB);
      }else{
        this.get('/api/1/diagrams', '', wrappedCB);
      }
    }
docs: !jsjsdoc
  
  doc.CoggleApi.listDiagrams = {
  $brief: "Lists diagrams accessible to the authorised user.",
  $parameters: {
  options: {
  $type: "Object",
  $brief: "Possible Options:\n    * **`organisation`**: The organisation"+
  " to fetch diagrams for. (If undefined, the authenticated"+
  " user's personal Coggles will be retrieved)"
  },
  callback: {
  $type: "Function",
  $brief: "Callback accepting (Error, [Array of CoggleApiDiagram])",
  }
  }
  }