chiketto 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7554e861dd753e4325c5a6cb45208aa3c6f1c1f3
4
- data.tar.gz: 5ce6f339b5a569b3b57177d6804324e6f496e2b3
3
+ metadata.gz: 597c1bb7dd4646d811040dbd7a0713ddbae078c9
4
+ data.tar.gz: 4cd2ef48d190883fb951b22535d9faada5b8b3eb
5
5
  SHA512:
6
- metadata.gz: 20687f76997c4e69105bf2335325c25fce25b99429af697e2754eeecc16adc01371a1c3455b20c1f5b6d10195f23af9532c70af0fe7466dee51e54ef45b12ce4
7
- data.tar.gz: ca94c2c6f3fdf88cce1b6638eeb9ede03889208bfb54326cadfd3006164d2f7c43f1d8c37013f4eec662b16aacb1b5f1f797c8a8ca77a401b043eb309a4f3c5a
6
+ metadata.gz: 3734f101c16531d188a09713d0b06e628d86689d26cdc6f98043f01b25dba0c3dfaf07b7e549ff8039c25a5d4596a66dcbf173148608a238f042496fd6d6cb16
7
+ data.tar.gz: b34b69a561016b4bd94e9fa6245805846b37e46a5dbb836ae1f746040ff0533c59c2116ae6d92edf72ece475c17d84bb63ec722fc204badb2780afe15cce8b26
data/.travis.yml CHANGED
@@ -1,6 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
3
  - 2.0.0
5
4
  - 2.1.2
6
5
  env:
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # チケット - Chiketto
6
6
 
7
- Chiketto is a ruby gem for interacting with the Eventbrite V3 API, chiketto in Japanese literally means 'Ticket' and seems like a reasonable name given most of the obvious options are already taken.
7
+ Chiketto is a ruby gem for interacting with the Eventbrite V3 API, chiketto in Japanese literally means 'Ticket' and seems like a reasonable name given most of the obvious options are already taken. Chiketto works with Ruby 2.0 and above, since this is a new gem it makes little sense to support older, unsupported version of Ruby.
8
8
 
9
9
  **This Gem is still very much a work in progress and is not recommended for production use**
10
10
 
@@ -32,10 +32,10 @@ For example, once you've found an event on the API, Chiketto provides a simple i
32
32
 
33
33
  ```
34
34
  event = Chiketto::Event.find 123456
35
- event.name # => 'Event Name'
36
- event.name.html # => '<p>Event Name</p>'
37
- event.organizer # => Chicketto::Organizer
38
- event.organizer.name # => 'Organizer Name'
35
+ event.name # => 'Event Name'
36
+ event.name.html # => '<p>Event Name</p>'
37
+ event.organizer # => Chicketto::Organizer
38
+ event.organizer.name # => 'Organizer Name'
39
39
  ```
40
40
 
41
41
  You can also use the search endpoint on the API to look up events and have an Array of events returned:
@@ -46,7 +46,7 @@ module Chiketto
46
46
  private
47
47
 
48
48
  def self.find_attendees(id, params)
49
- attendees = get "events/#{id}/attendees", params
49
+ get "events/#{id}/attendees", params
50
50
  end
51
51
  end
52
52
  end
data/lib/chiketto/user.rb CHANGED
@@ -16,5 +16,16 @@ module Chiketto
16
16
  def emails
17
17
  @emails.map { |email| Chiketto::Email.new email }
18
18
  end
19
+
20
+ def events(params = {})
21
+ events = Chiketto::User.find_events @id, params
22
+ events['events'].map { |e| Chiketto::Event.new e }
23
+ end
24
+
25
+ private
26
+
27
+ def self.find_events(id, params)
28
+ get "users/#{id}/owned_events", params
29
+ end
19
30
  end
20
31
  end
@@ -1,3 +1,3 @@
1
1
  module Chiketto
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
data/test/user_test.rb CHANGED
@@ -40,4 +40,12 @@ class UserTest < MiniTest::Test
40
40
  find_me
41
41
  assert_kind_of Chiketto::Email, @user.email
42
42
  end
43
+
44
+ def test_user_has_events
45
+ find_me
46
+
47
+ VCR.use_cassette 'user-events' do
48
+ assert_kind_of Chiketto::Event, @user.events.first
49
+ end
50
+ end
43
51
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chiketto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Radford
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-13 00:00:00.000000000 Z
11
+ date: 2014-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler