Retrieves all current OrganizationType objects
6044
def get_org_types(self):
        
        if not self.client.session_id:
            self.client.request_session()

        object_query = "SELECT Objects() FROM OrganizationType"
        result = self.client.execute_object_query(object_query=object_query)
        msql_result = result['body']["ExecuteMSQLResult"]
        return self.package_org_types(msql_result["ResultValue"]
                                      ["ObjectSearchResult"]
                                      ["Objects"]["MemberSuiteObject"]
                                      )
137522
def system_find_orgs(input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/system/findOrgs', input_params, always_retry=always_retry, **kwargs)
630428
public function getActiveOrganizationId()
    {
        $request = $this->getRequest();
        if ($request->isPost()) {
            return $request->getParam($this->organizationFieldName);
        }
    }
266481
def get_orgs(options = {})
      raise ArgumentError, 'You must provide a :org option' if options[:org].nil? || options[:org].empty?
      options.merge!({:method => 'getOrgs'})
      self.class.get("/", :query => options)
    end
768994
def export(self):
        
        organizations = {}

        orgs = api.registry(self.db)

        for org in orgs:
            domains = [{'domain': dom.domain,
                        'is_top': dom.is_top_domain}
                       for dom in org.domains]
            domains.sort(key=lambda x: x['domain'])

            organizations[org.name] = domains

        obj = {'time': str(datetime.datetime.now()),
               'blacklist': [],
               'organizations': organizations,
               'uidentities': {}}

        return json.dumps(obj, default=self._json_encoder,
                          indent=4, separators=(',', ': '),
                          sort_keys=True)
1054406
@Override
	public List<Issue> listOrganizationIssues(String organization) {
		Map<String, Object> uriVariables = new HashMap<>();
		uriVariables.put("organization", organization);
		return getRestOperations()
				.exchange(buildUri("/orgs/{organization}/issues?per_page=25", uriVariables), HttpMethod.GET, null, issueListTypeRef)
				.getBody();
	}
634174
public function listOrganizationRepositories(string $organization, string $type = AbstractApi::TYPE_ALL): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/orgs/:org/repos?:args', $organization,
            http_build_query(['type' => $type])));
    }
767539
def get_organization(self, **kwargs):
        
        resp = self._get(self._u(self._ORGANIZATION_ENDPOINT_SUFFIX),
                         **kwargs)
        resp.raise_for_status()
        return resp.json()
154063
def organisations(self):
        ''''''
        class Org:
            def __init__(self, sdo_id, org_id, members, obj):
                self.sdo_id = sdo_id
                self.org_id = org_id
                self.members = members
                self.obj = obj

        with self._mutex:
            if not self._orgs:
                for org in self._obj.get_owned_organizations():
                    owner = org.get_owner()
                    if owner:
                        sdo_id = owner._narrow(SDOPackage.SDO).get_sdo_id()
                    else:
                        sdo_id = ''
                    org_id = org.get_organization_id()
                    members = [m.get_sdo_id() for m in org.get_members()]
                    self._orgs.append(Org(sdo_id, org_id, members, org))
        return self._orgs
823167
public function listOrganizationRepositories($organization, $type = null)
	{
		$data = array();
		if(!is_null($type))
			$data['type'] = $type;
		
		return $this->client->request("/orgs/$organization/repos", 'GET', $data, 200, 'GitHubSimpleRepo', true);
	}
724462
def get_organizations(self, permission='read'):
        # type: (str) -> List['Organization']
        
        success, result = self._read_from_hdx('user', self.data['name'], 'id', self.actions()['listorgs'],
                                              permission=permission)
        organizations = list()
        if success:
            for organizationdict in result:
                organization = hdx.data.organization.Organization.read_from_hdx(organizationdict['id'])
                organizations.append(organization)
        return organizations
781654
def get_current_orga(request, hproject, availableOrga):
    """"""

    # If nothing available return 404
    if len(availableOrga) == 0:
        raise Http404

    # Find the current orga
    currentOrgaId = request.session.get('plugit-orgapk-' + str(hproject.pk), None)

    # If we don't have a current one select the first available
    if currentOrgaId is None:
        (tmpOrga, _) = availableOrga[0]
        currentOrgaId = tmpOrga.pk
    else:
        # If the current Orga is not among the available ones reset to the first one
        availableOrgaIds = [o.pk for (o, r) in availableOrga]
        if currentOrgaId not in availableOrgaIds:
            (tmpOrga, _) = availableOrga[0]
            currentOrgaId = tmpOrga.pk

    from organizations.models import Organization

    realCurrentOrga = get_object_or_404(Organization, pk=currentOrgaId)

    return realCurrentOrga
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 []
286527
@GET
    @Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON})
    @Path(ServerAPI.GET_NAMES)
    public Response getNames(){
        LOG.info("Got a get organization names request.");

        final ListView view = new ListView("Organization Ids list", "Organizations");
        final List<String> names = getOrganizationHandler().getOrganizationNames();
        view.addAll(names);

        return Response.ok(view).build();
    }
657696
function getCollectionsCompact(forEntity, includeNew) {
  let associations = forEntity.getMeta().fetch('associations');
  let collections  = {};

  Object.getOwnPropertyNames(associations).forEach(index => {
    let association = associations[index];

    if (association.type !== 'collection') {
      return;
    }

    collections[index] = [];
    if (!Array.isArray(forEntity[index])) {
      return;
    }

    forEntity[index].forEach(entity => {
      if (typeof entity === 'number') {
        collections[index].push(entity);

        return;
      }

      if (!(entity instanceof Entity)) {
        return;
      }

      if (entity.getId()) {
        collections[index].push(entity.getId());

        return;
      }

      if (includeNew) {
        collections[index].push(entity);

        return;
      }
    });
  });

  return collections;
}
952786
def organization_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/organizations/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
799797
def get_current_structure(self):
        

        struct = self.__class__.get_structure()
        struct.update(self.__field_types__)
        return struct