Commits

Peter Rudenko committed c31339d

Functions name refactor

  • Participants
  • Parent commits 2262915

Comments (0)

Files changed (1)

File templeton/src/templeton/api.py

 
 class Templeton(object):
 
-    def get_query(self, url, data):
+    def get(self, url, data):
         """
         Make GET query to templeton url.
         """
         response = urllib2.urlopen(TEMPLETON_URL + url + "?" + data)
         return json.loads(response.read())
 
-    def post_query(self, url, data):
+    def post(self, url, data):
         """
         Make POST query to templeton url.
         """
             data['statusdir'] = statusdir
         if callback:
             data['callback'] = callback
-        return self.post_query("pig", data)
+        return self.post("pig", data)
 
     def check_job(self, job_id, user="hdfs"):
         """
         Check the status of a job and get related job information given its job ID.
         """
         data = {'user.name': user}
-        return self.get_query("queue/%s" % job_id, data)
+        return self.get("queue/%s" % job_id, data)
 
 
 if __name__ == "__main__":