forked from axiom-team/jaklis
Allow like myself...
This commit is contained in:
parent
236de7092c
commit
be41a11cb3
|
@ -45,7 +45,7 @@ args = parser.parse_args()
|
|||
if sys.argv[1] == "like":
|
||||
if args.stars or args.stars == 0:
|
||||
gchange = SendLikes(dunikey, pod)
|
||||
gchange.like(args.profile, args.stars)
|
||||
gchange.like(args.stars, args.profile)
|
||||
else:
|
||||
gchange = ReadLikes(dunikey, pod)
|
||||
gchange.readLikes(args.profile)
|
||||
|
|
|
@ -127,6 +127,7 @@ class SendLikes:
|
|||
|
||||
# Configure JSON document to send
|
||||
def configDoc(self, profile, likes):
|
||||
if not profile: profile = self.issuer
|
||||
if likes not in range(0, 6):
|
||||
sys.stderr.write(colored('Votre like doit être compris entre 0 et 5.\n', 'red'))
|
||||
return False
|
||||
|
@ -191,7 +192,7 @@ class SendLikes:
|
|||
|
||||
|
||||
|
||||
def like(self, profile, stars):
|
||||
def like(self, stars, profile=False):
|
||||
document = self.configDoc(profile, stars)
|
||||
if document:
|
||||
self.sendDocument(document, profile)
|
||||
|
|
Loading…
Reference in New Issue