Skip to content

paddytobias/eventbriteR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[GitHub stats]

eventbriteR

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.

Things you'll need

Before you start:

  • API OAuth token - ensure you have generated an API token by creating an Eventbrite App. Go here to sign in and here for more information
  • ID - The ID of the object ('event', 'user' or 'order') that you want to query for.

Set up

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.

Functions and workflow

Create a URL for the Eventbrite API

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".

Eventbrite query

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):

Example use:

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

To do:

  • Extend Eventbrite queries
  • Extend Eventbrite sub-queries - currently there is a function to get Eventbrite orders (get_eb_order()). Want to develop other functions to get other sub-queries, e.g., for the event details, event attendees
  • Investigate ways for .httr to hold the Eventbrite token to manage privacy concerns

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages