-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use voluptuous for iTunes #3344
Conversation
@@ -39,23 +52,23 @@ def __init__(self, host, port): | |||
def _base_url(self): | |||
"""Return the base url for endpoints.""" | |||
if self.port: | |||
return self.host + ":" + str(self.port) | |||
return 'http://{}:{}'.format(self.host, self.port) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably support an ssl: true
configuration in case this is behind SSL.
I personally previously did use itunes-api
behind an nginx proxy, though I had HA configured to talking to it over localhost get those extra milliseconds, heh. But regardless, people might be behind HTTPS.
It doesn't natively, but it could very well be behind an NGINX proxy* *my comments on this are on the commit. |
Support for SSL/TLS was added. This will need a test from a person who is running |
response = requests.delete(url) | ||
response = requests.get(url, timeout=DEFAULT_TIMEOUT) | ||
elif method == 'POST': | ||
response = requests.put(url, params, timeout=DEFAULT_TIMEOUT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be requests.post
?
It's compatible with the old code, so 🐬 |
👍 |
* Migrate to voluptuous * Add support for SSL/TLS
Description:
Migration of the configuration check to
voluptuous
. This is a breaking change ashttp://
will no longer be needed for thehost:
configuration variable. Not sure ifitunes-api
supports SSL/TLS.Related issue (if applicable): fixes 127528299
Example entry for
configuration.yaml
(if applicable):@maddox, would be nice if you could take a look at the changes and run a quick test. Thanks.