Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

documentation - add api_key to the binders/index.js in the code example on Binding Events #570

Closed
dmitris opened this issue Sep 26, 2012 · 2 comments

Comments

@dmitris
Copy link
Contributor

dmitris commented Sep 26, 2012

http://developer.yahoo.com/cocktails/mojito/docs/code_exs/binding_events.html does not work if you just copy and paste as it is missing an api_key:

In "Setting Up this Example", Step 9, the code is:

// Query for the image metadata
var query = 'select * from flickr.photos.info where photo_id="' + imageId + '"';
thatNode.one('#display').setContent('Loading ...');
Y.YQL(query, function(raw) {

needs to be -
//on the top:
var API_KEY = "{api_key}";
// and then for YQL query:
var query = 'select * from flickr.photos.info where photo_id="' + imageId + '" and api_key="' + API_KEY + '"';

as is done for model.server.js

Another very minor annoyance to the reader is that the example talks about model.server.js but "mojito create mojit" creates foo.server.js - maybe add a step "Rename the model file foo.server.js to model.server.js"

@dmitris
Copy link
Contributor Author

dmitris commented Sep 26, 2012

this is the file:
https://github.com/yahoo/mojito/blame/develop/docs/dev_guide/code_exs/binding_events.rst

the easiest is probably to double-check and modify all cases where there is a "select"

@zhouyaoji
Copy link
Contributor

Thanks, dmitris. I've fixed the issue and also filed a GH issue (#649) to fix the issue with the model names.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants