get_price is only supposed to be used for .tv domains - anything else will
give you, as you discovered, unexpected results.
Charles Daminato
TUCOWS Product Manager
[EMAIL PROTECTED]
On Tue, 21 Aug 2001, Matt Prigge wrote:
> Hey Folks,
> I am curious about what may be inconsistency in the 'get_price' action
> within the API. I know its original purpose was to differentiate between
> normally priced .tv domains and auction-based .tv's, but since it works for
> all domains, some people may use it for more than that (for automatically
> reverting back to standard pricing after a tucows promotion for example).
> The way it is currently set up, it is obviously tailored toward
> retrieving an initial registration price. It is not suited for checking for
> a renewal price because it responds with a 'domain taken' message if you try
> to query a domain that is already registered. However, if you query a domain
> for an invalid amount of years (such as 1 year for a co.uk name), it will
> happily give you $6.50 even though this is technically impossible since you
> need to register two years at a time.
> I guess I think that it should return the same error that sw_register
> would return if you attempted to actually register a domain -or- it shouldnt
> return any errors at all; just the price of that domain for the specified
> amount of years. If you had it return all of the errors, you could be sure
> that the information that you gave get_price was valid if the action
> succeeded. If you had it return none of the errors, you could use it for
> calculating registration and renewal prices with the implicit knowledge that
> it would _not_ return any errors (aside from total malformation of a domain
> name for example). Having it half-validate data sort of makes me sort of
> uneasy.
> Admittedly this isnt a big deal, but I thought Id mention it. Please
> definitely correct me if Ive missed something and this is how it is supposed
> to react.
>
> - Matt
>
>