PeoplePond AutoDiscovery About Me API
- ADAM
- Optional Parameters
- Example
- Example of Image Only (Like Gravatar)
- Example of Online Identities Only
- PHP Code Implementation
- Modules/Plugins/Widgets & Stuff
ADAM is a dynamic pond bio resource that is requested from our server via a specially constructed URL. The base URL is the same for all ADAM requests and begins with: http://adam.peoplepond.com/peeps.php
The next part of the URL is the lowercase, hexadecimal MD5 hash of the requested user's email address with all white space trimmed, for example the fictitious "alcastle@email.com" would have a hash of "4240be8e2dc90b4aef080848af60435f"
http://adam.peoplepond.com/peeps.php?email=4240be8e2dc90b4aef080848af60435f
Alternatively if the username is known you can simply call
http://adam.peoplepond.com/peeps.php?displayName=AlCastle
The URL must contain either the email or displayName variable in order to function.
The output will always be exactly what the user has saved to the database, additionally free accounts will still display the free package restrictions just as the users live page will.
Optional Parameters
BIO
If bio is set to 'no', then only the image, either the default PeoplePond image or the user select image will be returned.
http://adam.peoplepond.com/peeps.php?email=4240be8e2dc90b4aef080848af60435f&bio=no
LENGTH
Because the data stored actually contains HTML mark-up, the character count reflects each HTML character as well. Thus the length viewed in a web page will appear approximate.
http://adam.peoplepond.com/peeps.php?email=4240be8e2dc90b4aef080848af60435f&length=400
IMAGE
The users preferred image (if any and could actually be a gravatar image) will be displayed without height or width specified.
http://adam.peoplepond.com/peeps.php?email=4240be8e2dc90b4aef080848af60435f&image=yes
EMBED
If the image variable is set then the embed option will include a
http://adam.peoplepond.com/peeps.php?email=4240be8e2dc90b4aef080848af60435f&image=yes&embed=yes
SIZE
If the image variable is set then the size option will include height and width.
http://adam.peoplepond.com/peeps.php?email=4240be8e2dc90b4aef080848af60435f&image=yes&size=90x90
SITE
This parameter allows you to pass your sites URL to us. This should be the base domain where you're using the API. Such as blog.cranberry.com or myblog.wordpress.com, or yahoo.com
Aside from just being curious as to who is using the API and where, we may at some point put up a page listing who is using the API and a link back to your site. http://adam.peoplepond.com/peeps.php?email=4240be8e2dc90b4aef080848af60435f&image=yes&size=90x90&site=blog.cranberry.com
SOCIAL
This optional parameter allows for you to include your online identities at the bottom of the bio.
http://adam.peoplepond.com/peeps.php?email=4240be8e2dc90b4aef080848af60435f&social=yes
JS
This optional parameter outputs all content, escaped, in a document.write() function for use in a <script> tag. (ie. Blogger)
http://adam.peoplepond.com/peeps.php?email=4240be8e2dc90b4aef080848af60435f&social=yes&js=yes
Example
An example of all options used together
http://adam.peoplepond.com/peeps.php?email=4240be8e2dc90b4aef080848af60435f&social=yes&image=yes&embed=yes&size=90x90&length=800&site=blog.cranberry.com
Example of Image Only (Like Gravatar)
An example of all options used together
http://adam.peoplepond.com/peeps.php?email=4240be8e2dc90b4aef080848af60435f&image=yes&bio=no&site=blog.cranberry.com
Example of Social Identities Only
An example of how to only return your Social Identities.
http://adam.peoplepond.com/peeps.php?email=4240be8e2dc90b4aef080848af60435f&social=yes&bio=no&site=blog.cranberry.com
PHP Code Implementation
Implementing ADAM with PHP is straightforward.
$email = 'alcastle@email.com';
$hash = strtolower(md5($email));
$bioLink = "http://adam.peoplepond.com/peeps.php?email=$hash";
$bio = file_get_contents($bioLink);
echo $bio;
OR you could do this
include($bioLink);
