So I'm trying to figure out a way to make sure that the PMetrics plugin uses the correct domain (with or without the www) for some people's metrics. Is there a way we could add a feature to the return of the getauth API with something like this:
<response>
<request>
<uid>Dave Reid</uid>
</request>
<auth>...</auth>
<domains>
<domain>davereid.net</domain>
<domain>anotherdomain.com</domain>
<domain>www.thistimewithwwwdomain.org</domain>
</domains>
</response>This way the plugin could verify the correct domain that is being browsed against the domains that were submitted by the user when they signed up for metrics. Any ideas?













Seems to me you just need to
Seems to me you just need to submit one variation and if you do not get back the answer you need try the other variation, if it still fails provide a nice error message to the effect "try entering exactly as you registered with metrics". Best not to over engineer these things.
I suppose that I'll probably
I suppose that I'll probably do that. The API solution would be easier and more graceful that having to call a sample API twice (three 'hits' to bandwidth and processing compared to one). Then again, I don't have any say. :)
Could it be possible to have this become it's own API function, like getdomains which would require a uid and auth key. It could also show whether the user has opted to show public stats or not. Here would be a sample:
<response><request>
<uid>Dave Reid</uid>
<auth>...</auth>
<action>getdomains</action>
</request>
<domains>
<domain public="public">davereid.net</domain>
<domain>anotherdomain.com</domain>
<domain>www.thistimewithwwwdomain.org</domain>
</domains>
</response>
http://performancing.com/perfstats/api.php?action=getblogs&auth=AUTH
Wow...fast work Chris!
Wow...fast work Chris! Thanks!
Hah, not really I just
Hah, not really I just dusted off a function we had but for some reason overlooked!
Slight improvement now?
Would it be an easy improvement to not have the result like this:
<response><ul>
1
<li>davereid.net</li>
<li>www.anotherdomainwithwww.com</li>
</ul>
</response>
and instead something more like the other API methods:
<response><request>
<action>getblogs</action>
<auth>...</auth>
</request>
<domains>
<domain stats="private">davereid.net</domain>
<domain stats="public">www.anotherdomainwithwww.com</domain>
</domains>
</response>
I know that this was just a quick little function that was enabled, but I'd prefer it be standard before I start encoding it's use in the PMetrics plugin. It's just a change of ul -> domains and li -> domain, but it makes more sense. Plus there's a random '1' inbetween the opening ul and the first li. The stats="private" or stats="public" is just an optional thing that would be nice to have, but not necessary. I know I'm picky, but let me know what you think Chris.
I will have to check with
I will have to check with Jed as up to now the function was just used by PFF, I wouldn't want to make any breaking changes. We might have to do an additional function with the new behaviour...
Alright Chris and Jed - keep
Alright Chris and Jed - keep me posted.
Hey guys, sorry, I just saw
Hey guys, sorry, I just saw Dave's PM and this thread.
Yes, PFF does use this. We could change it for a new release however I would hate to brake current users who don't upgrade right away.
Would it be possible to clone the function say 'getblogs2' and do it as Dave has requested? We could then ween users off of the getblogs, switch pff over to the new one then retire 'getblogs' once it has faded out?
Just a few ideas
Post new comment