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 +4 -4
- data/.travis.yml +0 -1
- data/README.md +5 -5
- data/lib/chiketto/event.rb +1 -1
- data/lib/chiketto/user.rb +11 -0
- data/lib/chiketto/version.rb +1 -1
- data/test/user_test.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 597c1bb7dd4646d811040dbd7a0713ddbae078c9
|
4
|
+
data.tar.gz: 4cd2ef48d190883fb951b22535d9faada5b8b3eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3734f101c16531d188a09713d0b06e628d86689d26cdc6f98043f01b25dba0c3dfaf07b7e549ff8039c25a5d4596a66dcbf173148608a238f042496fd6d6cb16
|
7
|
+
data.tar.gz: b34b69a561016b4bd94e9fa6245805846b37e46a5dbb836ae1f746040ff0533c59c2116ae6d92edf72ece475c17d84bb63ec722fc204badb2780afe15cce8b26
|
data/.travis.yml
CHANGED
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
|
36
|
-
event.name.html
|
37
|
-
event.organizer
|
38
|
-
event.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:
|
data/lib/chiketto/event.rb
CHANGED
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
|
data/lib/chiketto/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|