-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed query and added tip for environment #640
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ $.ajax({ | |
|
||
// Tell YQL what we want and that we want JSON | ||
data: { | ||
q: "select title,abstract,url from search.news where query=\"cat\"", | ||
q: "select * from search.ec (1, 10) WHERE keyword='New York'", | ||
format: "json" | ||
}, | ||
|
||
|
@@ -31,4 +31,6 @@ $.ajax({ | |
}); | ||
``` | ||
|
||
If you'd like to access community tables you have to add `env: "http://datatables.org/alltables.env"` to the data object otherwise you would get an error message with `No definition found for Table`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there some way we can not go through this all and keep it simple instead? I can imagine this is already too complicated for many less-experienced people. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think YQL is pretty complicated for beginners but the tip for the community tables is helpful. Because then you can do requests to Google, Github etc. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't the first time we're in need of a good, fake API to demonstrate Ajax to people (#475 for example). I'm going to drop it on the meeting notes so the team can brainstorm about it. I just feel like this might already be too complicated for some people, plus, people are here to learn about jQuery - not about the way YQL works. |
||
|
||
jQuery handles all the complex aspects of JSONP behind-the-scenes — all we have to do is tell jQuery the name of the JSONP callback parameter specified by YQL ("callback" in this case), and otherwise the whole process looks and feels like a normal Ajax request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't really have a strong markdown style guide, but could you add a blank line right after the end of the code snippet? It's consistent with the other markdown.