コード例 #1
0
 def describe(self):
     """ Describe a service object metadata
         :param name: Name of sobject to describe
     """
     ret, res = sf_request(self.c, 'GET', sf_service_path(self.c,
                                                          'sobjects',
                                                          self._name))
     return (ret, res)
コード例 #2
0
 def query(self, q):
     """ query soql
     """
     _q = {'q': q}
     enc_q = urllib.urlencode(_q)
     munge_query = ''.join(('?',enc_q))
     ret, res = sf_request(self.c, 'GET', sf_service_path(self.c,
                                                          'query',
                                                          munge_query))
     return (ret, res)
コード例 #3
0
    def _get(self, id):
        """ get a resource by ID

            :param id: Salesforce resource ID
            :param name: Name of sobject
        """

        ret, res = sf_request(self.c, 'GET', sf_service_path(self.c,
                                                             'sobjects',
                                                             self._name,
                                                             str(id)))
        return (ret, res)