Skip Menu |

This queue is for tickets about the WebService-Pushover CPAN distribution.

Report information
The Basics
Id: 84599
Status: resolved
Priority: 0/
Queue: WebService-Pushover

People
Owner: shuff [...] cpan.org
Requestors: alec [...] edworthyuk.co.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • v0.0.1
  • v0.0.2
  • v0.0.4
  • v0.0.5
  • v0.0.6
  • v0.0.7
  • v0.0.8
Fixed in: (no value)



Subject: Sound parameter not supported
Date: Fri, 12 Apr 2013 20:46:09 +0100
To: bug-webservice-pushover [...] rt.cpan.org
From: Alec Edworthy <alec [...] edworthyuk.co.uk>
Hello, I have installed the latest version of WebService::Pushover (0.0.8) and noticed that it does not support Pushover's sound parameter for controlling what notification sound is used when the push message is received. I have added the parameter to my install without validation (see attached diff) but I guess it would be good to validate it against Pushover's list of accepted sounds which is available through a GET to https://api.pushover.net/1/sounds.json?token=(your app token). I might try adding that validation to the module, and if I do I'll send a new diff over, but it will probably take me a little while to get my head around how to process the data returned from the GET request and use it to validate what the user has requested in the params hash from their script. Just thought I'd flag it up. Kind regards, Alec -- Alec Edworthy alec@edworthyuk.co.uk

Message body is not shown because sender requested not to inline it.

On Fri Apr 12 15:46:34 2013, alec@edworthyuk.co.uk wrote: Show quoted text
> Hello, > > I have installed the latest version of WebService::Pushover (0.0.8) > and noticed that it does not support Pushover's sound parameter for > controlling what notification sound is used when the push message is > received. I have added the parameter to my install without validation > (see attached diff) but I guess it would be good to validate it > against Pushover's list of accepted sounds which is available through > a GET to https://api.pushover.net/1/sounds.json?token=(your app > token). I might try adding that validation to the module, and if I do > I'll send a new diff over, but it will probably take me a little while > to get my head around how to process the data returned from the GET > request and use it to validate what the user has requested in the > params hash from their script.
hi Alec! thanks for filing this bug, and for your interest in WebService::Pushover :) while it would be nice to query the sounds API method to enumerate the available sounds, check out this blog post: http://updates.pushover.net/post/45198796457/upcoming-api-change-application-token-required-for apparently they don't want people to hit that method more than once every 24 hours. i could imagine writing some sort of caching mechanism (something using CHI, maybe), but it just seemed simpler to me to hardcode the list of acceptable sounds. your bug report did, however, serve as a reminder to me that i've been meaning for a while to rewrite this module using Net::HTTP::Spore, and so i have done so. the module dependencies have changed a bit; i hope the new dependencies are not too onerous. WebService::Pushover v0.1.0 should be up on CPAN shortly, or you can look at the GitHub repo right now. please let me know if you encounter any additional problems! -shuff -- Steve Huff (SHUFF) * shuff@cpan.org