Permalink
Browse files

Added a placeholder for the API key and modified query.

  • Loading branch information...
1 parent 5a83c42 commit 3c5bb677cf395a68dff21e8b8e80a67f3aa462b8 Joe Catera committed Oct 19, 2012
Showing with 10 additions and 8 deletions.
  1. +10 −8 docs/dev_guide/code_exs/binding_events.rst
@@ -741,6 +741,16 @@ To set up and run ``binding_events``:
.. code-block:: javascript
YUI.add('PagerMojitBinder', function(Y, NAME) {
+ var API_KEY = '{your_api_key}';
+ function parseImageId(link) {
+ var matches = link.match(/com\/(\d+)\/(\d+)_([0-9a-z]+)\.jpg$/);
+ return matches[2];
+ }
+ function parsePage(link) {
+ var matches = link.match(/page=(\d+)/);
+ return matches[1];
+ }
+
/**
* The PagerMojitBinder module.
* @module PagerMojitBinder
@@ -828,14 +838,6 @@ To set up and run ``binding_events``:
thatNode.all('#nav a').on('click', flipper, this);
}
};
- function parseImageId(link) {
- var matches = link.match(/com\/(\d+)\/(\d+)_([0-9a-z]+)\.jpg$/);
- return matches[2];
- }
- function parsePage(link) {
- var matches = link.match(/page=(\d+)/);
- return matches[1];
- }
}, '0.0.1', {requires: ['yql', 'io', 'dump']});
#. To display links to photos and associated photo data in the rendered template, replace the code

0 comments on commit 3c5bb67

Please sign in to comment.