Ejemplo n.º 1
0
 def boost_post(self, votes):
     for i in tqdm(range(votes)):
         tmpClient = RESTClient(self.location, None)
         tmpClient.upvote(self.last_post)
         tmpClient.close()
Ejemplo n.º 2
0
from jodelrest import RESTClient
from tqdm import *

__author__ = 'Jan'

uni = {"latitude": 53.107, "longtitude": 8.853, "city": "Bremen"}

rc = RESTClient(uni, None)
posts = rc.get_posts()
rc.close()

for post in posts:
    print '[ %s ] %s' % (post['vote_count'], post['message'].encode('UTF-8'))
    var = str(raw_input("[ up / down / exit ] : "))

    commands = {'up', 'down', 'exit'}

    if var == 'exit':
        break

    id = post['post_id']

    if var not in commands:
        continue
    elif var =='exit':
        break

    else:
        amount = int(raw_input('# Wie viel ? '))
        for i in tqdm(range(amount)):
            rc = RESTClient(uni, None)
Ejemplo n.º 3
0
from jodelrest import RESTClient
from tqdm import *
import json

__author__ = 'Jan'

uni = {"latitude": 53.107, "longtitude": 8.853, "city": "Bremen"}

rc = RESTClient(uni, None)
posts = rc.get_posts()
rc.close()

for post in posts:
    if 'children' in post:
        print "[Comments : %s] [Votes : %s]" % (len(
            post['children']), post['vote_count'])
        #for comment in  post['children']:
        #    print "Kommentar : %s" % comment
    else:
        print "[Comments : 0] [Votes : %s]" % post['vote_count']

    print '%s' % (post['message'].encode('UTF-8'))
    var = str(raw_input("[ up / down / comment / view / exit ] : "))

    commands = {'up', 'down', 'comment', 'view', 'exit'}

    if var == 'exit':
        break

    id = post['post_id']
Ejemplo n.º 4
0
 def boost_post(self, votes):
     for i in tqdm(range(votes)):
         tmpClient = RESTClient(self.location, None)
         tmpClient.upvote(self.last_post)
         tmpClient.close()