returns a specific notification by given id

        :param str notification_id: the ID of the notification
496145
def get_notification(self, notification_id):
        
        log.debug("getting notification '{}'...".format(notification_id))
        cmd, url = DEVICE_URLS["get_notification"]
        return self._exec(cmd, url.replace(":id", notification_id))
38899
public function getNotificationById(int $notificationId): Notification
    {
        $notification = $this->mapper->extractNotificationsFromRows(
            $this->gateway->getNotificationById($notificationId)
        );

        if (count($notification) < 1) {
            throw new NotFoundException('Notification', $notificationId);
        }

        return reset($notification);
    }
1155058
def notify_message(self, message, level="info", clear_if_dupl=True,
                       clear_in=CLEAR_NOTIF_BAR_MESSAGE_IN):
        
        with self.notifications_lock:
            if clear_if_dupl and message in self.message_widget_dict.keys():
                logger.debug("notification %r is already displayed", message)
                return
            logger.debug("display notification %r", message)
            widget = urwid.AttrMap(urwid.Text(message), "notif_{}".format(level))
        return self.notify_widget(widget, message=message, clear_in=clear_in)
988130
def get_activity_by_id(self, activity_id):
        

        columns = 'name, category_id'

        query = "SELECT %s FROM activities WHERE id = %s"
        result = self._query(query % (columns, activity_id))

        if result:
            return result[0]  # there only one fact with the id
        else:
            raise NoHamsterData('activities', activity_id)
752063
public function findAllByNotification($id, $seen = null)
    {
        $qb = $this
            ->createQueryBuilder('notifiable')
            ->join('notifiable.notifiableNotifications', 'nn')
            ->join('nn.notification', 'notification')
            ->where('notification.id = :notification_id')
            ->setParameter('notification_id', $id)
        ;

        if ($seen !== null) {
            $whereSeen = $seen ? 1 : 0;
            $qb
                ->andWhere('nn.seen = :seen')
                ->setParameter('seen', $whereSeen)
            ;
        }

        return $qb->getQuery()->getResult();
    }
1186785
def removeNotification(self, notificationId):
        """"""

        fn = self.function_table.removeNotification
        result = fn(notificationId)
        return result
74594
def get(self, id_):
        
        if self.api.queue_exists(id_):
            return Queue(self, {"queue": {"name": id_, "id_": id_}}, key="queue")
        raise exc.NotFound("The queue '%s' does not exist." % id_)
777482
def update_notification(self, notification, details):
        
        if isinstance(notification, CloudMonitorNotification):
            nid = notification.id
            ntyp = notification.type
        else:
            # Supplied an ID
            nfcn = self.get(notification)
            nid = notification
            ntyp = nfcn.type
        uri = "/%s/%s" % (self.uri_base, nid)
        body = {"type": ntyp,
                "details": details}
        resp, resp_body = self.api.method_put(uri, body=body)
973852
def Message(self, Id=0):
        
        o = ChatMessage(self, Id)
        o.Status # Test if such an id is known.
        return o
962042
public function getNotification( $notificationId ){

        $path = sprintf( self::PATH_NOTIFICATION_LOOKUP, $notificationId );

        return $this->httpGet( $path );

    }
18746
def get_notifications(self, start=None, stop=None, *args, **kwargs):
        
        filter_kwargs = {}
        # Todo: Also support sequencing by 'position' if items are sequenced by timestamp?
        if start is not None:
            filter_kwargs['%s__gte' % self.notification_id_name] = start + 1
        if stop is not None:
            filter_kwargs['%s__lt' % self.notification_id_name] = stop + 1
        objects = self.record_class.objects.filter(**filter_kwargs)

        if hasattr(self.record_class, 'application_name'):
            objects = objects.filter(application_name=self.application_name)
        if hasattr(self.record_class, 'pipeline_id'):
            objects = objects.filter(pipeline_id=self.pipeline_id)

        objects = objects.order_by('%s' % self.notification_id_name)
        return objects.all()
544711
public Notification getByID(String id) {
        //TODO maybe SORT_By_ID then make a better array searching algorithm
        for (Notification n: NotificationManager.notifications){
            if(n.getId().equals(id)){
                logger.fine("...found a match for getByID query. With id: "+id);
                return n;
            }
        }
        logger.fine("There is no notification that match the given ID: "+id);
        return null;
    }
1145380
public void showIndeterminate(final int id, int status) {
        final BaseNotificationItem notification = get(id);

        if (notification == null) {
            return;
        }

        notification.updateStatus(status);
        notification.show(false);
    }
907203
public function findOne($notification_id, $notifiable_id)
    {
        return $this->createQueryBuilder('nn')
            ->join('nn.notification', 'n')
            ->join('nn.notifiableEntity', 'ne')
            ->where('n.id = :notification_id')
            ->andWhere('ne.id = :notifiable_id')
            ->setParameter('notification_id', $notification_id)
            ->setParameter('notifiable_id', $notifiable_id)
            ->getQuery()
            ->getOneOrNullResult()
        ;
    }
716736
def get_message_by_id(self, message_id):
        
        result = self.wapi_functions.getMessageById(message_id)

        if result:
            result = factory_message(result, self)

        return result
1233645
def register_notification(self, notification):
        

        LOGGER.debug("> Registering notification: '{0}'.".format(notification))

        self.__notifications.append(notification)
        self.notification_registered.emit(notification)
        return True
213483
protected function sendToNotifiable($notifiable, $id, $notification, $channel)
    {
        if (!$notification->id) {
            $notification->id = $id;
        }
//        if (! $this->shouldSendNotification($notifiable, $notification, $channel)) {
//            return;
//        }
        $response = $this->manager->channel($channel)->send($notifiable, $notification);

//        $this->events->dispatch(
//            new Events\NotificationSent($notifiable, $notification, $channel, $response)
//        );
        return $response;
    }