~omg/omg/pyomg

« back to all changes in this revision

Viewing changes to omg/omg.py

  • Committer: Manish Sinha
  • Date: 2010-09-12 20:33:03 UTC
  • Revision ID: manishsinha.tech@gmail.com-20100912203303-8kt3gzxyqlvfqzr7
Wrapped GetTrophyByApp, GetTrophyById and GetAllSetNames

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
        trophy_list = self.__interface.GetTrophyBySet(str(setname))
30
30
        return [self.__UnwrapTrophy(trp) for trp in trophy_list]
31
31
 
 
32
    def GetTrophyByApp(self, appname):
 
33
        """ Get all the trophies registered by a specific application"""
 
34
 
 
35
        trophy_list = self.__interface.GetTrophyByApp(str(appname))
 
36
        return [self.__UnwrapTrophy(trp) for trp in trophy_list]
 
37
 
 
38
    def GetTrophyById(self, id):
 
39
        """ Get the trophie registered by it's ID"""
 
40
 
 
41
        trophy_list = self.__interface.GetTrophyById(str(id))
 
42
        return [self.__UnwrapTrophy(trp) for trp in trophy_list]
 
43
 
 
44
    def GetAllSetNames(self):
 
45
        """ Get the name of all the Trophy sets """
 
46
 
 
47
        set_names = self.__interface.GetAllSetNames()
 
48
        return [str(name) for name in set_names]
 
49
 
 
50
 
 
51
 
32
52
    def __UnwrapTrophy(self, trophy):
33
53
        """ Unwraps the trophy instances as per the positions """
34
54