Get the guild data accessible for the account
968166
function accountGuilds (client) {
  return client.account().get().then(account => {
    if (!account.guild_leader) {
      return []
    }

    let requests = account.guild_leader.map(id => wrap(() => guildData(id)))
    return flow.parallel(requests)
  })

  function guildData (id) {
    let requests = {
      data: wrap(() => client.guild().get(id)),
      members: wrap(() => client.guild(id).members().get()),
      ranks: wrap(() => client.guild(id).ranks().get()),
      stash: wrap(() => client.guild(id).stash().get()),
      teams: wrap(() => Promise.resolve(null)),
      treasury: wrap(() => client.guild(id).treasury().get()),
      upgrades: wrap(() => client.guild(id).upgrades().get())
    }

    return flow.parallel(requests)
  }
}
641677
def data(self, index, role):
        """"""
        if role == Qt.ToolTipRole:
            root_dir = self.path_list[0].split(osp.sep)[-1]
            if index.data() == root_dir:
                return osp.join(self.root_path, root_dir)
        return QSortFilterProxyModel.data(self, index, role)
1239968
def _query_account_rg(cli_ctx, account_name):
    """"""
    scf = get_mgmt_service_client(cli_ctx, CUSTOM_MGMT_STORAGE)
    acc = next((x for x in scf.storage_accounts.list() if x.name == account_name), None)
    if acc:
        from msrestazure.tools import parse_resource_id
        return parse_resource_id(acc.id)['resource_group'], scf
    raise ValueError("Storage account '{}' not found.".format(account_name))
1245816
def getData(self):
        """"""
        url = self.server + self.name
        data = GitHubUser.__getDataFromURL(url)
        web = BeautifulSoup(data, "lxml")
        self.__getContributions(web)
        self.__getLocation(web)
        self.__getAvatar(web)
        self.__getNumberOfRepositories(web)
        self.__getNumberOfFollowers(web)
        self.__getBio(web)
        self.__getJoin(web)
        self.__getOrganizations(web)
641775
def update_guild_role(data)
      role_data = data['role']
      server_id = data['guild_id'].to_i
      server = @servers[server_id]
      new_role = Role.new(role_data, self, server)
      role_id = role_data['id'].to_i
      old_role = server.roles.find { |r| r.id == role_id }
      old_role.update_from(new_role)
    end
809039
def _member_data_key(self, leaderboard_name):
        '''
        
        '''
        if self.global_member_data is False:
            return '%s:%s' % (leaderboard_name, self.member_data_namespace)
        else:
            return self.member_data_namespace
96968
def _GetGsScopes(self):
    """"""
    service_accounts = self.watcher.GetMetadata(metadata_key=self.metadata_key)
    try:
      scopes = service_accounts[self.service_account]['scopes']
      return list(GS_SCOPES.intersection(set(scopes))) if scopes else None
    except KeyError:
      return None
1034355
def account_info(self):
        
        account_info = self._attribute.get("account_info")
        if account_info:
            return {"persona": account_info.get("personaname", ""),
                    "id64": account_info["steamid"]}
        else:
            return None
1310666
def get_account_details(self, account):
        
        result = {}
        try:
            luser = self._get_account(account.username)
            luser = preload(luser, database=self._database)
        except ObjectDoesNotExist:
            return result

        for i, j in luser.items():
            if i != 'userPassword' and j is not None:
                result[i] = j

        return result
898223
def get_user_info(self, steamID):
        """"""
        url = self.create_request_url(self.USER, steamID)
        data = self.retrieve_request(url)
        return self.return_data(data, format='xml')
330109
function get($guild, string $key, $defaultValue = null) {
        $guild = $this->getGuildID($guild);
        
        if($this->settings->get($guild) === null) {
            $this->client->emit('warn', 'Settings of specified guild is not loaded - loading row - returning default value');
            
            $this->create($guild);
            return $defaultValue;
        }
        
        $settings = $this->settings->get($guild);
        if(\array_key_exists($key, $settings)) {
            return $settings[$key];
        }
        
        return $defaultValue;
    }
671874
def get_my_data(self, session=None):
        
        params = clean_locals(locals())
        method = 'GetMyData'
        (response, elapsed_time) = self.request(method, params, session)
        return response
519457
def _get_account_number(self, token, uuid):
        """"""
        # Data
        data = {"accessToken": token,
                "uuid": uuid}
        # Http request
        try:
            raw_res = yield from self._session.post(ACCOUNT_URL,
                                                    data=data,
                                                    headers=self._headers,
                                                    timeout=self._timeout)
        except OSError:
            raise PyFidoError("Can not get account number")
        # Load answer as json
        try:
            json_content = yield from raw_res.json()
            account_number = json_content\
                            .get('getCustomerAccounts', {})\
                            .get('accounts', [{}])[0]\
                            .get('accountNumber')
        except (OSError, ValueError):
            raise PyFidoError("Bad json getting account number")
        # Check collected data
        if account_number is None:
            raise PyFidoError("Can not get account number")

        return account_number
3376
def member_info(self, member_id):
        """"""
        info = self._shards[member_id].copy()
        info['id'] = member_id
        info['tags'] = self.tags.get(member_id, list())
        return info
372974
def get_accounts(self, fetch=False):
        """"""
        return Accounts(self.resource.accounts, self.client, wallet=self, populate=fetch)
138312
def user_data(self, access_token, *args, **kwargs):
        """"""
        url = GOOGLE_APPENGINE_PROFILE_V2
        return self.get_json(url, headers={
            'Authorization': 'Bearer ' + access_token
        })
20176
async def _retrieve_guilds_before_strategy(self, retrieve):
        """"""
        before = self.before.id if self.before else None
        data = await self.get_guilds(retrieve, before=before)
        if len(data):
            if self.limit is not None:
                self.limit -= retrieve
            self.before = Object(id=int(data[-1]['id']))
        return data