[]
EventbriteR is an R package to call the Eventbrite API.
All you need is an Eventbrite account. With this you can create an Eventbrite App and generate token.
It is this token that you need to use this package.
Before you start:
Before you start, you should save the oauth token
in your environment. This will ensure that you don't have to pass the token to every query you do.
To do this, run:
options(
eventbrite.token = XXXXXX
)
... replacing XXXXXX with your unique token.
Use call_eventbrite()
to compile and test a URL based on a few query parameters. If the API reponse to the URL is successful (message 200), the URL will be returned. Otherwise, the call will be stopped.
The default query for call_eventbrite()
is "events". This could also be "users" or "orders".
Use eb_query()
to return a list
for an Eventbrite object (e.g., events). eb_query()
takes as its only parameter the successful URL generated by call_eventbrite()
. It prints out a message to help the user to understand what query object has been returned. This will inform what function to use next.
Possible queries (so far - more to come): "events" "users" * "orders"
url = call_eventbrite(query = "events", sub_query = "orders", query_id = 46834278588, token = token) # to get orders for the event matching this ID. This URL may be copy and pasted into a web browser to verify
event = eb_query(url)
order_names = get_eb_orders(event, names.only = TRUE) # to return more just names of those who have registered for the event
get_eb_order()
). Want to develop other functions to get other sub-queries, e.g., for the event details, event attendeesAdd the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.