Get single subscription
552527
def get_subscription(self, subscription_id):
        
        url = self.SUBSCRIPTIONS_ID_URL % subscription_id

        connection = Connection(self.token)
        connection.set_url(self.production, url)

        return connection.get_request()
1043761
def get_subscriptions_by_channel_id_and_subscriber_id(
            self, channel_id, subscriber_id):
        
        return self.search_subscriptions(
            channel_id=channel_id, subscriber_id=subscriber_id)
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")
940409
public static ApruveResponse<Subscription> get(String suscriptionId) {
		return ApruveClient.getInstance().get(
				getSubscriptionsPath() + suscriptionId, Subscription.class);
	}
859769
function () {
            /*  determine parameters  */
            var params = $cs.params("_subscriptions", arguments, {
                name:  { pos: 0, req: true },
                spec:  { pos: 1, def: {}   }
            });

            /*  make an event for matching only  */
            var ev = $cs.event({
                name:   params.name,
                spec:   params.spec,
                target: _cs.nop
            });

            /*  find and return all matching subscriptions  */
            var subscriptions = [];
            for (var id in this.__subscription) {
                if (!_cs.isown(this.__subscription, id))
                    continue;
                var s = this.__subscription[id];
                if (ev.matches(s.name, s.spec))
                    subscriptions.push(s);
            }
            return subscriptions;
        }
644066
public Single<ByteBuf> getSeqnos() {
    return Single.create(new Single.OnSubscribe<ByteBuf>() {
      @Override
      public void call(final SingleSubscriber<? super ByteBuf> subscriber) {
        if (state() != LifecycleState.CONNECTED) {
          subscriber.onError(new NotConnectedException());
          return;
        }

        ByteBuf buffer = Unpooled.buffer();
        DcpGetPartitionSeqnosRequest.init(buffer);
        DcpGetPartitionSeqnosRequest.vbucketState(buffer, VbucketState.ACTIVE);

        sendRequest(buffer).addListener(new DcpResponseListener() {
          @Override
          public void operationComplete(Future<DcpResponse> future) throws Exception {
            if (future.isSuccess()) {
              ByteBuf buf = future.getNow().buffer();
              try {
                subscriber.onSuccess(MessageUtil.getContent(buf).copy());
              } finally {
                buf.release();
              }
            } else {
              subscriber.onError(future.cause());
            }
          }
        });
      }
    });
  }
994722
public function getSubscriptions()
    {
        $url = $this->accountsEndpoint . 'subscriptions';
        return Subscription::getCollection($url, 0, [], $this->connector->getClient());
    }
494018
def unsubscribe(self, subscription):
        
        params = {'ContentType' : 'JSON',
                  'SubscriptionArn' : subscription}
        response = self.make_request('Unsubscribe', params, '/', 'GET')
        body = response.read()
        if response.status == 200:
            return json.loads(body)
        else:
            boto.log.error('%s %s' % (response.status, response.reason))
            boto.log.error('%s' % body)
            raise self.ResponseError(response.status, response.reason, body)
778420
public function getSubscriptions()
    {
        if (!$this->__subscriptions) {
            $subscriptions = array();

            //Get all the public methods
            //$reflection = new ReflectionClass($this);
            //foreach ($reflection->getMethods(ReflectionMethod::IS_PUBLIC) as $method)
            foreach ($this->getMethods() as $method) {
                if (substr($method, 0, 2) == 'on') {
                    $subscriptions[] = $method;
                }
            }

            $this->__subscriptions = $subscriptions;
        }

        return $this->__subscriptions;
    }
731107
public Subscription getSubscription(String subscriptionId) throws Exception {
    // [START pubsub_get_subscription]
    try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
      ProjectSubscriptionName subscriptionName =
          ProjectSubscriptionName.of(projectId, subscriptionId);
      Subscription subscription = subscriptionAdminClient.getSubscription(subscriptionName);
      return subscription;
    }
    // [END pubsub_get_subscription]
  }
704528
def get(self, index, n_cols=70):
        

        if index < 0:
            raise IndexError

        while index >= len(self._subscription_data):
            try:
                with self._loader('Loading content'):
                    subscription = next(self._subscriptions)
                if self._loader.exception:
                    raise IndexError
            except StopIteration:
                raise IndexError
            else:
                data = self.strip_praw_subscription(subscription)
                self._subscription_data.append(data)

        data = self._subscription_data[index]
        data['split_title'] = self.wrap_text(data['title'], width=n_cols)
        data['n_rows'] = len(data['split_title']) + 1
        data['h_offset'] = 0

        return data
1328250
function (fn, create, update) {
  var subscriber = new Subscription(fn, update, this);

  // Immediately alias the starting value.
  subscriber.value = subscriber.execute();
  Utils.isFunction(create) && (subscriber.value = create(subscriber.value));

  return subscriber;
}
35115
def get_one(self, qry, tpl):
        '''  '''
        self.cur.execute(qry + ' LIMIT 1', tpl)
        result = self.cur.fetchone()
        # unpack tuple if it has only
        # one element
        # TODO unpack results
        if type(result) is tuple and len(result) == 1:
            result = result[0]
        return result
458107
function Subscription () {
  this._id = null

  this._storeRelations = null
  this._memberRelations = null
  this._dependencyRelations = null

  this._events = {
    'beforePublish': [],
    'afterPublish': []
  }

  this._subscriptionStream = null
  this._stream = null
  this._lastData = null

  this._muted = false

  storeRelation.constructParent(this)
  memberRelation.constructParent(this)
  dependencyRelation.constructParent(this)

  subscription.apply(this, arguments)
}
515782
def select_subscription(subs_code, subscriptions):
    
    if subs_code and subscriptions:
        for subs in subscriptions:
            if (subs.subscription_code == subs_code):
                return subs
    return None
735239
def subscription_get(subscription_id=None, **kwargs):
    '''
    

    '''
    result = {}

    if not subscription_id:
        subscription_id = kwargs.get('subscription_id')
    elif not kwargs.get('subscription_id'):
        kwargs['subscription_id'] = subscription_id

    subconn = __utils__['azurearm.get_client']('subscription', **kwargs)
    try:
        subscription = subconn.subscriptions.get(
            subscription_id=kwargs.get('subscription_id')
        )

        result = subscription.as_dict()
    except CloudError as exc:
        __utils__['azurearm.log_cloud_error']('resource', str(exc), **kwargs)
        result = {'error': str(exc)}

    return result
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