kavenegar-python icon indicating copy to clipboard operation
kavenegar-python copied to clipboard

Do not use Python strings like this!

Open kamyar1979 opened this issue 4 years ago • 6 comments

https://github.com/kavenegar/kavenegar-python/blob/166701dd562f8b03d84d7ac89415a137455abba7/kavenegar.py#L38

kamyar1979 avatar Oct 09 '20 18:10 kamyar1979

Too many + operators for immutable type! Use string format instead: url = 'https://{}/{}/{}/{}/{}.json'.format(self.host, self.version, self.apikey, action, method)

kamyar1979 avatar Oct 09 '20 18:10 kamyar1979

Hello @kamyar1979 ! I created PR that fixed this. hope u feel better, like me. :D

rezaxd avatar Feb 18 '21 08:02 rezaxd

Actually, the whole code and even API is bullshit! REST API must get Json/XMl/... not Form Data! Variable names obey none of naming conventions! (Variables with multiple words are not separated neither with letter case nor with _) The SDK code is very BAD! No OpenAPI! Errors do not change HTTP Status code! Event a single search in google would make anything better! It is really 'khosolati'!

kamyar1979 avatar Feb 18 '21 09:02 kamyar1979

We do not use this piece of shit! Instead we created a Swagger and use some swagger invoker!

kamyar1979 avatar Feb 18 '21 09:02 kamyar1979

Sometime you don't have enough time for doing stuff by urself. I agree with you that the API sucks. But... IDK! :(((

rezaxd avatar Feb 18 '21 09:02 rezaxd

please refactor this piece of shit! I prefer to write my own code! don't waste our time

torkashvand avatar Mar 10 '21 09:03 torkashvand