Example #1
0
 def delete(self):
     """取消收听某个用户"""
     assertion(not bool(self.self), "you can't unfollow your self")
     if self.ismyidol:
         self._api.friends.delete(name=self.name)
     else:
         pass
Example #2
0
 def delete(self):
     """取消收听某个用户"""
     assertion(not bool(self.self), "you can't unfollow your self")
     if self.ismyidol:
         self._api.friends.delete(name=self.name)
     else:
         pass
Example #3
0
 def add(self):
     """收听某个用户"""
     assertion(not bool(self.self), "you can't follow your self")
     if self.ismyidol:
         return                      # already flollowed
     else:
         self._api.friends.add(name=self.name)
Example #4
0
 def add(self):
     """收听某个用户"""
     assertion(not bool(self.self), "you can't follow your self")
     if self.ismyidol:
         return  # already flollowed
     else:
         self._api.friends.add(name=self.name)
Example #5
0
    def update(self, **kwargs):
        assertion(self.self, "you can only update youself's profile")

        nick = self.nick = kwargs.get("nick", self.nick)
        sex = self.sex = kwargs.get("sex", self.sex)
        year = self.birth_year = kwargs.get("year", self.birth_year)
        month = self.birth_month = kwargs.get("month", self.birth_month)
        day = self.birth_day = kwargs.get("day", self.birth_day)
        countrycode = self.country_code = kwargs.get("countrycode", self.country_code)
        provincecode = self.province_code = kwargs.get("provincecode", self.province_code)
        citycode = self.city_code = kwargs.get("citycode", self.city_code)
        introduction = self.introduction = kwargs.get("introduction", self.introduction)
        self._api.user.update(nick, sex, year, month, day, countrycode, provincecode, citycode, introduction)
Example #6
0
    def update(self, **kwargs):
        assertion(self.self, "you can only update youself's profile")

        nick = self.nick = kwargs.get('nick', self.nick)
        sex = self.sex = kwargs.get('sex', self.sex)
        year = self.birthyear = kwargs.get('year', self.birthyear)
        month = self.birthmonth = kwargs.get('month', self.birthmonth)
        day = self.birthday = kwargs.get('day', self.birthday)
        countrycode = self.countrycode = kwargs.get('countrycode',
                                                    self.countrycode)
        provincecode = self.provincecode = kwargs.get('provincecode',
                                                      self.provincecode)
        citycode = self.citycode = kwargs.get('citycode', self.citycode)
        introduction = self.introduction = kwargs.get('introduction',
                                                      self.introduction)
        self._api.user.update(nick, sex, year, month, day, countrycode,
                              provincecode, citycode, introduction)
Example #7
0
    def update(self, **kwargs):
        assertion(self.self, "you can only update youself's profile")

        nick = self.nick = kwargs.get('nick', self.nick)
        sex = self.sex = kwargs.get('sex', self.sex)
        year = self.birthyear = kwargs.get('year', self.birthyear)
        month = self.birthmonth = kwargs.get('month', self.birthmonth)
        day = self.birthday = kwargs.get('day', self.birthday)
        countrycode = self.countrycode = kwargs.get('countrycode',
                                                    self.countrycode)
        provincecode = self.provincecode = kwargs.get('provincecode',
                                                      self.provincecode)
        citycode = self.citycode = kwargs.get('citycode', self.citycode)
        introduction = self.introduction = kwargs.get('introduction',
                                                      self.introduction)
        self._api.user.update(nick, sex, year, month, day, countrycode,
                              provincecode, citycode, introduction)
Example #8
0
 def deleteblacklist(self):
     """从黑名单中删除某个用户"""
     assertion(not bool(self.self), "you can't block yourself")
     self._api.friends.deleteblacklist(name=self.name)
Example #9
0
 def addblacklist(self):
     """添加某个用户到黑名单"""
     assertion(not bool(self.self), "you can't block yourself")
     self._api.friends.addblacklist(name=self.name)
Example #10
0
 def deletespecial(self):
     """取消特别收听某个用户"""
     assertion(not bool(self.self), "you can't follow yourself")
     self._api.friends.deletespecial(name=self.name)
Example #11
0
 def pm(self, content, clientip='127.0.0.1', jing=None, wei=None):
     """发私信"""
     assertion(not bool(self.self), "you can't pm yourself")
     return self._api.private.add(self.name, content, clientip, jing, wei)
Example #12
0
 def deleteblacklist(self):
     """从黑名单中删除某个用户"""
     assertion(not bool(self.self), "you can't block yourself")
     self._api.friends.deleteblacklist(name=self.name)
Example #13
0
 def addblacklist(self):
     """添加某个用户到黑名单"""
     assertion(not bool(self.self), "you can't block yourself")
     self._api.friends.addblacklist(name=self.name)
Example #14
0
 def deletespecial(self):
     """取消特别收听某个用户"""
     assertion(not bool(self.self), "you can't follow yourself")
     self._api.friends.deletespecial(name=self.name)
Example #15
0
 def pm(self, content, clientip='127.0.0.1', jing=None, wei=None):
     """发私信"""
     assertion(not bool(self.self), "you can't pm yourself")
     return self._api.private.add(self.name, content, clientip, jing, wei)
Example #16
0
 def headimg(self, size=100):
     assertion(size in [20, 30, 40, 50, 100],
               'size must be one of 20 30 40 50 100')
     return '%s/%s' % (self.head, size)
Example #17
0
 def headimg(self, size=100):
     assertion(size in [20, 30, 40, 50, 100],
               'size must be one of 20 30 40 50 100')
     return '%s/%s' % (self.head, size)