Hey Folks,
    Pg 55/130 from the PDF of the OpenSRS v2.4 API states that the attribute
'remainder' which gets returned from a 'get_domain' request with a type of
'list' should be "The amount of remaining domain names (this is used for
paging, and represents the number of domain names still to show)". Some
quick testing using the opensrs-php client shows that this actually behaves
as a boolean stating whether or not there is a remainder, not necessarily
what that remainder is (I have taken a look at the raw XML so I am fairly
sure this isnt the client's fault).
    My question is whether the documentation is wrong or whether the API is
misbehaving (or at least not working to specification). This isnt a terribly
big deal, because you can get this number from seeing how many domains the
get_domain function returns and which page youre on to see how many domains
you've already seen and then subtract this from the 'count' field to get the
remainder. The only downside to this is that its overly complicated and
basically renders the 'remainder' field useless except as a convenience.
    My suggestion would be to fix the API (if it is in fact broken) to
return the actual remainder. This is safe for people who have been using it
as a bool since most anything other than 0 or undef will eval as TRUE in
perl (and PHP). Not so sure about other languages, but I dont know that
other languages are used a whole lot anyhow.

Thanks!
    Matt Prigge

Reply via email to