Gets a list of all domains, or optionally a page of domains.
771118
def list(self, limit=None, offset=None):
        """"""
        uri = "/%s%s" % (self.uri_base, self._get_pagination_qs(limit, offset))
        return self._list(uri)
360124
def list_next_page(self):
        
        uri = self._paging.get("domain", {}).get("next_uri")
        if uri is None:
            raise exc.NoMoreResults("There are no more pages of domains to "
                    "list.")
        return self._list(uri)
736781
def getDomainNames(store):
    
    domains = set()
    domains.update(store.query(
            LoginMethod,
            AND(LoginMethod.internal == True,
                LoginMethod.domain != None)).getColumn("domain").distinct())
    return sorted(domains)
1116024
def get_domains(self):
        
        url = self.API_TEMPLATE + self.DOMAINS
        data = self._get_json_from_response(url)

        domains = list()
        for item in data:
            domain = item['domain']
            domains.append(domain)
            self.logger.debug('Discovered domains: {}'.format(domain))

        return domains
1179046
def check_many(self, domains):
        
        return dict((item.domain, item.status) for item in self.check_domain_request(domains))
970341
@Override
	public List<ScopDomain> filterByDomainName(String query) {

		List<ScopDomain > domains = new ArrayList<ScopDomain>();
		if (query.length() <5){
			return domains;
		}

		String pdbId = query.substring(1,5);

		List<ScopDomain> doms = getDomainsForPDB(pdbId);


		if ( doms == null)
			return domains;

		query = query.toLowerCase();
		for ( ScopDomain d: doms){
			if ( d.getScopId().toLowerCase().contains(query)){
				domains.add(d);
			}
		}

		return domains;
	}
1151706
def domains(self):
        
        json = self.request('/domains', method='GET')
        status = json.get('status')
        if status == 'OK':
            domains_json = json.get('domains', [])
            domains = [Domain.from_json(domain) for domain in domains_json]
            return domains
        else:
            message = json.get('message')
            raise DOPException('[%s]: %s' % (status, message))
817650
private List<String> getDomainsFromUrl(URL url) {
        String host = url.getHost();
        String[] paths = new String[] {};
        if (url.getPath() != null) {
            paths = url.getPath().split("/");
        }
        List<String> domains = new ArrayList<String>(paths.length + 1);
        StringBuilder relative = new StringBuilder().append("http://").append(host).append("/");
        domains.add(relative.toString());
        for (String path : paths) {
            if (path.length() > 0) {
                relative.append(path).append("/");
                domains.add(relative.toString());
            }
        }
        return domains;
    }
1217025
def get_netki_domains(self, fetch=False):
        """"""
        return NetkiDomains(
            self.resource.netki_domains, self.client, populate=fetch)
718669
def get_services(profile='pagerduty', subdomain=None, api_key=None):
    '''
    
    '''

    return _list_items(
        'services',
        'id',
        profile=profile,
        subdomain=subdomain,
        api_key=api_key,
    )
56607
def list(domain=nil)
      if domain
        @mailgun.response = Mailgun::Base.fire(:get, @mailgun.api_url + "/domains/#{domain}")
      else
        @mailgun.response = Mailgun::Base.fire(:get, @mailgun.api_url + "/domains")["items"] || []
      end
    end
179726
def available_domains(self):
        
        if not hasattr(self, '_available_domains'):
            url = 'http://{0}/request/domains/format/json/'.format(
                self.api_domain)
            req = requests.get(url)
            domains = req.json()
            setattr(self, '_available_domains', domains)
        return self._available_domains
1268170
private function _getDomains(){
		if (empty($this->_domains)) {
			$domains = file_get_contents(RITATOOLS_DIR . 'Vendor' . DS . 'sde');
			$this->_domains = explode("\r\n",$domains);
		}
		
		return $this->_domains;
	}
619099
def list_subdomains(self, domain, limit=None, offset=None):
        
        # The commented-out uri is the official API, but it is
        # horribly slow.
#        uri = "/domains/%s/subdomains" % utils.get_id(domain)
        uri = "/domains?name=%s" % domain.name
        page_qs = self._get_pagination_qs(limit, offset)
        if page_qs:
            uri = "%s&%s" % (uri, page_qs[1:])
        return self._list_subdomains(uri, domain.id)
959985
private List<Domain> listAll(boolean reverse) throws GloboDnsException {
		GloboDnsRoot<Domain> globoDnsRoot = this.get("/domains.json" + (reverse ? "?reverse=true" : ""), true);
		if (globoDnsRoot == null) {
			throw new GloboDnsException("Invalid response");
		}
		return globoDnsRoot.getObjectList();
	}
387369
def all(cls, domain=None):
        
        Site = cls
        site = Session.query(Site)
        if domain:
            site.filter(Site.domain == domain)
        return site.all()
185882
def list(gandi, fqdn, name, sort, type, rrset_type, text):
    """"""
    domains = gandi.dns.list()
    domains = [domain['fqdn'] for domain in domains]
    if fqdn not in domains:
        gandi.echo('Sorry domain %s does not exist' % fqdn)
        gandi.echo('Please use one of the following: %s' % ', '.join(domains))
        return

    output_keys = ['name', 'ttl', 'type', 'values']

    result = gandi.dns.records(fqdn, sort_by=sort, text=text)
    if text:
        gandi.echo(result)
        return result

    for num, rec in enumerate(result):
        if type and rec['rrset_type'] != type:
            continue
        if rrset_type and rec['rrset_type'] != rrset_type:
            continue
        if name and rec['rrset_name'] != name:
            continue
        if num:
            gandi.separator_line()
        output_dns_records(gandi, rec, output_keys)

    return result