flyticket 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 186c7f03815762991f5fa89d04bea543912b8239
4
- data.tar.gz: d6411ae46181b2a624e196f7d20f1772ca4968e5
3
+ metadata.gz: 0bb6c78eeabb1e762624f79ee83c6b73c990eeb5
4
+ data.tar.gz: c81aff0cd54e0f9fc87b8a2f78de07db2dd23888
5
5
  SHA512:
6
- metadata.gz: b099140a4f06e5d3b0806e268d374a28ab2f892c552cefa4eaeb8b2bd16ad71d3f388a0b97de291d06ae9f714473b5924546acc2b7a0fb69b9fa5eea8c899def
7
- data.tar.gz: 8829e46170d8392537d74b54bcf690c1e8517e7d3fc70a9392ca05cc9a6582e78a338cd587ea4dfea8df3ae2487f9cfedda572cfcdee2640aba22a92f22cda28
6
+ metadata.gz: 1456746003bdcfc11222eeec5e3c68b9185c58164c3edcab3577ae87b35caa6cc120b71336d88479b76c4f2f7d1737b8a875fed013a899d95461f42717497fd4
7
+ data.tar.gz: 90ab30f5e11a81042b1041d8a2b42ac1c28bbff26a06ee39660f1a91cc302fb9021a172ad49f40934d9748fef5ae520e05dbf4c5d465ecb987736e1a703d6611
data/README.md CHANGED
@@ -11,8 +11,7 @@ looked at were defunct.
11
11
 
12
12
  ## Example Usage
13
13
 
14
- Flyticket is still a work in progress, however, to query for events,
15
- use it like so:
14
+ To query for events, use it like so:
16
15
 
17
16
  ```ruby
18
17
  past = Flyticket::Events.past(venue_id: 1, max_results: 3)
@@ -20,10 +19,9 @@ past.first.facebook_event_id # --> FB event id for this venue's last show
20
19
  ```
21
20
 
22
21
  Flyticket is opinionated about the result format -- it discards Ticketfly's
23
- outer wrapper (used for pagination) and converts the top-level event hashes into
24
- OpenStructs, as well as the nested org and venue hashes, but leaves deeper
25
- properties as hashes. Thus retrieving a deeply-nested attributes looks like
26
- this:
22
+ outer wrapper (used for pagination) and converts the top-level hashes and
23
+ the nested org and venue hashes into OpenStructs, leaving deeper hashes alone.
24
+ So retrieving a deeply-nested attributes looks like this:
27
25
 
28
26
  ```ruby
29
27
  next_event = Flyticket::Events.upcoming(venue_id: 1, max_results: 1).first
@@ -35,24 +33,36 @@ upcoming.first.venue.name # --> 'Brooklyn Bowl'
35
33
 
36
34
  Note how in the first example, `image` is a method, but deeper properties are
37
35
  accessed using hash keys. In the second example, because `venue` is a struct,
38
- the venue name can be accessed using a method (although `[:name]` works too]).
36
+ the venue name can be accessed using a method (although `[:name]` works too).
37
+
38
+ #### Endpoints:
39
+ * Events.list(options)
40
+ * Events.upcoming(options)
41
+ * Events.featured(options)
42
+ * Events.past(options)
43
+ * Events.just_announced(options)
44
+ * Events.event(options)
45
+ * Orgs.list(options)
46
+ * Venues.list(options)
39
47
 
40
48
  #### Some useful properties:
41
49
  * org_id
42
50
  * venue_id
43
51
  * event_id
44
- * max_results (capped by TicketFly at 1000)
52
+ * max_results (capped by Ticketfly at 1000)
45
53
  * page_num (use when total results > max_results)
46
54
  * from_date
47
55
  * thru_date
48
56
 
49
57
  ## Notes
50
58
 
51
- I haven't committed to an API just yet and won't attempt semantic versioning until I do.
59
+ Not attempting semantic versioning just yet because the API may change. (In particular,
60
+ I may roll my own classes instead of using OpenStruct).
52
61
 
53
62
  #### TODO
54
63
  * [ ] make original json available
55
64
  * [ ] handle fields & fieldGroup
65
+ * [ ] if ticketfly paginates, fetch extra & concatenate
56
66
  * [ ] specs
57
67
 
58
68
  ## Contributing
@@ -1,3 +1,7 @@
1
+ ### 0.1.3 / March 13, 2016
2
+
3
+ * Fixed: handle_error signature
4
+
1
5
  ### 0.1.2 / February 28, 2016
2
6
 
3
7
  * Add support for snake_case query arguments
@@ -18,7 +18,7 @@ module Flyticket
18
18
  base_uri.split('/').last
19
19
  end
20
20
 
21
- # Gets a single event
21
+ # Gets many events
22
22
  def self.get_many(fragment, options)
23
23
  response = get fragment, query: query_string(options)
24
24
 
@@ -57,7 +57,7 @@ module Flyticket
57
57
  end
58
58
 
59
59
  # Raises an error if the response indicates a problem.
60
- def self.handle_error
60
+ def self.handle_error(response)
61
61
  if response['status'] == 'error'
62
62
  raise TicketflyError.new(response)
63
63
  end
@@ -1,3 +1,3 @@
1
1
  module Flyticket
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flyticket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Cipriano
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-29 00:00:00.000000000 Z
11
+ date: 2016-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler