Skip to content

Instantly share code, notes, and snippets.

@katherineschultz
Created October 27, 2014 23:57
Show Gist options
  • Save katherineschultz/fb8571bafc8f7ae311e6 to your computer and use it in GitHub Desktop.
Save katherineschultz/fb8571bafc8f7ae311e6 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script>
//the assignment:
//Create a new div with the id "events"
//Create a new function in your javascript that calls Meetup open events method
//Get events using the zip parameter
//Don't forget to send your key as a parameter
//Add a parameter such as topic to find meetups that you would be interested in
//Look at the results in the console.log() like this: console.log(data);
//call this new function in document ready
//the magic ajax function:
$.ajax({
url: 'https://api.meetup.com/2/open_events'
data: {
parameter: 'value', //all parameters have commas after them
parameter: 'value' // except the last one
},
crossDomain: true,
dataType: 'jsonp',
type: "GET",
success: function (data) {
// code with data returned
},
error: function(data) {
// code with error returned
}
});
</script>
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script src="https://code.jquery.com/jquery-2.1.1.min.js"><\/script>
<script>
//the assignment:
//Create a new div with the id "events"
//Create a new function in your javascript that calls Meetup open events method
//Get events using the zip parameter
//Don't forget to send your key as a parameter
//Add a parameter such as topic to find meetups that you would be interested in
//Look at the results in the console.log() like this: console.log(data);
//call this new function in document ready
//the magic ajax function:
$.ajax({
url: 'https://api.meetup.com/2/open_events'
data: {
parameter: 'value', //all parameters have commas after them
parameter: 'value' // except the last one
},
crossDomain: true,
dataType: 'jsonp',
type: "GET",
success: function (data) {
// code with data returned
},
error: function(data) {
// code with error returned
}
});
<\/script>
</body>
</html>
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment