def __init__(self, api_key, api_secret, api_base='https://api.semantics3.com/v1/'):
     Semantics3Request.__init__(self, api_key, api_secret, 'categories', api_base)
 def __init__(self,
              api_key,
              api_secret,
              api_base='https://api.semantics3.com/v1/'):
     Semantics3Request.__init__(self, api_key, api_secret, 'products',
                                api_base)
 def __init__(self, api_key, api_secret, api_base='https://api.semantics3.com/v1/', timeout=120):
     Semantics3Request.__init__(self, api_key, api_secret, 'products', api_base, timeout)
Beispiel #4
0
 def __init__(self, api_key, api_secret):
     Semantics3Request.__init__(self, api_key, api_secret, 'products')
Beispiel #5
0
 def __init__(self, api_key, api_secret):
     Semantics3Request.__init__(self, api_key, api_secret, 'categories')
Beispiel #6
0
from semantics3 import Semantics3Request
import unittest
from os import environ

sem3 = Semantics3Request(api_key=environ["SEM3_API_KEY"],
                         api_secret=environ["SEM3_API_SECRET"])


class TestWebhooksAPI(unittest.TestCase):
    """Docstring for TestWebhooks. """
    def test_webhook_registration(self):
        """@todo: Docstring for test_webhook_registration.

        :returns: @todo
        """
        result = sem3.run_query('webhooks', "POST",
                                {"webhook_uri": "http://decce40a.ngrok.io"})
        self.assertIn('created', result)

    def test_get_webhooks(self):
        """@todo: Docstring for test_get_webhooks.
        :returns: @todo

        """
        webhooks = sem3.run_query('webhooks', "GET")
        self.assertEqual(webhooks['status'], 'ok')

    def test_register_event(self):
        """@todo: Docstring for function.

        :returns: @todo
Beispiel #7
0
 def __init__(self, api_key, api_secret):
     Semantics3Request.__init__(self, api_key, api_secret, 'offers')
Beispiel #8
0
 def __init__(self, api_key, api_secret):
     Semantics3Request.__init__(self, api_key, api_secret, 'offers')