File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 33require 'camdram/image'
44require 'camdram/news'
55require 'camdram/show'
6+ require 'camdram/diary'
67
78module Camdram
89 class Organisation < Base
@@ -51,6 +52,15 @@ def shows
5152 split_object ( response , Show )
5253 end
5354
55+ # Gets a diary object which contains an array of upcoming calendar events for the organisation
56+ #
57+ # @return [Camdram::Diary] A Diary object.
58+ def diary ( )
59+ url = "#{ self . class . url } /#{ slug } /diary.json"
60+ response = get ( url )
61+ Diary . new ( response )
62+ end
63+
5464 # Returns the URL+slug of the organisation
5565 #
5666 # @return [String] The full URL and slug.
Original file line number Diff line number Diff line change 22require 'camdram/api'
33require 'camdram/news'
44require 'camdram/show'
5+ require 'camdram/diary'
56
67module Camdram
78 class Venue < Base
@@ -45,6 +46,15 @@ def shows
4546 split_object ( response , Show )
4647 end
4748
49+ # Gets a diary object which contains an array of upcoming calendar events for the venue
50+ #
51+ # @return [Camdram::Diary] A Diary object.
52+ def diary ( )
53+ url = "#{ self . class . url } /#{ slug } /diary.json"
54+ response = get ( url )
55+ Diary . new ( response )
56+ end
57+
4858 # Returns the URL+slug of the venue
4959 #
5060 # @return [String] The full URL and slug.
Original file line number Diff line number Diff line change 11module Camdram
2- VERSION = '1.2.0 '
2+ VERSION = '1.2.1 '
33 BASE_URL = 'https://www.camdram.net'
44end
You can’t perform that action at this time.
0 commit comments