Help
- What is an alias?
- An alias is a thing that you 'own' somewhere on the internet. An email, a url to a profile page, a domain. Something that represents you on the web.
- How do I import my alias?
-
-
Visit the webpage that describes your alias. Click on the location bar at the top of your browser. Type
http://metaward.com/before the URL and press enter. It should look something likehttp://metaward.com/http://stackoverflow.com/users/90025/Don't worry that it looks funny. Just press enter and it will import your alias.
- Use the 'show in metaward' bookmarklet (right click and bookmark). Then visit your profile page and click your newly made bookmark.
- Type it here and then press enter :
-
Visit the webpage that describes your alias. Click on the location bar at the top of your browser. Type
- How do I give out awards?
- You can go to your user page and create an award. Then add the aliases that got your award.
- What is the average value of an award?
- 10 points. If it is worth less than 10, it is easy, and more than 10, it is hard.
- Your badge sucks. How can I make a WAYYY cooler one?
- Use the api. And then send it to me and if its good I'll integrated it into the site.
- Do you have any interesting stats?
- Yup. See stats page.
- Do you have an easy way to show users that they got awards?
-
Yup. Simply include jquery.min.js, then popup.js, and then call
metaward.popupwhenever they get the award. For example:
If you want to configure it, look at the top of the source for the metaward.popup_config object. Overwrite that object after the include, but before you call the function.<script src="http://metaward.com/js/jquery.min.js"></script> <script src="http://metaward.com/js/popup.js"></script> <ul> <li> <a href="#" onclick="return metaward.popup('3bn0i1')">Get an award!</a> </li> </ul>Note: Make sure to actually call the metaward API to save the award to our servers after you verified the user actually got the award. Calling from javascript is easily gamable by users, server-side checking is the only way to make sure they got the award.
- Do you have an API?
- Sure do! awards, aliases, and users. Oh, you want json? Sure : JSON. But you are cross domain? No problem : JSONP. Paginated and individual objects work too (with id, url, or md5). You can even get all the awards. It uses a slightly modified version of django-rest-interface.
- Can I give out awards with your API?
-
Sure, get an API key. Then POST a newline (
\nor%0A) delimited list of aliases as of the value of the keyachieversto/api/award/<award id>/achievers. What a mouthful. Examples are easiest :$aliases = array("metaward@example.com", "http://metaward.com/u/ptarjan"); $ch = curl_init("http://metaward.com/api/award/3bn0i1/achievers?apikey=psaouvleirsyctoroule"); curl_setopt_array($ch, array( CURLOPT_POST => True, CURLOPT_RETURNTRANSFER => True, CURLOPT_POSTFIELDS => array("achievers" => implode("\n", $aliases)), ); $data = curl_exec($ch); // check for errors if ("" === trim($data)) { print "no data from metaward"; } else { $xml = simplexml_load_string($data); if ($xml->{'error-message'}) { print "Error : " . $xml->{'model-errors'}->message; } else { print count($xml->{object}) . " users granted award 3bn0i1"; } } - How can I get you to import MY website?
-
Its easy! I even have a webservice creation helper.
You should build a webservice that does three things.
Attributes
Returns a dictionary of 4 attributes :- regex
- A python regular expression that matches your user's page. Put parentheses around the variable parts (the username, etc) so that you can use it in in the template_str.
- description
- A human readable explanation about what your site is about and what the alias represents.
- template_url
-
An html string that lets a user easily specify their alias. It should basically be the regex but with the variable parts replaced with <input>. It should be human readable and isn't used programatically, so you don't have to have the
http://. - template_str
- A python format string that when the variables from the regular epxression gives the canonical url for the user's page.
{"attrs": { "regex": "http://metaward.com/u/(.+)", "template_url": "metaward.com/u/<input>", "description": "Awards in the award system! *oh my*", "template_str": "http://metaward.com/u/%s" }}Alias
Returns information about an alias. Currently two fields are supported- remote_image
- A url to the image that represents this user. Should be 60x60
- shortname
- A human readable name for this alias
{"alias": { "remote_image": "http://metaward.com/media/alias/f0bc3bb52b8515654cda174918cf9d3b.png", "shortname": "ptarjan" }}Awards
And lastly, but not leastly, returns all the awards. Using these fields:- url
- The url on the remote site that represents this award. If none exists just link somewhere appropriate on the remote site. This should NOT be user specific, since the url is used for the award not the alias.
- imageurl
- An image representing this award. 36x36
- name
- A human readable short string. Catchy puns are recommended.
- description
- A long description of the award. A good description is good if you want people to know how to get it, or leave it cryptic if you want it to be less obvious. Your call.
- points
- The value of the achievement. Integer. From 0 to 60 with median being 10.
- date
-
This field is the only field that is specific to users. It is the ISO8661 date when the award was received. Leaving it blank will default to
NOW(). - _id
- An ID that you get to make up the format for. It is used in the _parent_id reference lookup.
- _parent_id
- The _id of the achievement that had to be done before this one was achieved. A nice way to guide users through doing things on your site
Now, after all that, and that you've tested it, and it all works. Then contact me, I'll look over your work and add you to the system. Fun, eh?{"award": [ { "name": "Welcome to the club", "url": "http://metaward.com", "imageurl": "http://metaward.com/favicon.ico", "points": 1, "_id": 0, "description": "You registered! Let the achieving begin" }, { ... } ]}


