@example Request syntax with placeholder values

   sns.subscriptions()
 @param [Hash] options ({})
 @return [Subscription::Collection]
327591
def subscriptions(options = {})
      batches = Enumerator.new do |y|
        resp = @client.list_subscriptions(options)
        resp.each_page do |page|
          batch = []
          page.data.subscriptions.each do |s|
            batch << Subscription.new(
              arn: s.subscription_arn,
              client: @client
            )
          end
          y.yield(batch)
        end
      end
      Subscription::Collection.new(batches)
    end
846208
def list_subscriptions_by_topic(TopicArn, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    NextToken = ''
    res = []
    try:
        while NextToken is not None:
            ret = conn.list_subscriptions_by_topic(TopicArn=TopicArn, NextToken=NextToken)
            NextToken = ret.get('NextToken', None)
            subs = ret.get('Subscriptions', [])
            res += subs
    except botocore.exceptions.ClientError as e:
        log.error('Failed to list subscriptions for SNS topic %s: %s', TopicArn, e)
        return None
    return res
1219565
def FnSub(string, substitutions = nil)
      raise ArgumentError, 'The first argument passed to Fn::Sub must be a string' unless string.is_a? String

      if substitutions
        raise ArgumentError, 'The second argument passed to Fn::Sub must be a Hash' unless substitutions.is_a? Hash

        Fn.new('Sub', [string, substitutions])
      else
        Fn.new('Sub', string)
      end
    end
1160819
function doQuery(options) {
            return models.Subscriber.findPage(options)
                .then(({data, meta}) => {
                    return {
                        subscribers: data.map(model => model.toJSON(options)),
                        meta: meta
                    };
                });
        }
132136
def _json_to_subscriptions(response_body):
    
    data = json.loads(response_body)
    subscriptions = []
    for subscription_data in data.get("subscriptionList", []):
        subscriptions.append(Subscription().from_json(
            data.get('uwNetID'), subscription_data))

    return subscriptions
730546
function subscriptionDispatcher (topic, data, options, subscriptions) {
    var
      resolver = createResolver(),
      fulfill = resolveUse('fulfilledValues', 'fulfilled', options, resolver),
      reject = resolveUse('rejectedValues', 'rejected', options, resolver);

    resolver.i = subscriptions.length - 1;
    resolver.resume = {
      topic: topic,
      data: data,
      subscriptions: subscriptions,
      fulfill: fulfill,
      reject: reject
    };

    resumeSubscriptionDispatcher(
      topic, data, options, subscriptions, resolver, fulfill, reject
    );
    evaluateLatch(resolver, options);

    return resolver.promise;
  }
1229765
def to_xml(options = {})
      subscriptions.each {|s| s.currency = nil}
      adjustments.each   {|a| a.currency = nil}
      super(options)
    end
1329526
def ! options = {}
      merged_options = merge_headers_and_queries options
      unless @stubbed
        self.class.send(@method, @path || '/', merged_options)
      else
        uri = "#{self.class.base_uri}#{@path}"

        stub_request(@method.to_sym, uri.to_s).with merged_options
      end
    end
718984
def create_params params
      options = {}
      options[:query] = params

      if @auth_token
        options[:query].merge!(auth_token: @auth_token)
      else
        options[:basic_auth] = @auth
      end

      options
    end
454405
def verify_sns_subscription_current(self, subscription_arn, topic_name,
                                        function_arn):
        # type: (str, str, str) -> bool
        
        sns_client = self._client('sns')
        try:
            attributes = sns_client.get_subscription_attributes(
                SubscriptionArn=subscription_arn)['Attributes']
            return (
                # Splitting on ':' is safe because topic names can't have
                # a ':' char.
                attributes['TopicArn'].rsplit(':', 1)[1] == topic_name and
                attributes['Endpoint'] == function_arn
            )
        except sns_client.exceptions.NotFoundException:
            return False
787950
function (subscriptions, fn, context) {
  for (var id in subscriptions) {
    for (var property in subscriptions[id]) {
      fn.call(context, subscriptions[id][property], property, id);
    }
  }
}
1196971
def subscriptions_url_for(target, params = {})
      options = params.dup
      options.delete(:devise_default_routes) ?
        send("#{routing_scope(options)}subscriptions_url", options) :
        send("#{routing_scope(options)}#{target.to_resource_name}_subscriptions_url", target, options)
    end
1279056
public Set<Method> subscriptionsOn(Object subscriber) {
        SubscriptionMethodFilter filter = new SubscriptionMethodFilter();
        Class<?> subscriberClass = subscriber.getClass();
        List<Method> methods = Arrays.asList(subscriberClass.getMethods());
        Set<Method> subscriptions = new HashSet<Method>();
        for (Method method : methods) {
            if (filter.accepts(method)) {
                subscriptions.add(method);
            }
        }
        return subscriptions;
    }
128176
def send_local_subs_to_route
      ObjectSpace.each_object(NATSD::Connection) do |c|
        next if c.closing? || c.type != 'Client'
        c.subscriptions.each_value do |sub|
          queue_data(NATSD::Server.route_sub_proto(sub))
        end
      end
    end
253633
def _get_subscriptions_endpoint(self):
        

        s = self.settings()

        params = {
            'access_token': self.app_access_token,
        }

        return (
            GRAPH_ENDPOINT.format(f'{s["app_id"]}/subscriptions'),
            params,
        )
801497
def subscription_by_uri(uri, options={})
      raise 'Error: Param uri is nil!' if uri.nil?

      url = url_for_uri(uri)
      url = append_query_params(url, options)
      client.get(url, options) do |response|
        a_hash = parse(response)
        Resource::Subscription.from_coach a_hash
      end
    end
311496
def as_json(_options = {})
      hash = {}
      instance_variables.each do |var|
        name = var[1..-1]

        if name =~ /^__/
          # if a variable starts with double underscore, strip one off
          name = name[1..-1]
        elsif name =~ /^_/
          # Hide variables that start with single underscore
          name = nil
        end

        hash[name] = instance_variable_get(var) if name
      end
      hash
    end