Exemple #1
0
 /**
  * Returns a single note for one site.
  *
  * @param string $idSite The site ID to add the annotation to.
  * @param string $idNote The ID of the note to get.
  * @return array The annotation. It will contain the following properties:
  *               - date: The date the annotation was recorded for.
  *               - note: The note text.
  *               - starred: Whether the note is starred or not.
  *               - user: The user that created the note.
  *               - canEditOrDelete: Whether the user that called this method can edit or
  *                                  delete the annotation returned.
  */
 public function get($idSite, $idNote)
 {
     $this->checkSingleIdSite($idSite, $extraMessage = "Note: Specify only one site ID when getting ONE note.");
     Piwik::checkUserHasViewAccess($idSite);
     // get single annotation
     $annotations = new AnnotationList($idSite);
     return $annotations->get($idSite, $idNote);
 }