/[cvs]/nfo/projects/netfraggle/bin/fraggleEngine.py
ViewVC logotype

Diff of /nfo/projects/netfraggle/bin/fraggleEngine.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by xabbu, Wed Sep 15 22:27:06 2004 UTC revision 1.12 by xabbu, Fri Sep 17 09:42:30 2004 UTC
# Line 12  Line 12 
12    
13  #-----------------------------------------------------------------------------  #-----------------------------------------------------------------------------
14  # $Log$  # $Log$
15    # Revision 1.12  2004/09/17 09:42:30  xabbu
16    # U function listItems() places a query to the server now and returns its results
17    #
18  # Revision 1.11  2004/09/15 22:27:06  xabbu  # Revision 1.11  2004/09/15 22:27:06  xabbu
19  # +/- function fraggleSync replaced by function syncTopics which places a query  # +/- function fraggleSync replaced by function syncTopics which places a query
20  # + function query has simple eval of error return code now  # + function query has simple eval of error return code now
# Line 93  class FraggleEngine: Line 96  class FraggleEngine:
96      def getTopicById(self, id):      def getTopicById(self, id):
97          return self.topics[id]          return self.topics[id]
98            
99      def listItems(self,topicId):      def listItems(self,contentkey):
100          result = self.queryCms("GET creator_id, language_id, description FROM contents")          result = self.queryCms(str("GET creator_id, language_id, description FROM contents WITH type "+contentkey))
101          #print result          return result
102                    
103      def queryCms(self,nqlquery):      def queryCms(self,nqlquery):
104                    
# Line 103  class FraggleEngine: Line 106  class FraggleEngine:
106          rpc = Server('http://netfrag.org/nfo/netfraggle.php')          rpc = Server('http://netfrag.org/nfo/netfraggle.php')
107          result = rpc.query(nqlquery)          result = rpc.query(nqlquery)
108          if result['0']['error'] == '0':          if result['0']['error'] == '0':
109             #print result          #print result
110             return result            return result
111                    
112          #else:          #else:
113          #print result['0']['error']          #print result['0']['error']
114          #return result          #return result

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed