Affiliate Domain List

7/20/2010 10:45 AM
You can subscribe to this wiki article using an RSS feed reader.

Overview

This call retrieves a list of affiliate domains and their associated payouts.  A typical application would use this to cache all domains in memory to determine if a given link had a payout associated with it.

Here's a good javascript regex to use to extract the domain from a url (should I make this part of a javascript api, or even a separate call by itself?):

someUrl.match("https?:/+(www\\.)?([\\w\\d\\.-]+).*")[2]

Here's a good regex to extract the root domain (to search for "allowsSubdomain" allowed domains):

someUrl.match("https?:/+[?\\w\\d.]*?([\\w\\d-]+\\.[\\w\\d]{2,4}(\\.ag|\\.bz|\\.es|\\.in|\\.mx|\\.nz|\\.tw|\\.uk|\\.ar|\\.br|\\.in|\\.il|\\.sg|\\.hk|\\.au|\\.za)?)([^.\\w\\d-]+|$)")[2]

Url

http://api.edeems.com/affiliates

Parameters

Parameters in bold are required

NameDescription
apiKeyThe api key provided to you on the developer screen (developer.edeems.com)
formatjson* or pipe

Response

NameDescription
domainThe domain name of the site
payoutA displayable decription of the payout for that site
charityPayoutA displayable decription of the
charity
charity payout for that site
allowSubdomainstrue or false indicating if subdomains under the given url are supported