MessageSender skeleton
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		@@ -1,6 +1,8 @@
 | 
				
			|||||||
#!/usr/bin/env python
 | 
					#!/usr/bin/env python
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#IDE JÖNNEK IMPORTOK
 | 
					# IDE JÖNNEK IMPORTOK
 | 
				
			||||||
 | 
					import random
 | 
				
			||||||
 | 
					import string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
Main Flask RESTful API
 | 
					Main Flask RESTful API
 | 
				
			||||||
@@ -15,17 +17,37 @@ class MessageSender:
 | 
				
			|||||||
    """
 | 
					    """
 | 
				
			||||||
    Üzenetek küldéséért felelős komponens.
 | 
					    Üzenetek küldéséért felelős komponens.
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
 | 
					    id
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self):
 | 
					    def __init__(self):
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        Inicializálja az osztályt.
 | 
					        Inicializálja az osztályt.
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
 | 
					        self.id = 0
 | 
				
			||||||
        pass
 | 
					        pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def cucc(self, szam: int, szoveg: str) -> str:
 | 
					
 | 
				
			||||||
 | 
					    def randomString(self, stringLength):
 | 
				
			||||||
 | 
					        """Generate a random string of fixed length """
 | 
				
			||||||
 | 
					        letters = string.ascii_lowercase
 | 
				
			||||||
 | 
					        return ''.join(random.choice(letters) for i in range(stringLength))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def CreateMessage(self, p) -> str:
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        Ez egy metodus
 | 
					        Ez egy metodus
 | 
				
			||||||
        :param szam:
 | 
					        :param szam:
 | 
				
			||||||
        :param szoveg:
 | 
					        :param szoveg:
 | 
				
			||||||
        :return: str tipus
 | 
					        :return: str tipus
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
 | 
					        self.id += random.randrange(10000)
 | 
				
			||||||
 | 
					        data = self.randomString(p)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #print(str(self.id) + " " + str(data))
 | 
				
			||||||
 | 
					        return str(self.id) + " " + str(data)
 | 
				
			||||||
        pass
 | 
					        pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if __name__ == "__main__":
 | 
				
			||||||
 | 
					    temp = MessageSender()
 | 
				
			||||||
 | 
					    print(temp.CreateMessage(20))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user