Returns a list of uwnetid.subscription objects
    corresponding to the netid and subscription code or list provided
182935
def get_netid_subscriptions(netid, subscription_codes):
    
    url = _netid_subscription_url(netid, subscription_codes)
    response = get_resource(url)
    return _json_to_subscriptions(response)
1055126
def list_by_subscription_id(custom_headers:nil)
      response = list_by_subscription_id_async(custom_headers:custom_headers).value!
      response.body unless response.nil?
    end
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
1113483
def update_subscription(netid, action, subscription_code, data_field=None):
    
    url = '{0}/subscription.json'.format(url_version())
    action_list = []

    if isinstance(subscription_code, list):
        for code in subscription_code:
            action_list.append(_set_action(
                netid, action, code, data_field))
    else:
        action_list.append(_set_action(
            netid, action, subscription_code, data_field))

    body = {'actionList': action_list}
    response = post_resource(url, json.dumps(body))
    return _json_to_subscription_post_response(response)
545246
def get_provider_link_ids(self):
        
        id_list = []
        for id_ in self._my_map['providerLinkIds']:
            id_list.append(Id(id_))
        return IdList(id_list)
1297769
def get_network_events(self):
        
        return github.PaginatedList.PaginatedList(
            github.Event.Event,
            self._requester,
            "/networks/" + self.owner.login + "/" + self.name + "/events",
            None
        )
521106
def list(self, subid, params=None):
        ''' 
        '''
        params = update_params(params, {'SUBID': subid})
        return self.request('/v1/server/list_ipv4', params, 'GET')
370738
def subscriptions(self):
        """"""
        if not hasattr(self, '_subscriptions'):
            subscriptions_resource = self.resource.subscriptions
            self._subscriptions = Subscriptions(
                subscriptions_resource, self.client)
        return self._subscriptions
82960
def get_subscribers(self):
        
        data = self.signal.instance_subscribers
        if self.instance not in data:
            data[self.instance] = MethodAwareWeakList()
        return data[self.instance]
968437
def get_subscriptions(self, nodes=[]):
        
        if len(nodes) > 0:
            data = [node for node in self.get_clients() if node['name'] in nodes]
        else:
            data = self.get_clients()
        channels = []
        for client in data:
            if 'subscriptions' in client:
                if isinstance(client['subscriptions'], list):
                    for channel in client['subscriptions']:
                        if channel not in channels:
                            channels.append(channel)
                else:
                    if client['subscriptions'] not in channels:
                        channels.append(client['subscriptions'])
        return channels
817789
def get_endpoints_by_subscriber_id(self, subscriber_id):
        
        self._validate_subscriber_id(subscriber_id)

        url = "/notification/v1/endpoint?subscriber_id={}".format(
            subscriber_id)

        response = NWS_DAO().getURL(url, self._read_headers)

        if response.status != 200:
            raise DataFailureException(url, response.status, response.data)

        data = json.loads(response.data)

        endpoints = []
        for datum in data.get("Endpoints", []):
            endpoints.append(self._endpoint_from_json(datum))
        return endpoints
1234794
def list(self):
        
        
        uri = URITemplate(self.baseuri + '/{owner}').expand(
            owner=self.username)
        return self.session.get(uri)
778749
def get_memberships_for_org(self, account_num, verbose=False):
        
        if not self.client.session_id:
            self.client.request_session()

        query = "SELECT Objects() FROM Membership " \
                "WHERE Owner = '%s' ORDER BY ExpirationDate" % account_num

        membership_list = self.get_long_query(query, verbose=verbose)
        return membership_list or []
148585
def list_device_subscriptions(self, device_id, **kwargs):
        
        api = self._get_api(mds.SubscriptionsApi)
        resp = api.get_endpoint_subscriptions(device_id, **kwargs)
        return resp.split("\n")
1250326
def get_subscription_labels(self, userPk):
        """"""
        r = self._request('subscriptions/' + str(userPk))
        if r:
            s = r.json()
            return s
        return []
1264981
def search_subscriptions(self, **kwargs):
        
        params = [(key, kwargs[key]) for key in sorted(kwargs.keys())]
        url = "/notification/v1/subscription?{}".format(
            urlencode(params, doseq=True))

        response = NWS_DAO().getURL(url, self._read_headers)

        if response.status != 200:
            raise DataFailureException(url, response.status, response.data)

        data = json.loads(response.data)
        subscriptions = []
        for datum in data.get("Subscriptions", []):
            subscriptions.append(self._subscription_from_json(datum))
        return subscriptions
713991
def list_nics(access_token, subscription_id):
    '''
    '''
    endpoint = ''.join([get_rm_endpoint(),
                        '/subscriptions/', subscription_id,
                        '/providers/Microsoft.Network/',
                        '/networkInterfaces?api-version=', NETWORK_API])
    return do_get(endpoint, access_token)