Giter Club home page Giter Club logo

eventbriter's Introduction

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

eventbriter's People

Contributors

paddytobias avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.