1
0
Fork 0
mirror of https://github.com/nov/fb_graph2 synced 2023-03-27 23:22:15 -04:00
This commit is contained in:
nov 2014-05-25 14:54:02 +09:00
parent a5265ad0d3
commit 0349beb157
3 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,13 @@
module FbGraph2
class Edge
module Events
def events(*args)
params = args.extract_options!
events = self.edge :events, params, edge_scope: args.first
events.collect do |event|
Event.new(event[:id], event).authenticate self.access_token
end
end
end
end
end

15
lib/fb_graph2/event.rb Normal file
View file

@ -0,0 +1,15 @@
module FbGraph2
class Event < Node
register_attributes(
raw: [:description, :is_date_only, :location, :name, :privacy, :ticket_uri, :timezone],
time: [:end_time, :start_time, :updated_time],
page: [:venue],
custom: [:cover, :owner, :parent_group]
)
def initialize(id, attributes = {})
super
# TODO: handle custom attributes.
end
end
end

View file

@ -5,6 +5,7 @@ module FbGraph2
include Edge::Activities
include Edge::Albums
include Edge::Books
include Edge::Events
include Edge::Feed
include Edge::Friends
include Edge::Games