Skip to content

Instantly share code, notes, and snippets.

@joshuarrrr
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuarrrr/d98a492180be5bfaff4c to your computer and use it in GitHub Desktop.
Save joshuarrrr/d98a492180be5bfaff4c to your computer and use it in GitHub Desktop.
(function() {
'use strict';
angular
.module('lightning', [])
.controller('MainCtrl', MainCtrl);
MainCtrl.$inject=['$http'];
function MainCtrl($http) {
var baseUrl = 'https://api.meetup.com/2/open_events?zip=85721&and_text=False&offset=0&format=json&limited_events=False&photo-host=secure&page=20&radius=25.0&desc=False&status=upcoming&sig_id=10413854&sig=cf9cd3887958d02b81027d77da776a65bb8cb5cf';
$http.get(baseUrl).success(function(data) {
console.log(data);
})
}
})();
{"results":[{"utc_offset":-25200000,"venue":{"country":"US","city":"Tucson","address_1":"2544 E. Allen Road","name":"Valley of the Moon","lon":-110.93396,"id":22788252,"lat":32.27503,"repinned":false},"headcount":0,"distance":3.256059408187866,"visibility":"public","waitlist_count":0,"created":1436762616000,"maybe_rsvp_count":0,"description":"<p>Journey to the center of the galaxy from Valley of the Moon Saturday, July 18, for one day only, when Tucson’s own space-time portal opens to Legler Station on the third moon of Morpheus. It’s an outer space renaissance fair at a simulated human-and-alien settlement on the third moon. The gate opens at 8 a.m. and closes at 9 p.m. Admission is free.<\/p> <p>On July 18th Valley of the Moon will be transformed into a hub of commerce for space and time travelers, farmers, technologists, inventors, actors, artists, and vendors of unique items. The general idea is science, art, theater, fantasy, alien mysteries, music, fun, food, and shopping.<\/p> <p>More info: <a href=\"http:\/\/www.tucsonvalleyofthemoon.com\/event-calendar\/selenite-embassy-at-legler-station\"><a href=\"http:\/\/www.tucsonvalleyofthemoon.com\/event-calendar\/selenite-embassy-at-legler-station\" class=\"linkified\">http:\/\/www.tucsonvalleyofthemoon.com\/event-calendar\/selenite-embassy-at-legler-station<\/a><\/a><\/p>","event_url":"http:\/\/www.meetup.com\/FreeEventsTucson\/events\/223884482\/","yes_rsvp_count":19,"duration":46800000,"name":"Selenite Embassy at Legler Station - FREE","id":"223884482","time":1437231600000,"updated":1436762941000,"group":{"join_mode":"open","created":1432405171000,"name":"FREE Events Tucson","group_lon":-110.97000122070312,"id":18619736,"urlname":"FreeEventsTucson","group_lat":32.220001220703125,"who":"Like FREE Events Tucson"},"status":"upcoming"},{"utc_offset":-25200000,"venue":{"country":"us","city":"Tucson","address_1":"4550 S. Palo Verde Rd.","name":"Clarion Hotel","lon":-110.918854,"id":23617558,"state":"AZ","lat":32.169552,"repinned":false},"headcount":0,"distance":4.565349578857422,"visibility":"public","waitlist_count":0,"created":1436308753000,"maybe_rsvp_count":0,"description":"<p>Note: Accepting this meetup does NOT constitute a reservation. You must reserve via email or on our website as specified below to be guaranteed a spot.<\/p> <p><b>How to Hit the Bestseller Lists with Ebook Preorders<\/b><\/p> <p>For our July meeting, Jim Azevedo of Smashwords will be joining us via teleconference to discuss the secret of using ebook preorders to hit bestseller lists. (Please note this is a teleconference\/SKYPE appearance).<\/p> <p><b>SRW Table Talks<\/b><\/p> <p>In the afternoon, Saguaro Romance Writers will be sharing their expertise at indiviualized table talks. Pick the topic you’re interested in and sit down to learn! Some of the things expected to be covered are: Putting together a multi-author anthology, creating audiobooks via ACX, brainstorming with Tarot cards, and pitch &amp; query.<\/p> <p><b>About the Speaker<\/b><\/p> <p><img src=\"https:\/\/pbs.twimg.com\/profile_images\/459862355967365120\/keb4gRCa_400x400.jpeg\" \/><\/p> <p>Jim Azevedo is the marketing director at <a href=\"http:\/\/www.smashwords.com\/\">Smashwords<\/a>, the largest distributor of self-published ebooks serving over 100,000 indie authors, publishers and literary agents. Since 2008, Smashwords has helped authors around the world publish and distribute more than 325,000 titles to retailers such as Apple iBooks, Barnes &amp; Noble, Kobo and Flipkart, to subscription services like Oyster and Scribd, and to libraries via its partnerships with OverDrive and Baker &amp; Taylor. By night, Jim is the drummer for Rivals, a popular San Francisco Bay Area indie rock band. Jim is also the author of the forthcoming book, <i>How to Get Your Band out of The Garage<\/i>.<\/p> <p><b>Meeting fee of $25 SRW members, $30 guests and walk-ins includes lunch<\/b> selected from a menu of three items during Saturday morning check-in. SPACE MAY BE LIMITED. Walk-ins are welcome, but whenever possible, please guarantee your spot by reserving on our<a href=\"http:\/\/tucsonrwa.org\/payments.html\">payments <\/a>page or by emailing <a href=\"mailto:[masked]\">[masked]<\/a> no later than 8 am Wednesday before the meeting .<\/p> <p><b>LUNCH ORDERS ARE COLLECTED AT 10am<\/b>. If you plan to be late, contact <a href=\"mailto:[masked]\">[masked]<\/a> so we will be prepared to order on your behalf.<\/p> <p>This event takes place at our regular venue, the Clarion Hotel, 4550 S. Palo Verde Rd., Tucson &amp; will include a chapter business meeting.<\/p>","event_url":"http:\/\/www.meetup.com\/TucsonRWA\/events\/223772926\/","yes_rsvp_count":10,"duration":15300000,"name":"Jim Azevedo of Smashwords: Hitting Bestseller Lists with Ebook Preorders","id":"223772926","time":1437237900000,"updated":1436649724000,"group":{"join_mode":"open","created":1389455162000,"name":"Saguaro Romance Writers","group_lon":-110.88999938964844,"id":12022272,"urlname":"TucsonRWA","group_lat":32.220001220703125,"who":"Romance writers"},"status":"upcoming"},{"utc_offset":-25200000,"venue":{"zip":"85701","country":"us","city":"Tucson","address_1":"35 E. Toole Ave, Tucson, AZ","name":"OUR NEST ","lon":-110.970451,"id":13853062,"state":"AZ","lat":32.225651,"repinned":false},"headcount":0,"distance":1.2353146076202393,"visibility":"public","waitlist_count":0,"created":1436189357000,"maybe_rsvp_count":0,"description":"<p>During this time with Cathy, you will experience a Reiki session that also involves the use of crystals, oils and other Spirit-guided tools. Cathy will invoke not only her Spirit guides but yours as well to come forward and take part in this healing.<\/p> <p><b>1 Hour Sessions Available:<\/b><\/p> <p><b>10 am - Terry F.<\/b><\/p> <p><b>11:15 am - Leigh<\/b><\/p> <p><b>1 pm - Jessica<\/b><\/p> <p><b>2:15 pm - Bernadete<\/b><\/p> <p><b>3:30 pm - Tracy<\/b><\/p> <p><b>4:15 pm - Kelly<\/b><\/p> <p><b>To reserve a time, please RSVP and indicate which time you prefer in the comment box below this description.<\/b> If you have signed up, and need to cancel, please do so asap to allow someone else to have the time and offer courtesy to the practitioner. If you are interested in a session but these times do not work for you, please post your request below.<\/p> <p>Cathy is from a ranching family in Arizona since the late 1800's. She is an accomplished horse trainer and has had lots of experience working her magic on animals, earning certificates from Colorado State University in Equine Lameness, Muskoskeletal and Reproduction. <\/p> <p><br\/>At an early age, discovered her energy healing gifts and eventually became an Usui Transformational Reiki Master\/Teacher through the Southwest Healing Arts Institution. Over the years she has learned to use crystals and oils to help assist in her energy work. Cathy uses these to cleanse your aura, balance your chakras while doing energy work. Recently, she has focused on incorporating Shamanic tools into her healing sessions which really takes it up a notch!<\/p> <p><br\/> Having a session with her was described by one individual as \"having your emotional and physical bruises smoothed out\". She believes there's a time for everything and it's time to heal. Let her intuitive and empathic gifts work their magic on you! <\/p> <p>Please wear comfortable clothing and bring water.<\/p> <p><br\/><i><b>These 1 hour sessions are offered by sliding scale $35-$75 depending on income. <\/b><\/i><\/p>","how_to_find_us":"Cathy will meet you in the lobby","event_url":"http:\/\/www.meetup.com\/tucson-institute-for-the-shamanic-arts\/events\/223736260\/","yes_rsvp_count":7,"duration":26100000,"name":"Personal Sessions with Cathy Browning","id":"223736260","time":1437238800000,"updated":1437185644000,"group":{"join_mode":"open","created":1221524475000,"name":"Tucson - Institute for the Shamanic Arts (ISA)","group_lon":-110.97000122070312,"id":1283034,"urlname":"tucson-institute-for-the-shamanic-arts","group_lat":32.220001220703125,"who":"Shamanic Artists"},"status":"upcoming"},{"utc_offset":-25200000,"venue":{"country":"us","city":"Tucson","address_1":"1020 E. 31 St.","name":"Grace Temple Church","lon":-110.955421,"id":23957862,"state":"AZ","lat":32.197296,"repinned":false},"headcount":0,"distance":2.2863426208496094,"visibility":"public","waitlist_count":0,"created":1436641978000,"maybe_rsvp_count":0,"description":"<p>Phil Lopes will be presenting at African American Caucus of Pima County Democratic Party on Saturday, July 18, Grace Temple Church, 1020 E. 31 St., Tucson<\/p> <p>This event is open to the public. Show up and show your support. The momentum is building.<\/p> <p>\"We must energize minorities all across the country to engage in the democratic process and thwart efforts to disenfranchise minority voters.\" Bernie Sanders<\/p>","event_url":"http:\/\/www.meetup.com\/Southern-Arizona-for-Bernie-2016\/events\/223857267\/","yes_rsvp_count":6,"name":"Phil Lopes at the African American Caucus of Pima County Democratic Party","id":"223857267","time":1437238800000,"updated":1436710872000,"group":{"join_mode":"open","created":1435275612000,"name":"Southern Arizona for Bernie - 2016","group_lon":-111,"id":18699384,"urlname":"Southern-Arizona-for-Bernie-2016","group_lat":32.27000045776367,"who":"active citizens"},"status":"upcoming"},{"utc_offset":-25200000,"headcount":0,"distance":3.581505298614502,"visibility":"public","waitlist_count":0,"created":1436726770000,"maybe_rsvp_count":0,"description":"<p><img src=\"http:\/\/photos1.meetupstatic.com\/photos\/event\/9\/1\/3\/e\/600_221557182.jpeg\" \/><\/p> <p>Ist Hour: The 3 Types &amp; Principles of Mind Reading (Telepathy).<\/p> <p>Mind Reading is one of the great benefits of being a skilledPsychic. Just think that you can know what others are thinking about your conversation or about you at anytime or even behind your back. What an advantage in any relationship.<\/p> <p>This is another FUN PARTICIPATION Meetup where we all get into the act.<\/p> <p>\n\n\n\n2nd Hour: 1 on 1 Mind reading:&gt;&gt;&gt;&gt;&gt;&gt;&gt;<\/p> <p>When we have finished Our Healing Circle.<\/p> <p><br\/>Jack<\/p>","event_url":"http:\/\/www.meetup.com\/Psychic-Club-of-Tucson\/events\/223874629\/","yes_rsvp_count":15,"name":"TELEPATHIC MIND READING","id":"223874629","time":1437238800000,"updated":1436726770000,"group":{"join_mode":"open","created":1308603998000,"name":"Psychic Club of Tucson","group_lon":-110.88999938964844,"id":2051661,"urlname":"Psychic-Club-of-Tucson","group_lat":32.220001220703125,"who":"Psychics"},"status":"upcoming"},{"utc_offset":-25200000,"venue":{"country":"us","city":"Tucson","address_1":"4550 South Palo Verde Road, Tucson, AZ","name":"Clarion Hotel & Convention Center","lon":0,"id":23645121,"state":"AZ","lat":0,"repinned":false},"headcount":0,"distance":13.85934066772461,"visibility":"public","waitlist_count":0,"created":1424159860000,"maybe_rsvp_count":0,"description":"<p>For a $5 donation to Rincon, enjoy a full day of gaming featuring...<\/p> <p>* Event TBD<br\/>* Open gaming<br\/>* Game library (provided by RinCon staff)<br\/>* Raffle prizes (provided by SAGA and sponsors)<br\/>* Pre-reg for RinCon 2015 opens ($5 discount if you sign up AT the Fundraiser)<\/p> <p>Watch this space, as well as www.rincongames.com, for more info as the date gets closer!<\/p>","event_url":"http:\/\/www.meetup.com\/tucsongamers\/events\/220575035\/","yes_rsvp_count":4,"duration":43200000,"name":"Rincon 2015 Fundraiser #3: July 18","id":"220575035","time":1437238800000,"updated":1424159860000,"group":{"join_mode":"open","created":1187574659000,"name":"The Tucson Boardgames Meetup","group_lon":-110.95999908447266,"id":634132,"urlname":"tucsongamers","group_lat":32.43000030517578,"who":"Gamers"},"status":"upcoming"},{"utc_offset":-25200000,"venue":{"country":"us","city":"Tucson","address_1":"5101 N. Oracle Rd","name":"U-Like Oriental Buffet","lon":-110.979248,"id":21835242,"state":"AZ","lat":32.299255,"repinned":false},"headcount":0,"distance":5.091484069824219,"visibility":"public","waitlist_count":0,"created":1435011260000,"maybe_rsvp_count":0,"description":"<p>We'll begin Chapter 10 today. Chapter 10 is entitled \"Firearms, Safety, Basics of Marksmanship and Surviving a Gun Battle\".<\/p> <p>Topics covered will be why we'll need firearms and what types we should have. We'll cover firearm safety, training and range time.<\/p> <p>We'll cover the mental impediments to killing another human being.<\/p> <p>We'll go over Jennifer's story, a true to life scenario and the 21 foot rule.<\/p> <p>We'll finish up this lesson with the Human Hunter-Predator discussion.<\/p> <p>Next meeting we'll discuss weapon selection and what you should have to stay safe.<\/p>","how_to_find_us":"Oracle just north of River","event_url":"http:\/\/www.meetup.com\/Tucson-Oath-Keepers\/events\/223427248\/","yes_rsvp_count":6,"duration":9000000,"name":"Join like minded Patriots who believe that the Constitution is our Supreme Law.","id":"223427248","time":1437246000000,"updated":1435011260000,"group":{"join_mode":"open","created":1316442278000,"name":"Southern AZ Oath Keepers","group_lon":-110.91999816894531,"id":2508762,"urlname":"Tucson-Oath-Keepers","group_lat":32.2400016784668,"who":"Oath Keepers"},"status":"upcoming"},{"utc_offset":-25200000,"venue":{"zip":"85718","country":"us","city":"Tucson","address_1":"3870 W. River Road, Suite 108","name":"Quality Strength","lon":-110.911064,"id":4552972,"state":"AZ","lat":32.275822,"repinned":false},"headcount":0,"distance":3.9065964221954346,"visibility":"public","waitlist_count":0,"created":1434657787000,"maybe_rsvp_count":0,"description":"<p>Are YOU as balanced and flexible as you want to be? Join us to discover how to include these essential components in your physical activities!<\/p>","event_url":"http:\/\/www.meetup.com\/North-West-Tucson-Self-Improvement-Meetup\/events\/223340660\/","yes_rsvp_count":4,"name":"Flexibility & Balance Workshop","id":"223340660","time":1437247800000,"updated":1434657893000,"group":{"join_mode":"open","created":1429662180000,"name":"Tucson Self-Improvement Meetup","group_lon":-111.04000091552734,"id":18558215,"urlname":"North-West-Tucson-Self-Improvement-Meetup","group_lat":32.36000061035156,"who":"Strong Individuals"},"status":"upcoming"},{"utc_offset":-25200000,"venue":{"country":"us","city":"Tucson","address_1":"SE Corner of River\/Orange Grove by Sprouts","name":"SPIRITS CHILD METAPHYSICAL GIFT SHOP","lon":0,"id":19346652,"state":"AZ","lat":0,"repinned":false},"headcount":0,"distance":10.428788185119629,"visibility":"public","waitlist_count":0,"created":1431731002000,"maybe_rsvp_count":0,"description":"<p>AKASHIC RECORDS are the energetic imprint of your soul’s journey, past, present and future, a unique vibrational registry. Access this knowledge byjourneying with me and learn what choices are in your highest good. $30 for advance registration; $35 at the door. <\/p>","event_url":"http:\/\/www.meetup.com\/Wellness-4-Tucson\/events\/222562611\/","yes_rsvp_count":3,"duration":7200000,"name":"ACCESS YOUR AKASHIC RECORDS","id":"222562611","time":1437249600000,"updated":1436748680000,"group":{"join_mode":"open","created":1295752475000,"name":"Wellness 4 Tucson","group_lon":-111.04000091552734,"id":1770937,"urlname":"Wellness-4-Tucson","group_lat":32.36000061035156,"who":"Wellness Community"},"status":"upcoming"},{"utc_offset":-25200000,"rsvp_limit":20,"headcount":0,"distance":1.360958218574524,"visibility":"public","waitlist_count":0,"created":1436314895000,"fee":{"amount":30,"accepts":"cash","description":"per person","currency":"USD","label":"Price","required":"0"},"maybe_rsvp_count":0,"description":"<p><b>Intermediate Aquaponics Class - $30<\/b><b><br\/><\/b> <b>Saturday, July 18,<\/b> <b>2015;<\/b> <b>1:30 PM to 4:30 PM<br\/><\/b><\/p> <p>Aquaponics is both gardening and aquaculture, and both can have challenges. Come learn how to take care of common pests and problems, as well as how to expand your growing season, crop choices and production. <\/p> <p><br\/>Synergistic poly-cultures, seed starting, seed saving, harvesting, nutrient recycling, and \"What to do with it now that I've grown it\" will also be covered.<\/p> <p>Payment is either cash at the door, or also at EcoGro, 657 W. Saint Mary's Road, Suite 100, Tucson, AZ 8570;[masked]-8307. Email:&lt;a&gt; [masked]&lt;\/a&gt; with cash, checks or credit cards prior to the class. Bring your receipt for admittance. Please RSVP so we can make sure we have enough chairs. This class is guaranteed to be held.<\/p> <p>Sponsored by the Tucson AquaPonics Project, Local Roots Aquaponics, Arnavon and Eco Gro.<\/p>","event_url":"http:\/\/www.meetup.com\/Tucson-AquaPonics-Project\/events\/223774986\/","yes_rsvp_count":3,"duration":10800000,"name":"Intermediate Aquaponics Class","id":"223774986","time":1437251400000,"updated":1436895204000,"group":{"join_mode":"open","created":1298574240000,"name":"Tucson AquaPonics Project","group_lon":-110.97000122070312,"id":1789064,"urlname":"Tucson-AquaPonics-Project","group_lat":32.220001220703125,"who":"Members"},"status":"upcoming"},{"utc_offset":-25200000,"venue":{"zip":"85705","country":"us","city":"Tucson","address_1":"35 E. Toole Ave","name":"Galactic Center","lon":-110.970779,"id":4789392,"state":"AZ","lat":32.22625,"repinned":false},"headcount":0,"distance":1.2446584701538086,"visibility":"public","waitlist_count":0,"created":1433373470000,"maybe_rsvp_count":0,"description":"<p><img src=\"http:\/\/photos2.meetupstatic.com\/photos\/event\/1\/c\/1\/a\/600_438247194.jpeg\" \/><\/p> <p>Sweet Surrender: A Yin Yoga Workshop for Creative Flow w\/ Ashley Celeste Leal &amp; Serena Gabriel<\/p> <p>Break through creative blocks and open up to the powerful and unique expression within you in this workshop designed for all levels of practice and all types of art. Between various yogic practices time will be given for stream of consciousness processing to allow you to tap into the depth of possibility within in you. Using pranayama, meditation, mantra, sound and yin postures to clear the way, you can begin to realize your dreams and manifest your vision. Please bring a journal and something to write with. Practice will be led by Ashley with music and sound provided by Serena Gabriel.<br\/>$18 in advance\/$20 at the door. Register online at <a href=\"http:\/\/www.ashleyceleste.com\">www.ashleyceleste.com<\/a><\/p>","event_url":"http:\/\/www.meetup.com\/Tucson-Galactic-Center\/events\/222999803\/","yes_rsvp_count":6,"name":"Sweet Surrender: A Yin Yoga Workshop for Creative Flow","id":"222999803","time":1437253200000,"updated":1433374249000,"group":{"join_mode":"open","created":1408045523000,"name":"Tucson Temple Rituals","group_lon":-110.97000122070312,"id":16390272,"urlname":"Tucson-Galactic-Center","group_lat":32.220001220703125,"who":"Cosmic Beings"},"status":"upcoming"},{"utc_offset":-25200000,"venue":{"country":"us","city":"Tucson","address_1":"1930 E. Grant Rd.","name":"Bookman's","lon":-110.943214,"id":18960732,"state":"AZ","lat":32.249908,"repinned":false},"headcount":0,"distance":1.434533715248108,"visibility":"public","waitlist_count":0,"created":1436655911000,"maybe_rsvp_count":0,"event_url":"http:\/\/www.meetup.com\/tucson-poetry-writers\/events\/223860256\/","yes_rsvp_count":5,"name":"Bring a poem by one of your favorite poets or one you wrote yourself.","id":"223860256","time":1437253200000,"updated":1436655911000,"group":{"join_mode":"approval","created":1210032883000,"name":"The Tucson Poetry Writers Group","group_lon":-110.94999694824219,"id":1137228,"urlname":"tucson-poetry-writers","group_lat":32.2400016784668,"who":"Poets"},"status":"upcoming"},{"utc_offset":-25200000,"venue":{"zip":"85711","country":"us","city":"Tucson","phone":"(520) 594-5285","address_1":"4350 E. 22nd St.","name":"Eckstrom Columbus Library","lon":-110.900327,"id":1145600,"state":"AZ","lat":32.206302,"repinned":false},"headcount":0,"distance":3.3400464057922363,"visibility":"public","waitlist_count":0,"created":1436677209000,"maybe_rsvp_count":0,"description":"<p>Come and join us for the first Tucson Crafting Meetup at the Eckstrom-Columbus Library on Columbus and 22nd from 2-4pm. The Meetup is scheduled in the large meeting room, which is to the left of the entrance as soon as you walk in. The meeting room has plenty of tables and chairs. More room can be accommodated to crafters with bigger projects. Supplies are not provided, so bring everything you need for the project you are doing. Please RSVP if you plan on attending. I hope to see you there!<\/p>","event_url":"http:\/\/www.meetup.com\/meetup-group-kLDhpffh\/events\/223864909\/","yes_rsvp_count":5,"duration":7200000,"name":"First Meetup at the Eckstrom-Columbus Library Large Meeting Room","id":"223864909","time":1437253200000,"updated":1436998921000,"group":{"join_mode":"open","created":1436675138000,"name":"Tucson Crafting Meetup","group_lon":-110.94999694824219,"id":18735287,"urlname":"meetup-group-kLDhpffh","group_lat":32.2400016784668,"who":"Crafters"},"status":"upcoming"},{"utc_offset":-25200000,"venue":{"country":"US","city":"Tucson","address_1":"2574 N Campbell Ave","name":"Frankie's South Philly Cheesesteaks","lon":-110.943947,"id":23795466,"lat":32.253696,"repinned":false},"headcount":0,"distance":1.678503394126892,"visibility":"public","waitlist_count":0,"created":1435042506000,"maybe_rsvp_count":0,"description":"<p>Bring your favorite board or card games!<\/p>","event_url":"http:\/\/www.meetup.com\/Tucson-Everything-Club-20s-30s\/events\/223436243\/","yes_rsvp_count":23,"name":"hanging out and playing some games and injoy good food.","id":"223436243","time":1437253200000,"updated":1435042506000,"group":{"join_mode":"open","created":1411433755000,"name":"Tucson Everything Club 20s-30s","group_lon":-110.83000183105469,"id":17154092,"urlname":"Tucson-Everything-Club-20s-30s","group_lat":32.209999084472656,"who":"Fun Seekers"},"status":"upcoming"},{"utc_offset":-25200000,"headcount":0,"distance":5.810606479644775,"visibility":"public","waitlist_count":0,"created":1435874029000,"maybe_rsvp_count":0,"description":"<p>TYP will be putting on our chef hats again to cook dinner for the 28 men and women living at the Primavera Foundation Five Points Home. To join in on the fun, you must RSVP on EventBrite as we need to make sure we have the appropriate amount of cooks to provide enough food. RSVP HERE: <a href=\"https:\/\/www.eventbrite.com\/e\/typ-meal-team-tickets-17625552502\"><a href=\"https:\/\/www.eventbrite.com\/e\/typ-meal-team-tickets-17625552502\" class=\"linkified\">https:\/\/www.eventbrite.com\/e\/typ-meal-team-tickets-17625552502<\/a><\/a><\/p> <p>For all those who sign up, we will be creating a menu and emailing it along with additional instructions to volunteers a few days before the event. Volunteers can select from the menu what food item they would like to bring.<\/p> <p>**Dinner needs to be prepped and ready to serve at 5:30PM**<\/p>","event_url":"http:\/\/www.meetup.com\/tucson-young-professionals\/events\/223662564\/","yes_rsvp_count":3,"duration":7200000,"name":"TYP Primavera Meal Team","id":"223662564","time":1437264000000,"updated":1436393538000,"group":{"join_mode":"open","created":1198439585000,"name":"Tucson Young Professionals","group_lon":-110.91999816894531,"id":893504,"urlname":"tucson-young-professionals","group_lat":32.310001373291016,"who":"Professionals"},"status":"upcoming"},{"utc_offset":-25200000,"venue":{"zip":"85704","country":"us","city":"Tucson","address_1":"1510 W Liddell Dr, Tucson, AZ 85704","name":"Krista's House","lon":-110.998627,"id":11743882,"state":"AZ","lat":32.354046,"repinned":false},"rsvp_limit":30,"headcount":0,"distance":9.047607421875,"visibility":"public","waitlist_count":0,"created":1429991693000,"maybe_rsvp_count":0,"description":"<p>Ok Geeks. It's that time of year again. The snow birds have left, the college kids have gone home to mooch off of their parents and it's hotter than Hades out. So what does that leave for us Geeks?<\/p> <p>Pool Party! Duh.<\/p> <p>This year's theme is 80's Fantasy Movies. So tease your hair till it looks like a rats nest, dump on a bucket of glitter and wear your cape with huge shoulder pads proudly! We're retro Geeks baby!<\/p> <p>As in past years this event is a BYOB potluck pool party. We have a temperamental gas grill to get your meat-on if you desire.<\/p> <p>What to bring:<br\/>-something to eat for everyone (please list what you intend to bring in the comments so we don't get duplicates)<br\/>-a lawn or camp chair for the movie<br\/>-your swimsuit and towell<\/p> <p>Please do not bring your pets (spouses and kids are OK), smoke or bring anything illegal (drugs, fireworks, magic missles, ect). There is plenty of parking available. Bonus: there will be Cards Against Humanity to play before the movie too!<\/p>","event_url":"http:\/\/www.meetup.com\/Meet-Geek-Tucson\/events\/222095043\/","yes_rsvp_count":24,"duration":18000000,"name":"80's Fantasy Pool Party: Dark Crystal","id":"222095043","time":1437267600000,"updated":1436830525000,"group":{"join_mode":"open","created":1327462049000,"name":"Meet Geek Tucson","group_lon":-111.1500015258789,"id":3163582,"urlname":"Meet-Geek-Tucson","group_lat":32.29999923706055,"who":"Geeks"},"status":"upcoming"}],"meta":{"next":"https:\/\/api.meetup.com\/2\/open_events?zip=85721&and_text=False&offset=1&format=json&limited_events=False&sig=cf9cd3887958d02b81027d77da776a65bb8cb5cf&photo-host=secure&page=20&radius=25.0&sig_id=10413854&desc=False&status=upcoming","method":"OpenEvents","total_count":269,"link":"https:\/\/api.meetup.com\/2\/open_events","count":16,"description":"Searches for recent and upcoming public events hosted by Meetup groups. Its search window is the past one month through the next three months, and is subject to change. Open Events is optimized to search for current events by location, category, topic, or text, and only lists Meetups that have **3 or more RSVPs**. The number or results returned with each request is not guaranteed to be the same as the page size due to secondary filtering. If you're looking for a particular event or events within a particular group, use the standard [Events](\/meetup_api\/docs\/2\/events\/) method.","lon":"","title":"Meetup Open Events v2","url":"https:\/\/api.meetup.com\/2\/open_events?zip=85721&and_text=False&offset=0&format=json&limited_events=False&sig=cf9cd3887958d02b81027d77da776a65bb8cb5cf&photo-host=secure&page=20&radius=25.0&sig_id=10413854&desc=False&status=upcoming","id":"","updated":1437251324296,"lat":""}}
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="swipe.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Bored in Tucson?</h1>
<div id='mySwipe' style='max-width:500px;margin:0 auto' class='swipe'>
<div class='swipe-wrap'>
<div><b>2</b></div>
<div><b>3</b></div>
<div><b>4</b></div>
<div><b>5</b></div>
<div><b>6</b></div>
<div><b>7</b></div>
<div><b>8</b></div>
<div><b>9</b></div>
<div><b>10</b></div>
<div><b>11</b></div>
<div><b>12</b></div>
<div><b>13</b></div>
<div><b>14</b></div>
<div><b>15</b></div>
<div><b>16</b></div>
<div><b>17</b></div>
<div><b>18</b></div>
<div><b>19</b></div>
<div><b>20</b></div>
</div>
</div>
<div style='text-align:center;padding-top:20px;'>
<button onclick='mySwipe.prev()'>X</button>
<button onclick='mySwipe.next()'>✓</button>
</div>
<div id="debug"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src='swipe.js'></script>
<script src="script.js"></script>
</body>
</html>
// Code goes here
$( document ).ready(function() {
window.mySwipe = $('#mySwipe').Swipe().data('Swipe');
// grab random event
getMeetupEvents();
});
var g_events = [];
/*
var event = Class({
initialize: function(name, age) {
this.name;
// json here
}
//toString: function() {
// return "My name is "+this.name+" and I am "+this.age+" years old.";
//}
});
*/
function checkStore()
{
if(typeof(Storage) !== "undefined") {
}
}
function getMeetupEvents()
{
url = "https://api.meetup.com/2/open_events?zip=85721&and_text=False&offset=0&format=json&limited_events=False&photo-host=secure&page=20&radius=25.0&desc=False&status=upcoming&sig_id=10413854&sig=cf9cd3887958d02b81027d77da776a65bb8cb5cf"
;
// Live query here
$.ajax({
url: url,
})
.done(function(data) {
console.log("Worked");
})
.fail(function() {
console.log("Ajax failed to fetch data");
})
$.getJSON("events.json", function( data ) {
console.log(data.results);
});
}
function flagEvent(e)
{
}
if (localStorage.clickcount) {
localStorage.clickcount = Number(localStorage.clickcount) + 1;
} else {
localStorage.clickcount = 1;
}
/* Styles go here */
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, del, dfn, em, img, ins, kbd, q, samp, small, strong, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td, article, aside, footer, header, nav, section {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
body {
-webkit-text-size-adjust:none;
font-family:sans-serif;
min-height:416px;
}
h1 {
font-size:33px;
margin:50px 0 15px;
text-align:center;
color:#212121;
}
h2 {
font-size:14px;
font-weight:bold;
color:#3c3c3c;
margin:20px 10px 10px;
}
small {
margin:0 10px 30px;
display:block;
font-size:12px;
}
a {
margin:0 0 0 10px;
font-size:12px;
color:#3c3c3c;
}
html, body {
background: #f3f3f3;
}
#console {
font-size: 12px;
font-family:"Inconsolata", "Monaco", "Consolas", "Andale Mono", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
color: #999;
line-height: 18px;
margin-top: 20px;
max-height: 150px;
overflow: auto;
}
#mySwipe div b {
display:block;
font-weight:bold;
color:#14ADE5;
font-size:20px;
text-align:center;
margin:10px;
padding:100px 10px;
box-shadow: 0 1px #EBEBEB;
background: #fff;
border-radius: 3px;
border: 1px solid;
border-color: #E5E5E5 #D3D3D3 #B9C1C6;
}
button {
color: white;
padding: 1em;
position: fixed;
top: 50%;
}
button:first-child {
background: rgb(255,0,0);
left: 5%;
}
button:last-child {
background: rgb(0,255,0);
right: 5%;
}
.swipe {
overflow: hidden;
visibility: hidden;
position: relative;
}
.swipe-wrap {
overflow: hidden;
position: relative;
}
.swipe-wrap > div {
float:left;
width:100%;
position: relative;
}
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, del, dfn, em, img, ins, kbd, q, samp, small, strong, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td, article, aside, footer, header, nav, section {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
body {
-webkit-text-size-adjust:none;
font-family:sans-serif;
min-height:416px;
}
h1 {
font-size:33px;
margin:50px 0 15px;
text-align:center;
color:#212121;
}
h2 {
font-size:14px;
font-weight:bold;
color:#3c3c3c;
margin:20px 10px 10px;
}
small {
margin:0 10px 30px;
display:block;
font-size:12px;
}
a {
margin:0 0 0 10px;
font-size:12px;
color:#3c3c3c;
}
html, body {
background: #f3f3f3;
}
#console {
font-size: 12px;
font-family:"Inconsolata", "Monaco", "Consolas", "Andale Mono", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
color: #999;
line-height: 18px;
margin-top: 20px;
max-height: 150px;
overflow: auto;
}
#mySwipe div b {
display:block;
font-weight:bold;
color:#14ADE5;
font-size:20px;
text-align:center;
margin:10px;
padding:100px 10px;
box-shadow: 0 1px #EBEBEB;
background: #fff;
border-radius: 3px;
border: 1px solid;
border-color: #E5E5E5 #D3D3D3 #B9C1C6;
}
/*
* Swipe 2.0
*
* Brad Birdsall
* Copyright 2013, MIT License
*
*/
function Swipe(container, options) {
"use strict";
// utilities
var noop = function() {}; // simple no operation function
var offloadFn = function(fn) { setTimeout(fn || noop, 0) }; // offload a functions execution
// check browser capabilities
var browser = {
addEventListener: !!window.addEventListener,
touch: ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch,
transitions: (function(temp) {
var props = ['transitionProperty', 'WebkitTransition', 'MozTransition', 'OTransition', 'msTransition'];
for ( var i in props ) if (temp.style[ props[i] ] !== undefined) return true;
return false;
})(document.createElement('swipe'))
};
// quit if no root element
if (!container) return;
var element = container.children[0];
var slides, slidePos, width, length;
options = options || {};
var index = parseInt(options.startSlide, 10) || 0;
var speed = options.speed || 300;
options.continuous = options.continuous !== undefined ? options.continuous : true;
function setup() {
// cache slides
slides = element.children;
length = slides.length;
// set continuous to false if only one slide
if (slides.length < 2) options.continuous = false;
//special case if two slides
if (browser.transitions && options.continuous && slides.length < 3) {
element.appendChild(slides[0].cloneNode(true));
element.appendChild(element.children[1].cloneNode(true));
slides = element.children;
}
// create an array to store current positions of each slide
slidePos = new Array(slides.length);
// determine width of each slide
width = container.getBoundingClientRect().width || container.offsetWidth;
element.style.width = (slides.length * width) + 'px';
// stack elements
var pos = slides.length;
while(pos--) {
var slide = slides[pos];
slide.style.width = width + 'px';
slide.setAttribute('data-index', pos);
if (browser.transitions) {
slide.style.left = (pos * -width) + 'px';
move(pos, index > pos ? -width : (index < pos ? width : 0), 0);
}
}
// reposition elements before and after index
if (options.continuous && browser.transitions) {
move(circle(index-1), -width, 0);
move(circle(index+1), width, 0);
}
if (!browser.transitions) element.style.left = (index * -width) + 'px';
container.style.visibility = 'visible';
}
function prev() {
if (options.continuous) slide(index-1);
else if (index) slide(index-1);
}
function next() {
if (options.continuous) slide(index+1);
else if (index < slides.length - 1) slide(index+1);
}
function circle(index) {
// a simple positive modulo using slides.length
return (slides.length + (index % slides.length)) % slides.length;
}
function slide(to, slideSpeed) {
// do nothing if already on requested slide
if (index == to) return;
if (browser.transitions) {
var direction = Math.abs(index-to) / (index-to); // 1: backward, -1: forward
// get the actual position of the slide
if (options.continuous) {
var natural_direction = direction;
direction = -slidePos[circle(to)] / width;
// if going forward but to < index, use to = slides.length + to
// if going backward but to > index, use to = -slides.length + to
if (direction !== natural_direction) to = -direction * slides.length + to;
}
var diff = Math.abs(index-to) - 1;
// move all the slides between index and to in the right direction
while (diff--) move( circle((to > index ? to : index) - diff - 1), width * direction, 0);
to = circle(to);
move(index, width * direction, slideSpeed || speed);
move(to, 0, slideSpeed || speed);
if (options.continuous) move(circle(to - direction), -(width * direction), 0); // we need to get the next in place
} else {
to = circle(to);
animate(index * -width, to * -width, slideSpeed || speed);
//no fallback for a circular continuous if the browser does not accept transitions
}
index = to;
offloadFn(options.callback && options.callback(index, slides[index]));
}
function move(index, dist, speed) {
translate(index, dist, speed);
slidePos[index] = dist;
}
function translate(index, dist, speed) {
var slide = slides[index];
var style = slide && slide.style;
if (!style) return;
style.webkitTransitionDuration =
style.MozTransitionDuration =
style.msTransitionDuration =
style.OTransitionDuration =
style.transitionDuration = speed + 'ms';
style.webkitTransform = 'translate(' + dist + 'px,0)' + 'translateZ(0)';
style.msTransform =
style.MozTransform =
style.OTransform = 'translateX(' + dist + 'px)';
}
function animate(from, to, speed) {
// if not an animation, just reposition
if (!speed) {
element.style.left = to + 'px';
return;
}
var start = +new Date;
var timer = setInterval(function() {
var timeElap = +new Date - start;
if (timeElap > speed) {
element.style.left = to + 'px';
if (delay) begin();
options.transitionEnd && options.transitionEnd.call(event, index, slides[index]);
clearInterval(timer);
return;
}
element.style.left = (( (to - from) * (Math.floor((timeElap / speed) * 100) / 100) ) + from) + 'px';
}, 4);
}
// setup auto slideshow
var delay = options.auto || 0;
var interval;
function begin() {
interval = setTimeout(next, delay);
}
function stop() {
delay = 0;
clearTimeout(interval);
}
// setup initial vars
var start = {};
var delta = {};
var isScrolling;
// setup event capturing
var events = {
handleEvent: function(event) {
switch (event.type) {
case 'touchstart': this.start(event); break;
case 'touchmove': this.move(event); break;
case 'touchend': offloadFn(this.end(event)); break;
case 'webkitTransitionEnd':
case 'msTransitionEnd':
case 'oTransitionEnd':
case 'otransitionend':
case 'transitionend': offloadFn(this.transitionEnd(event)); break;
case 'resize': offloadFn(setup); break;
}
if (options.stopPropagation) event.stopPropagation();
},
start: function(event) {
var touches = event.touches[0];
// measure start values
start = {
// get initial touch coords
x: touches.pageX,
y: touches.pageY,
// store time to determine touch duration
time: +new Date
};
// used for testing first move event
isScrolling = undefined;
// reset delta and end measurements
delta = {};
// attach touchmove and touchend listeners
element.addEventListener('touchmove', this, false);
element.addEventListener('touchend', this, false);
},
move: function(event) {
// ensure swiping with one touch and not pinching
if ( event.touches.length > 1 || event.scale && event.scale !== 1) return
if (options.disableScroll) event.preventDefault();
var touches = event.touches[0];
// measure change in x and y
delta = {
x: touches.pageX - start.x,
y: touches.pageY - start.y
}
// determine if scrolling test has run - one time test
if ( typeof isScrolling == 'undefined') {
isScrolling = !!( isScrolling || Math.abs(delta.x) < Math.abs(delta.y) );
}
// if user is not trying to scroll vertically
if (!isScrolling) {
// prevent native scrolling
event.preventDefault();
// stop slideshow
stop();
// increase resistance if first or last slide
if (options.continuous) { // we don't add resistance at the end
translate(circle(index-1), delta.x + slidePos[circle(index-1)], 0);
translate(index, delta.x + slidePos[index], 0);
translate(circle(index+1), delta.x + slidePos[circle(index+1)], 0);
} else {
delta.x =
delta.x /
( (!index && delta.x > 0 // if first slide and sliding left
|| index == slides.length - 1 // or if last slide and sliding right
&& delta.x < 0 // and if sliding at all
) ?
( Math.abs(delta.x) / width + 1 ) // determine resistance level
: 1 ); // no resistance if false
// translate 1:1
translate(index-1, delta.x + slidePos[index-1], 0);
translate(index, delta.x + slidePos[index], 0);
translate(index+1, delta.x + slidePos[index+1], 0);
}
}
},
end: function(event) {
// measure duration
var duration = +new Date - start.time;
// determine if slide attempt triggers next/prev slide
var isValidSlide =
Number(duration) < 250 // if slide duration is less than 250ms
&& Math.abs(delta.x) > 20 // and if slide amt is greater than 20px
|| Math.abs(delta.x) > width/2; // or if slide amt is greater than half the width
// determine if slide attempt is past start and end
var isPastBounds =
!index && delta.x > 0 // if first slide and slide amt is greater than 0
|| index == slides.length - 1 && delta.x < 0; // or if last slide and slide amt is less than 0
if (options.continuous) isPastBounds = false;
// determine direction of swipe (true:right, false:left)
var direction = delta.x < 0;
// if not scrolling vertically
if (!isScrolling) {
if (isValidSlide && !isPastBounds) {
if (direction) {
if (options.continuous) { // we need to get the next in this direction in place
move(circle(index-1), -width, 0);
move(circle(index+2), width, 0);
} else {
move(index-1, -width, 0);
}
move(index, slidePos[index]-width, speed);
move(circle(index+1), slidePos[circle(index+1)]-width, speed);
index = circle(index+1);
} else {
if (options.continuous) { // we need to get the next in this direction in place
move(circle(index+1), width, 0);
move(circle(index-2), -width, 0);
} else {
move(index+1, width, 0);
}
move(index, slidePos[index]+width, speed);
move(circle(index-1), slidePos[circle(index-1)]+width, speed);
index = circle(index-1);
}
options.callback && options.callback(index, slides[index]);
} else {
if (options.continuous) {
move(circle(index-1), -width, speed);
move(index, 0, speed);
move(circle(index+1), width, speed);
} else {
move(index-1, -width, speed);
move(index, 0, speed);
move(index+1, width, speed);
}
}
}
// kill touchmove and touchend event listeners until touchstart called again
element.removeEventListener('touchmove', events, false)
element.removeEventListener('touchend', events, false)
},
transitionEnd: function(event) {
if (parseInt(event.target.getAttribute('data-index'), 10) == index) {
if (delay) begin();
options.transitionEnd && options.transitionEnd.call(event, index, slides[index]);
}
}
}
// trigger setup
setup();
// start auto slideshow if applicable
if (delay) begin();
// add event listeners
if (browser.addEventListener) {
// set touchstart event on element
if (browser.touch) element.addEventListener('touchstart', events, false);
if (browser.transitions) {
element.addEventListener('webkitTransitionEnd', events, false);
element.addEventListener('msTransitionEnd', events, false);
element.addEventListener('oTransitionEnd', events, false);
element.addEventListener('otransitionend', events, false);
element.addEventListener('transitionend', events, false);
}
// set resize event on window
window.addEventListener('resize', events, false);
} else {
window.onresize = function () { setup() }; // to play nice with old IE
}
// expose the Swipe API
return {
setup: function() {
setup();
},
slide: function(to, speed) {
// cancel slideshow
stop();
slide(to, speed);
},
prev: function() {
// cancel slideshow
stop();
prev();
},
next: function() {
// cancel slideshow
stop();
next();
},
stop: function() {
// cancel slideshow
stop();
},
getPos: function() {
// return current index position
return index;
},
getNumSlides: function() {
// return total number of slides
return length;
},
kill: function() {
// cancel slideshow
stop();
// reset element
element.style.width = '';
element.style.left = '';
// reset slides
var pos = slides.length;
while(pos--) {
var slide = slides[pos];
slide.style.width = '';
slide.style.left = '';
if (browser.transitions) translate(pos, 0, 0);
}
// removed event listeners
if (browser.addEventListener) {
// remove current event listeners
element.removeEventListener('touchstart', events, false);
element.removeEventListener('webkitTransitionEnd', events, false);
element.removeEventListener('msTransitionEnd', events, false);
element.removeEventListener('oTransitionEnd', events, false);
element.removeEventListener('otransitionend', events, false);
element.removeEventListener('transitionend', events, false);
window.removeEventListener('resize', events, false);
}
else {
window.onresize = null;
}
}
}
}
if ( window.jQuery || window.Zepto ) {
(function($) {
$.fn.Swipe = function(params) {
return this.each(function() {
$(this).data('Swipe', new Swipe($(this)[0], params));
});
}
})( window.jQuery || window.Zepto )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment