Added:
/trunk/sites/pingfm.js
=======================================
--- /dev/null
+++ /trunk/sites/pingfm.js Sun Mar 7 21:29:09 2010
@@ -0,0 +1,55 @@
+// -*-java-*-
+
+/**
+ * Copyright 2010 Google Inc.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ **/
+
+nodemapper.registerDomain(
+ "ping.fm",
+ { name: "Ping.fm",
+ pkRegexp: /\w{10,}/,
+ identRegexp: /^$/,
+ accountToSgn: {
+ pk: ["buzz.ping.fm", /\w{10,}/]
+ },
+ urlToGraphNode: nodemapper.createPathRegexpHandler(
+ "buzz.ping.fm", // fake domain
+ /\/buzz\/(\w{10,})(?:$|\.xml|\#|\/)/,
+ {casePreserve: true,
+ keyName: "pk"})
+ });
+
+nodemapper.registerDomain(
+ "buzz.ping.fm",
+ { name: "Ping.fm Buzz support",
+ notMassMarketSite: 1 // hack to hide internal fake domain
+ })
+
+nodemapper.addSimpleHandler("buzz.ping.fm", "pk_to_profile",
+ "http://ping.fm/buzz/");
+nodemapper.addSimpleHandler("buzz.ping.fm", "pk_to_atom",
+ "http://ping.fm/buzz/", ".xml");
+
+__END__
+
+http://stage.ping.fm/buzz/JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV
sgn://buzz.ping.fm/?pk=JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV
+http://ping.fm/buzz/JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV
sgn://buzz.ping.fm/?pk=JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV
+http://ping.fm/buzz/JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV/
sgn://buzz.ping.fm/?pk=JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV
+http://ping.fm/buzz/JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV#
sgn://buzz.ping.fm/?pk=JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV
+http://ping.fm/buzz/JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV.xml
sgn://buzz.ping.fm/?pk=JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV
+
+atom(sgn://buzz.ping.fm/?pk=JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV)
http://ping.fm/buzz/JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV.xml
+profile(sgn://buzz.ping.fm/?pk=JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV)
http://ping.fm/buzz/JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV
+
+pair(buzz.ping.fm,JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV)
sgn://buzz.ping.fm/?pk=JIqHIhDG8T1CWDduErJLjaU0YIFFm2MV