:calls: `GET /user/orgs <http://developer.github.com/v3/orgs>`_
        :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Organization.Organization`
427892
def get_orgs(self):
        
        return github.PaginatedList.PaginatedList(
            github.Organization.Organization,
            self._requester,
            "/user/orgs",
            None
        )
341625
def user_organisations_resource(doc):
    """"""
    if doc.get('type') == 'user':
        for org_id, resource in doc.get('organisations', {}).items():
            resource['id'] = org_id
            resource['user_id'] = doc['_id']
            yield [doc['_id'], org_id], resource
1234794
def list(self):
        
        
        uri = URITemplate(self.baseuri + '/{owner}').expand(
            owner=self.username)
        return self.session.get(uri)
99852
def api_orgas(request, key=None, hproPk=None):
    """"""

    if not check_api_key(request, key, hproPk):
        return HttpResponseForbidden

    list_orgas = []

    if settings.PIAPI_STANDALONE:
        list_orgas = [{'id': -1, 'name': 'EBU', 'codops': 'ZZEBU'},
                      {'id': -2, 'name': 'RTS', 'codops': 'CHRTS'},
                      {'id': -3, 'name': 'BBC', 'codops': 'GBEBU'},
                      {'id': -4, 'name': 'CNN', 'codops': 'USCNN'}]

    else:
        from organizations.models import Organization

        (_, _, hproject) = getPlugItObject(hproPk)

        if hproject and hproject.plugItLimitOrgaJoinable:
            orgas = hproject.plugItOrgaJoinable.order_by('name').all()
        else:
            orgas = Organization.objects.order_by('name').all()

        list_orgas = [{'id': orga.pk, 'name': orga.name, 'codops': orga.ebu_codops} for orga in orgas]

    retour = {'data': list_orgas}

    return HttpResponse(json.dumps(retour), content_type="application/json")
743284
def get_projects(self, state=github.GithubObject.NotSet):
        
        
        url_parameters = dict()
        if state is not github.GithubObject.NotSet:
            url_parameters["state"] = state
            
        return github.PaginatedList.PaginatedList(
            github.Project.Project,
            self._requester,
            self.url + "/projects",
            url_parameters,
            {"Accept": Consts.mediaTypeProjectsPreview}
        )
1104747
def get_events(self):
        
        return github.PaginatedList.PaginatedList(
            github.Event.Event,
            self._requester,
            self.url + "/events",
            None
        )
599544
def get_watched(self):
        
        return github.PaginatedList.PaginatedList(
            github.Repository.Repository,
            self._requester,
            self.url + "/watched",
            None
        )
57610
def get_bucket_file_list(self):
        
        logger.debug("Retrieving bucket object list")

        paginator = self.s3_client.get_paginator('list_objects')
        options = {
            'Bucket': self.aws_bucket_name
        }
        if self.aws_bucket_prefix:
            logger.debug("Adding prefix {} to bucket list as a filter".format(self.aws_bucket_prefix))
            options['Prefix'] = self.aws_bucket_prefix
        page_iterator = paginator.paginate(**options)

        obj_dict = {}
        for page in page_iterator:
            obj_dict.update(get_bucket_page(page))

        return obj_dict
439267
def get_licenses(self):
        

        url_parameters = dict()

        return github.PaginatedList.PaginatedList(
            github.License.License,
            self.__requester,
            "/licenses",
            url_parameters
        )
983171
def get_watchers(self):
        
        return github.PaginatedList.PaginatedList(
            github.NamedUser.NamedUser,
            self._requester,
            self.url + "/watchers",
            None
        )
757071
def get_keys(self):
        
        return github.PaginatedList.PaginatedList(
            github.UserKey.UserKey,
            self._requester,
            self.url + "/keys",
            None
        )
28097
def get_statuses(self):
        
        return github.PaginatedList.PaginatedList(
            github.CommitStatus.CommitStatus,
            self._requester,
            self._parentUrl(self._parentUrl(self.url)) + "/statuses/" + self.sha,
            None
        )
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
906697
def get_collaborators(self, affiliation=github.GithubObject.NotSet):
        

        url_parameters = dict()
        allowed_affiliations = ['outside', 'direct', 'all']
        if affiliation is not github.GithubObject.NotSet:
            assert isinstance(affiliation, str), affiliation
            assert affiliation in allowed_affiliations, \
                'Affiliation can be one of ' + ', '.join(allowed_affiliations)
            url_parameters['affiliation'] = affiliation

        return github.PaginatedList.PaginatedList(
            github.NamedUser.NamedUser,
            self._requester,
            self.url + "/collaborators",
            url_parameters
        )
245451
function getObjects(user) {
  var username = (_.isObject(user)) ? user.login : user;
  var isOrg = (_.isObject(user) && user.type === 'Organization');
  var defers = [];

  // Get repos
  defers.push(qG({
    obj: 'repos', method: 'getFromUser', user: username,
    sort: 'created', per_page: 100
  }));

  // Get gists
  defers.push(qG({
    obj: 'gists', method: 'getFromUser', user: username,
    sort: 'created', per_page: 100
  }));

  // Get members (for orgs)
  if (isOrg) {
    defers.push(qG({
      obj: 'orgs', method: 'getMembers', org: username,
      per_page: 100
    }));
  }

  return q.all(defers);
}
300013
def get_branches(self):
        
        return github.PaginatedList.PaginatedList(
            github.Branch.Branch,
            self._requester,
            self.url + "/branches",
            None
        )
837155
def get_user_paginator(
        cls,
        instance,
        page=1,
        item_count=None,
        items_per_page=50,
        user_ids=None,
        GET_params=None,
    ):
        
        if not GET_params:
            GET_params = {}
        GET_params.pop("page", None)
        query = instance.users_dynamic
        if user_ids:
            query = query.filter(cls.models_proxy.UserGroup.user_id.in_(user_ids))
        return SqlalchemyOrmPage(
            query,
            page=page,
            item_count=item_count,
            items_per_page=items_per_page,
            **GET_params
        )