Git Product home page Git Product logo

clicksend-python's Issues

allowed_email_address_get returns string

Calls to allowed_email_address_get return a string object which is not nice to evaluate the API response afterwards.
I used the following workaround to get a dictionary object for the response:

api_response = api_instance.allowed_email_address_get()
allowed = eval(api_response)
# now allowed.get('data') works

Would be best to get the dictionary object directly from allowed_email_address_get and not rely on being able to use eval for the returned string.

Want my Raspberry Pi Pico W sending a text message

I am having trouble getting my Pico W to send a text message. it is easy to connect to WIFI, and my code works without errors, but get a 401 error. A asked BARD and the ClickSend helper what SMS_API_ENDPOINT to use and I have 4, but none work. Can someone share micro python Thonny script that will send a simple text )'from Bobs W' to my phone? I have the Toll Free Number in my ClickSend account.

Missing methods from clicksend_client.AccountApi: e.g. voice_price_post and voice_send_post

According to the documentation, this should work:

# Calculate voice price
 api_response = api_instance.voice_price_post(voice_messages)
# ERROR:
Traceback (most recent call last):
    api_response = api_instance.voice_price_post(voice_messages)
AttributeError: 'AccountApi' object has no attribute 'voice_price_post'

And this method is indeed missing from the source code also. I have the latest version from here: git clone https://github.com/ClickSend/clicksend-python.git && cd clicksend-python && python3 -m pip install .

Should I be using the VoiceApi class from clicksend_client/api/voice_api.py?

All unit tests are no-ops

The test directory https://github.com/ClickSend/clicksend-python/tree/master/test does contains a number of automatically generated tests (by clicksend-codegen it seems). However, none of the tests actually do anything. For example:

class TestAccount(unittest.TestCase):
    """Account unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def testAccount(self):
        """Test Account"""
        # FIXME: construct object with mandatory attributes with example values
        # model = clicksend_client.models.account.Account()  # noqa: E501
        pass

The only part that might do something is commented out. Technically, it does pass, (litterally, in this case), so Travis CI probably thinks it's fine. Most of the tests follow a similar pattern - some of them perform a setup step or so, but they don't do anything else.

I'm guessing, then, that this library is entirely untested? If this is the case, I wouldn't consider using this in a production app.

problem when installing with pip 19.1.1

We have a strange problem when we try to install clicksend-client==1.0.0 via pip install -r requirements.txt or simply pip install clicksend-client==1.0.0 command.
this is the command output:

Collecting clicksend-client==1.0.0 (from -r requirements.txt (line 1))
  ERROR: Could not find a version that satisfies the requirement clicksend-client==1.0.0 (from -r requirements.txt (line 1)) (from versions: 5.0.41)
ERROR: No matching distribution found for clicksend-client==1.0.0 (from -r requirements.txt (line 1))

the strange thing is that installing the client with pip install clicksend-client works:

(venv) ➜  testdir# pip install clicksend-client
Collecting clicksend-client
Collecting urllib3>=1.15 (from clicksend-client)
  Using cached https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl
Collecting python-dateutil (from clicksend-client)
  Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
Collecting six>=1.10 (from clicksend-client)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting certifi (from clicksend-client)
  Downloading https://files.pythonhosted.org/packages/69/1b/b853c7a9d4f6a6d00749e94eb6f3a041e342a885b87340b79c1ef73e3a78/certifi-2019.6.16-py2.py3-none-any.whl (157kB)
     |████████████████████████████████| 163kB 123kB/s 
Installing collected packages: urllib3, six, python-dateutil, certifi, clicksend-client
Successfully installed certifi-2019.6.16 clicksend-client-1.0.0 python-dateutil-2.8.0 six-1.12.0 urllib3-1.25.3

it seems that it's the version number issue, but the latest command is installing the v1.0.0 either...
could you please check this issue because it's breaking our CI system.
Thanks.
p.s.
Python version: 3.7
pip version: 19.1.1

Voice messages - originator

Hi,
would it be possible to set originator when using voice call api ?

it is difficult to recognize the calling phone number.

Thx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.