Request subscriptions for user.
550822
function(options, cb) {
    console.log('/watch/request', options);
    publish('/watch/request', options);
    fayeClient.subscribe('/watch/results/' + clientID, cb);
  }
868100
def subscribe(self, topic=b''):
        """"""
        self.sockets[zmq.SUB].setsockopt(zmq.SUBSCRIBE, topic)
        poller = self.pollers[zmq.SUB]
        return poller
123671
def check_subscription(self, request):
		""""""
		subscriber = subscriber_request_callback(request)

		if not subscriber_has_active_subscription(subscriber):
			if not SUBSCRIPTION_REDIRECT:
				raise ImproperlyConfigured("DJSTRIPE_SUBSCRIPTION_REDIRECT is not set.")
			return redirect(SUBSCRIPTION_REDIRECT)
383063
def create_subscription(request):
    ""
    
    if request.POST:
        form = NewSubscriptionForm(request.POST)
        if form.is_valid():
            unverified = form.save()

            body = """Please confirm your email address to subscribe to status updates from %(name)s:\n\n%(link)s""" % dict(
                name=conf.NAME,
                link=urlparse.urljoin(conf.BASE_URL, reverse('overseer:verify_subscription', args=[unverified.ident]))
            )

            # Send verification email
            from_mail = conf.FROM_EMAIL
            if not from_mail:
                from_mail = 'overseer@%s' % request.get_host().split(':', 1)[0]
            
            send_mail('Confirm Subscription', body, from_mail, [unverified.email],
                      fail_silently=True)
            
            # Show success page
            return respond('overseer/create_subscription_complete.html', {
                'subscription': unverified,
            }, request)
    else:
        form = NewSubscriptionForm()

    context = csrf(request)
    context.update({
        'form': form,
        'service_list': Service.objects.all(),
    })

    return respond('overseer/create_subscription.html', context, request)
64989
def register(self, subscriber):
        
        assert isinstance(subscriber, RequestHandler)
        logger.debug('New subscriber')
        self.subscribers.add(subscriber)
607492
function() {
    var self = this;
    request.post(this._endpoint, {
        qs: self.subscribeParams(self._fields)
      }, function(error, response, body) {
        if (!error && response.statusCode == 200) {
          logger.info('facebook -', 'subscription confirmed');
        }
      }
    );
  }
769647
def subscriptions_read(self, rid, **kwargs):
        """"""
        return self.__call_api_post('subscriptions.read', rid=rid, kwargs=kwargs)
157375
def api_subscriptions(request, userPk, key=None, hproPk=None):
    """"""

    if not check_api_key(request, key, hproPk):
        return HttpResponseForbidden

    # From UUID to Pk
    from users.models import TechUser

    user = get_object_or_404(TechUser, pk=userPk)

    (_, _, hproject) = getPlugItObject(hproPk)

    retour = user.getActiveSubscriptionLabels(hproject)

    return HttpResponse(json.dumps(retour), content_type="application/json")
1303110
def subscribers(self, date="", page=1, page_size=1000, order_field="email", order_direction="asc", include_tracking_information=False):
        """"""
        params = {
            "date": date,
            "page": page,
            "pagesize": page_size,
            "orderfield": order_field,
            "orderdirection": order_direction,
            "includetrackinginformation": include_tracking_information
        }
        response = self._get(self.uri_for("active"), params=params)
        return json_to_py(response)
545799
def get(request):
    
    res = Result()
    obj, created = UserPref.objects.get_or_create(user=request.user, defaults={'data': json.dumps(DefaultPrefs.copy())})

    data = obj.json()
    data['subscriptions'] = [_.json() for _ in GallerySubscription.objects.filter(user=request.user)]

    res.append(data)

    return JsonResponse(res.asDict())
990538
def subscribers(options = {})
      load
      return [] if info['push'].nil? || info['push']['subscribers'].nil?

      info['push']['subscribers'].map { |s| Subscriber.new(s, self, options) }
    end
941322
def subscribe(self, id, name, port):
		""""""
		sub = gntp.core.GNTPSubscribe()
		sub.add_header('Subscriber-ID', id)
		sub.add_header('Subscriber-Name', name)
		sub.add_header('Subscriber-Port', port)
		if self.password:
			sub.set_password(self.password, self.passwordHash)

		self.add_origin_info(sub)
		self.subscribe_hook(sub)

		return self._send('subscribe', sub)
366430
def subscribe(self, handler):
        """"""
        assert callable(handler), "Invalid handler %s" % handler
        self.handlers.append(handler)
1358369
def subscribe_get(self, nick, article_code):
        ''''''
        request = TOPRequest('taobao.vas.subscribe.get')
        request['nick'] = nick
        request['article_code'] = article_code
        self.create(self.execute(request), fields=['article_user_subscribes',], models={'article_user_subscribes':ArticleUserSubscribe})
        return self.article_user_subscribes
879458
def subscribe(self, destination, id, ack='auto', headers=None, **keyword_headers):
        
        self.transport.subscriptions[id] = destination
788549
def sync_subscriber(subscriber):
	""""""
	customer, _created = Customer.get_or_create(subscriber=subscriber)
	try:
		customer.sync_from_stripe_data(customer.api_retrieve())
		customer._sync_subscriptions()
		customer._sync_invoices()
		customer._sync_cards()
		customer._sync_charges()
	except InvalidRequestError as e:
		print("ERROR: " + str(e))
	return customer
721446
def process_subscription_data(post_data):
    """"""
    subscription_data = post_data.pop("subscription", {})
    # As our database saves the auth and p256dh key in separate field,
    # we need to refactor it and insert the auth and p256dh keys in the same dictionary
    keys = subscription_data.pop("keys", {})
    subscription_data.update(keys)
    # Insert the browser name
    subscription_data["browser"] = post_data.pop("browser")
    return subscription_data