Ejemplo n.º 1
0
class EventSender:
	def __init__(self,user=None,clientid=None):
		try:
			user = Config().feefie_client_user
		except:
			user = '******'

		try:
			clid = Config().feefie_client_id
		except:
			clid = self.random_client_id()
			

		self.fofum = Fofum(user=user)
		self.fofum.make(clid)

	def fire(self,**kwargs):
                kwargs["uuid"] = str(uuid.uuid1())
		self.fofum.fire(json.dumps(kwargs))
Ejemplo n.º 2
0
class EventSender:
    def __init__(self, user=None, clientid=None):
        try:
            user = Config().feefie_client_user
        except:
            user = '******'

        try:
            clid = Config().feefie_client_id
        except:
            clid = get_random_client_id()
            print "EventSender: no feefie_client_id configured. Using random id %s" % clid

        self.fofum = Fofum(user=user)
        self.fofum.make(clid)

    def fire(self, **kwargs):
        kwargs["uuid"] = str(uuid.uuid1())
        self.fofum.fire(json.dumps(kwargs))
Ejemplo n.º 3
0
class EventSender:
    def __init__(self, user=None, clientid=None):

        user = Config.get("feefie.client_user")

        try:
            clid = Config.get("feefie.client_id")
        except:
            clid = get_random_client_id()
            print "EventSender: no feefie_client_id configured. Using random id %s" % clid

        if fofum_enabled:
            self.fofum = Fofum(user=user)
            self.fofum.make(clid)

    def fire(self, **kwargs):
        kwargs["uuid"] = str(uuid.uuid1())
        if fofum_enabled:
            self.fofum.fire(json.dumps(kwargs))
Ejemplo n.º 4
0
class EventSender:
    def __init__(self,user=None,clientid=None):

        user = Config.get("feefie.client_user")

        try:
            clid = Config.get("feefie.client_id")
        except:
            clid = get_random_client_id()
            print "EventSender: no feefie_client_id configured. Using random id %s" % clid

        if fofum_enabled:
            self.fofum = Fofum(user=user)
            self.fofum.make(clid)

    def fire(self,**kwargs):
        kwargs["uuid"] = str(uuid.uuid1())
        if fofum_enabled:
            self.fofum.fire(json.dumps(kwargs))
Ejemplo n.º 5
0
#!/usr/bin/python

from fofum import Fofum

def ev(msg):
  print msg

f = Fofum(user='******')
f.make('test')
f.fire('Hello')