Get an organization

@link https://developer.github.com/v3/orgs/#get-an-organization

@param string $org

@return array
@throws \Exception
435279
public function get(string $org): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/orgs/:org', $org));
    }
875856
public function getOrganizations($includeGroups = true)
    {
        $organizations = [];

        if ($includeGroups) {
            foreach ($this->groups as $group) {
                array_merge($organizations, $group->getOrganizations()->toArray());
            }
        }

        $userOrgas = $this->userOrganizationReferences->toArray();
        $userOrgas = array_map(function ($ref) {
            return $ref->getOrganization();
        }, $userOrgas);

        return array_merge($organizations, $userOrgas);
    }
1298442
public function createFork(string $organization = ''): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/forks',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()), Request::METHOD_POST,
            ['organization' => $organization]);
    }
889878
public java.lang.String getOrganization() {
    java.lang.Object ref = organization_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      organization_ = s;
      return s;
    }
  }
714705
public function getCurrentOrganizationId()
    {
        $userLoader = $this->loader->getUserLoader();

        // Url determines organization first.
        if ($orgId = $userLoader->getOrganizationIdByUrl()) {
            $this->_organizationFromUrl = true;
            $userLoader->getCurrentUser()->setCurrentOrganization($orgId);
            return $orgId;
        }

        $request = $this->getRequest();
        if ($request->isPost() && ($orgId = $request->getParam($this->organizationFieldName))) {
            return $orgId;
        }

        return $userLoader->getCurrentUser()->getCurrentOrganizationId();
    }
498426
public function getOrganizationUsers($orgId)
    {
        $response = $this->doRequest(
            self::RESOURCE_GET_ORGANIZATION_USERS,
            [
                'orgId' => $orgId
            ]
        );

        return OrganizationUsersList::fromStream($response);
    }
572368
public function getMethod($method)
    {
        $method = \strtoupper($method);

        if (!isset($this->methods[$method])) {
            throw new \Exception('Method not found');
        }

        return $this->methods[$method];
    }
1033047
public function getGroupedApplications()
    {
        $organizations = $this->getEntityManager()
            ->getRepository(Organization::class)
            ->findAll();

        $applications = $this->findAll();

        usort($applications, $this->applicationSorter());
        usort($organizations, $this->organizationSorter());

        $grouped = [];
        foreach ($organizations as $org) {
            $grouped[$org->id()] = [];
        }

        foreach ($applications as $app) {
            $orgID = $app->organization() ? $app->organization()->id() : 'none';
            $grouped[$orgID][] = $app;
        }

        return $grouped;
    }
928002
public function getYourOrganizationMembership(string $org): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/user/memberships/orgs/:org', $org));
    }
1121574
public function getActiveOrganizations()
    {
        $sql = "SELECT gor_id_organization, gor_name
                    FROM gems__organizations
                    WHERE (gor_active = 1 AND
                            gor_id_organization IN (SELECT gr2o_id_organization FROM gems__respondent2org)) OR
                        gor_id_organization = ?
                    ORDER BY gor_name";

        $orgId = $this->loader->getCurrentUser()->getCurrentOrganizationId();

        return $this->_getSelectPairsCached(__FUNCTION__ . '_' . $orgId, $sql, $orgId, 'organizations', 'natsort');
    }
862947
public static function get_scorm_scoes($scormid, $organization = '') {
        global $DB;

        $params = self::validate_parameters(self::get_scorm_scoes_parameters(),
                                            array('scormid' => $scormid, 'organization' => $organization));

        $scoes = array();
        $warnings = array();

        $scorm = $DB->get_record('scorm', array('id' => $params['scormid']), '*', MUST_EXIST);
        $cm = get_coursemodule_from_instance('scorm', $scorm->id);

        $context = context_module::instance($cm->id);
        self::validate_context($context);

        // Check settings / permissions to view the SCORM.
        scorm_require_available($scorm, true, $context);

        if (!$scoes = scorm_get_scoes($scorm->id, $params['organization'])) {
            // Function scorm_get_scoes return false, not an empty array.
            $scoes = array();
        } else {
            $scoreturnstructure = self::get_scorm_scoes_returns();
            foreach ($scoes as $sco) {
                $extradata = array();
                foreach ($sco as $element => $value) {
                    // Check if the element is extra data (not a basic SCO element).
                    if (!isset($scoreturnstructure->keys['scoes']->content->keys[$element])) {
                        $extradata[] = array(
                            'element' => $element,
                            'value' => $value
                        );
                    }
                }
                $sco->extradata = $extradata;
            }
        }

        $result = array();
        $result['scoes'] = $scoes;
        $result['warnings'] = $warnings;
        return $result;
    }
525743
public function get($key)
    {
        if (!$this->has($key)) {
            throw new Exception(sprintf(Exception::STATS_KEY_NOT_EXISTS, $key));
        }

        return $this->getCachedStats()->offsetGet($key);
    }
253059
def get_organization(self, organization_id):
        
        url = 'rest/servicedeskapi/organization/{}'.format(organization_id)

        return self.get(url, headers=self.experimental_headers)
946390
public function getUserOrg($user, $org)
	{
		// Build the request path.
		$path = '/users/' . $user . '/events/orgs/' . $org;

		return $this->processResponse(
			$this->client->get($this->fetchUrl($path))
		);
	}
242807
public function getOrganizationByInn($inn)
    {
        $response = $this->doRequest(
            self::RESOURCE_GET_ORGANIZATION,
            [
                'inn' => $inn
            ]
        );

        return Organization::fromStream($response);
    }
198345
public function getStack($stackName, $organization = '')
    {
        $contents = $this
            ->call('GET', implode('/', [self::STACK_RESOURCE, $this->getOrganizationName($organization), $stackName]))
            ->getBody()
            ->getContents();

        return Stack::createFromJsonResponse($contents);
    }
595811
protected function _getOrganizationsList()
    {
        $html = new \MUtil_Html_Sequence();
        $sql = '
            SELECT *
            FROM gems__organizations
            WHERE gor_active=1 AND gor_url IS NOT NULL AND gor_task IS NOT NULL
            ORDER BY gor_name';

        // $organizations = array();
        // $organizations = array(key($organizations) => reset($organizations));
        $organizations = $this->db->fetchAll($sql);
        $orgCount = count($organizations);


        switch ($orgCount) {
            case 0:
                return $html->pInfo(sprintf($this->_('%s is still under development.'), $this->project->getName()));

            case 1:
                $organization = reset($organizations);

                $p = $html->pInfo(sprintf($this->_('%s is run by: '), $this->project->getName()));
                $p->a($organization['gor_url'], $organization['gor_name']);
                $p->append('.');

                $html->pInfo()->sprintf(
                        $this->_('Please contact the %s if you have any questions regarding %s.'),
                        $organization['gor_name'],
                        $this->project->getName()
                        );

                return $html;

            default:

                $p = $html->pInfo(sprintf(
                        $this->_('%s is a collaboration of these organizations:'),
                        $this->project->getName()
                        ));

                $data = \MUtil_Lazy::repeat($organizations);
                $ul = $p->ul($data, array('class' => 'indent'));
                $li = $ul->li();
                $li->a($data->gor_url->call($this, '_'), $data->gor_name, array('rel' => 'external'));
                $li->append(' (');
                $li->append($data->gor_task->call(array($this, '_')));
                $li->append(')');

                $html->pInfo()->sprintf(
                        $this->_('You can contact any of these organizations if you have questions regarding %s.'),
                        $this->project->getName()
                        );

                return $html;
        }
    }