Update your own membership.

        Note that this fails on former groups.

        :param str nickname: new nickname
        :return: updated membership
        :rtype: :class:`~groupy.api.members.Member`
492423
def update_membership(self, nickname=None, **kwargs):
        
        return self.memberships.update(nickname=nickname, **kwargs)
505162
def add_member(self, service_name, servicegroup_name):
        
        servicegroup = self.find_by_name(servicegroup_name)
        if not servicegroup:
            servicegroup = Servicegroup({'servicegroup_name': servicegroup_name,
                                         'alias': servicegroup_name,
                                         'members': service_name})
            self.add(servicegroup)
        else:
            servicegroup.add_members(service_name)
785166
def update_role(u_name, newprivilege):
        '''
        
        '''
        entry = TabMember.update(
            role=newprivilege
        ).where(TabMember.user_name == u_name)
        try:
            entry.execute()
            return True
        except:
            return False
1302154
def add_member(self, login):
        
        warnings.warn(
            'This is no longer supported by the GitHub API, see '
            'https://developer.github.com/changes/2014-09-23-one-more-week'
            '-before-the-add-team-member-api-breaking-change/',
            DeprecationWarning)
        url = self._build_url('members', login, base_url=self._api)
        return self._boolean(self._put(url), 204, 404)
831678
def cli(ctx, group_id, new_name):
    
    return ctx.gi.groups.update_group(group_id, new_name)
938378
def update(self, ogps):
        

        data = {'ogps': ogps}
        ogps_ids = [str(ogp.get('id')) for ogp in ogps]

        return super(ApiObjectGroupPermission, self).put('api/v3/object-group-perm/%s/' %
                                                         ';'.join(ogps_ids), data)
1345240
def update(self):
        
        if not self.can_update():
            self._tcex.handle_error(905, [self.type])

        return self.tc_requests.update(
            self.api_type, self.api_sub_type, self.unique_id, self._data, owner=self.owner
        )
1067435
def update(self, adgroup_id, creative_id, title, img_url, nick=None):
        ''''''
        request = TOPRequest('xxxxx.xxxxx.creative.update')
        request['adgroup_id'] = adgroup_id
        request['creative_id'] = creative_id
        request['title'] = title
        request['img_url'] = img_url
        if nick!=None: request['nick'] = nick
        self.create(self.execute(request), fields=['success','result','success','result_code','result_message'], models = {'result':CreativeRecord})
        return self.result
760304
def update_session(self, alias, headers=None, cookies=None):
        
        session = self._cache.switch(alias)
        session.headers = merge_setting(headers, session.headers)
        session.cookies = merge_cookies(session.cookies, cookies)
1007833
def add_membership(self, user, role):
        
        targetGroup = AuthGroup.objects(role=role, creator=self.client).first()
        if not targetGroup:
            return False

        target = AuthMembership.objects(user=user, creator=self.client).first()
        if not target:
            target = AuthMembership(user=user, creator=self.client)

        if not role in [i.role for i in target.groups]:
            target.groups.append(targetGroup)
            target.save()
        return True
1354072
def update_channel(self, channel):
        

        data = {'channels': channel}
        return super(ApiInterfaceRequest, self).put('api/v3/channel/', data)
475936
def as_nick(self, name):
        
        orig = self.get_nickname()
        self.nick(name)
        try:
            yield orig
        finally:
            self.nick(orig)
1329275
def uptime(self, event, nickname=None):
        
        if nickname and nickname != self.nickname:
            try:
                uptime = self.timesince(self.joined[nickname])
            except KeyError:
                return "%s is not in the channel" % nickname
            else:
                if nickname == self.get_nickname(event):
                    prefix = "you have"
                else:
                    prefix = "%s has" % nickname
                return "%s been here for %s" % (prefix, uptime)
        uptime = self.timesince(self.joined[self.nickname])
        return "I've been here for %s" % uptime
1313632
async def whowas(self, nickname):
        
        # Same treatment as nicknames in whois.
        if protocol.ARGUMENT_SEPARATOR.search(nickname) is not None:
            result = self.eventloop.create_future()
            result.set_result(None)
            return result

        if nickname not in self._pending['whowas']:
            await self.rawmsg('WHOWAS', nickname)
            self._whowas_info[nickname] = {}

            # Create a future for when the WHOWAS requests succeeds.
            self._pending['whowas'][nickname] = self.eventloop.create_future()

        return await self._pending['whowas'][nickname]
89544
def replace(self, identifier, new_instance):
        
        try:
            # Note that `self.update()` ultimately calls merge, which will not enforce
            # a strict replacement; absent fields will default to the current values.
            return self.update(identifier, new_instance)
        except ModelNotFoundError:
            return self.create(new_instance)
900149
def update(self):
        
        # updates intension
        self.update_intension()
        self._size_known_intension = len(self.members)
        self._update_members = False
348173
def get(nickname)
      users.each do |user|
        if user.nickname == nickname.to_s
          return user
        end
      end

      nil
    end