README.md in eventbrite_sdk-3.4.0 vs README.md in eventbrite_sdk-3.6.0

- old
+ new

@@ -1,12 +1,9 @@ # EventbriteSdk [![Code Climate](https://codeclimate.com/github/eventbrite/eventbrite-sdk-ruby/badges/gpa.svg)](https://codeclimate.com/github/eventbrite/eventbrite-sdk-ruby) [![Issue Count](https://codeclimate.com/github/eventbrite/eventbrite-sdk-ruby/badges/issue_count.svg)](https://codeclimate.com/github/eventbrite/eventbrite-sdk-ruby) [![Build Status](https://travis-ci.org/eventbrite/eventbrite-sdk-ruby.svg?branch=master)](https://travis-ci.org/eventbrite/eventbrite-sdk-ruby) [![Test Coverage](https://codeclimate.com/github/eventbrite/eventbrite-sdk-ruby/badges/coverage.svg)](https://codeclimate.com/github/eventbrite/eventbrite-sdk-ruby/coverage) [![Dependency Status](https://gemnasium.com/badges/github.com/eventbrite/eventbrite-sdk-ruby.svg)](https://gemnasium.com/github.com/eventbrite/eventbrite-sdk-ruby) [![Gem Version](https://badge.fury.io/rb/eventbrite_sdk.svg)](https://badge.fury.io/rb/eventbrite_sdk) - -Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/eventbrite_sdk`. To experiment with that code, run `bin/console` for an interactive prompt. - ## Installation Add this line to your application's Gemfile: ```ruby @@ -67,17 +64,18 @@ # publish the event your_event.publish ``` + # Navigating paginated responses: ``` ruby EventbriteSDK.token = "TOKEN" -# one feature of the Eventbrite API is that you can pass in the string 'me' in place of a +# one feature of the Eventbrite API is that you can pass in the string 'me' in place of a # user id and it will evaluate to the id of the user associated with the oauth token. # fetch a new user record using the Eventbrite user id user = EventbriteSDK::User.retrieve(id: 163054428874) @@ -100,10 +98,22 @@ example.continue # you can also provide a token if you choose to do so example.continue(continuation_token: 'my_token') ``` + +# Use `#retrieve` to build up arbitrary queries + +``` ruby + +# For example, to use the 'status' parameter seen here: https://www.eventbrite.com/developer/v3/endpoints/events/#ebapi-id78 + +user = EventbriteSDK::User.retrieve(id: 163054428874) +user.owned_events.retrieve(query: { status: 'live' }) + +``` + # Construct endpoint paths: ``` ruby EventbriteSDK.token = "TOKEN" @@ -128,11 +138,11 @@ ``` # Per-request Configuration -For apps that need to use multiple tokens during the lifetime of a process, it is +For apps that need to use multiple tokens during the lifetime of a process, it is possible to set a per-request token: ``` ruby # Retrieving @@ -159,10 +169,10 @@ If you forget to provide the api_token key and `EventbriteSDK.token` is set, the request will fall-back on the global token for the action called. # Shallow resource list endpoints -Some paginated lists are available at the base of the resource url, webhooks and +Some paginated lists are available at the base of the resource url, webhooks and categories for example. The resources that have this trait will include the `Operations::List` module ``` ruby # Retrieving