def __init__( self, eventbrite_oauth_token, cache_timeout=eventbot.integrations.defaults.REQUESTS_CACHE_TIMEOUT, use_cache=False ): self.eventbrite_sdk_client = eventbrite.Eventbrite(eventbrite_oauth_token) if use_cache: requests_cache.install_cache('eventbot', expire_after=cache_timeout)
def __init__(self,oAuth): self.eventbrite_api = eventbrite.Eventbrite(oAuth) user_id = self.eventbrite_api.get_user() organizatino_id = self.eventbrite_api.get_organization(user_id=user_id.id) # print(organizatino_id['organizations']) id_organization = [organization['id'] for organization in organizatino_id['organizations']] for organization_id in id_organization: organization_check = self.eventbrite_api.get_organization_events(organization_id=organization_id) events = organization_check["events"] organization_id = id_organization[0] for event in events: a = event_ticket(event['id'], organization_id) self.event_ticket_list.append(a) self.load(a) self.load_algo(5000,500)
from os import environ from pprint import pprint import random import re import requests import sys auth_token = environ['EVENTBRITE_OAUTH_TOKEN'] pusher_app_id = environ['PUSHER_APP_ID'] pusher_key = environ['PUSHER_KEY'] pusher_secret = environ['PUSHER_SECRET'] mu_token = environ['MEETUP_API_KEY'] geo_code = environ['GEOCODE_API_KEY'] # Instantiate the Eventbrite and Meetup API clients. eventbrite = eventbrite.Eventbrite(auth_token) meetup = meetup.api.Client(mu_token) google_maps = GoogleMaps(api_key=geo_code) geo_api = geo_code compress = Compress() app = Flask(__name__) Compress(app) app.debug = False app.jinja_env.undefined = StrictUndefined app.secret_key = "leisure" MEETUP_IMG_URL = "static/assets/meetup_logo.png" EVBRTE_IMG_URL = "static/assets/eb_logo.jpg" # ----------------------------- ROUTES ---------------------------------- #
def __init__(self): self.event_id = EVENT_BRITE['EVENTBRITE_EVENT_ID'] self.eventbrite = eventbrite.Eventbrite( EVENT_BRITE['EVENTBRITE_OAUTH_TOKEN'])
def get_eventbrite_api(self): return eventbrite.Eventbrite(EB_ACCESS_TOKEN)
import sys import getopt import json import sqlite3 from contextlib import closing from collections import deque import eventbrite from url_request import dorequest # Instantiate the Eventbrite API client. EVENTBRITE_EVENT_ID = os.environ['EVENTBRITE_EVENT_ID'] EVENTBRITE_OAUTH_TOKEN = os.environ['EVENTBRITE_OAUTH_TOKEN'] eventbrite = eventbrite.Eventbrite(EVENTBRITE_OAUTH_TOKEN) @app.route('/') def index(): """ This is the display view. """ # Create a page for each event - pass event ID as variable in querystring # Get the event details event = eventbrite.get_event(EVENTBRITE_EVENT_ID) # Get the attendee list # cur = g.db.execute('select name, attendee_id, entries from raffle order by name asc') # attendees = [dict(name=row[0], attendee_id=row[1], entries=row[2]) for row in cur.fetchall()] checked_attendees = []