Finds the subscription associated with a token and unsuspendes it. Returns false if it was removed and true it was unsuspended.
341683
function unsuspendSubscriber (topic, token) {
    if (typeof token === 'string') {
      return !!applyTopicDescendents(
        unsuspendTopic, 'subscriptions', token, topic
      );
    }

    var node = ancestorTopicSearch(token.topic, topic);
    if (node.topic !== token.topic) {
      return false;
    }

    var i = searchAround(
      getId, getPriority,
      token.id, token.priority,
      binaryIndexBy(getPriority, token.priority, node.subscriptions),
      node.subscriptions
    );

    if (i === -1) {
      return false;
    }

    return !!unsuspendNode(node.subscriptions[i]);
  }
69541
private boolean resubscribe() throws TransactionIdTooOldException,
      InterruptedException {
    for (NamespaceEventKey eventKey : watchedEvents.keySet()) {
      NamespaceEvent event = eventKey.getEvent(); 
      if (!subscribe(event.getPath(), EventType.fromByteValue(event.getType()),
          watchedEvents.get(eventKey))) {
        return false;
      }
    }
    return true;
  }
1259163
def need_rejoin(self):
        
        if not self._subscription.partitions_auto_assigned():
            return False

        if self._auto_assign_all_partitions():
            return False

        # we need to rejoin if we performed the assignment and metadata has changed
        if (self._assignment_snapshot is not None
            and self._assignment_snapshot != self._metadata_snapshot):
            return True

        # we need to join if our subscription has changed since the last join
        if (self._joined_subscription is not None
            and self._joined_subscription != self._subscription.subscription):
            return True

        return super(ConsumerCoordinator, self).need_rejoin()
693530
def is_subscribed(user, obj):
    
    if not user.is_authenticated():
        return False

    ctype = ContentType.objects.get_for_model(obj)

    try:
        Subscription.objects.get(
            user=user, content_type=ctype, object_id=obj.pk)
    except Subscription.DoesNotExist:
        return False

    return True
377406
def is_subscribed(self, login, repo):
        
        json = False
        if login and repo:
            url = self._build_url('user', 'subscriptions', login, repo)
            json = self._boolean(self._get(url), 204, 404)
        return json
384874
public function isSuspended()
	{
		if ($this->suspended and $this->suspended_at)
		{
			$this->removeSuspensionIfAllowed();
			return (bool) $this->suspended;
		}

		return false;
	}
1185262
public function isNewsSubscribed()
    {
        if ($this->_blNewsSubscribed === null) {
            if (($isSubscribedToNews = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('blnewssubscribed')) === null) {
                $isSubscribedToNews = false;
            }
            if (($user = $this->getUser())) {
                $isSubscribedToNews = $user->getNewsSubscription()->getOptInStatus();
            }
            $this->_blNewsSubscribed = $isSubscribedToNews;
        }

        if (is_null($this->_blNewsSubscribed)) {
            $this->_blNewsSubscribed = false;
        }

        return $this->_blNewsSubscribed;
    }
1037651
def retrieve(cls, *args, **kwargs):
        """"""
        return super(Subscription, cls).retrieve(*args, **kwargs)
905780
function(client, subscriptions, backlog, channel, callback, done_callback) {
    if ( addToBacklog(client, backlog, unsubscribeBrowser, [client, subscriptions, backlog, channel, callback, done_callback]) ) return;
    if (subscriptions[channel]===undefined)
        return;
    subscriptions[channel].splice(subscriptions[channel].indexOf(callback), 1);
    if (subscriptions[channel].length===0) {
        delete subscriptions[channel];
        client.unsubscribe(channel, {onSuccess : function() {
            // If there is a done_callback defined, execute it
            if (done_callback!==undefined) done_callback();
        }});
    }
}
177632
def delete_subscription(self, subscription_id):
        
        return self.client._delete(self.url + 'subscriptions/{}'.format(subscription_id), headers=self.get_headers())
1311825
def unsubscribe(self, subscriber: 'Subscriber') -> None:
        
        # here is a special implementation which is replacing the more
        # obvious one: self._subscriptions.remove(subscriber) - this will not
        # work because list.remove(x) is doing comparision for equality.
        # Applied to publishers this will return another publisher instead of
        # a boolean result
        for i, _s in enumerate(self._subscriptions):
            if _s is subscriber:
                self._subscriptions.pop(i)
                return
        raise SubscriptionError('Subscriber is not registered')
463722
function unsub(context, path, fn, upstream) {
	return function() {
		// if (!context.destroyed)
		context.unsubscribe(path, fn, upstream);
	};
}
519490
function(subscription_name) {
    request.del(this._endpoint, {
        qs: this.unsubscribeParams()
      }, function(error, response, body) {
        if (!error && response.statusCode == 200) {
          logger.info('facebook -', 'unsubscribed successfully');
        }
      }
    );
  }
305780
def get_subscription(self, subscription_id):
        
        return self.client._put(self.url + 'subscriptions/{}'.format(subscription_id), headers=self.get_headers())
33524
function getUnwatchedKeys() {
    var arr1 = Object.keys(store._store),
        arr2 = Object.keys(store._key_to_watcher_subscriptions);
    return arr1.filter(function (i) {
      return arr2.indexOf(i) === -1;
    });
  }
971985
def remove_from_subscriptions(self, subscription):
        
        assert isinstance(subscription, github.Repository.Repository), subscription
        headers, data = self._requester.requestJsonAndCheck(
            "DELETE",
            "/user/subscriptions/" + subscription._identity
        )
105361
def is_authenticated(self):
        
        if not self.token:
            return False

        try:
            self.lookup_token()
            return True
        except exceptions.Forbidden:
            return False
        except exceptions.InvalidPath:
            return False
        except exceptions.InvalidRequest:
            return False