Module: FbGraph::Connections::Achievements
- Included in:
- Application
- Defined in:
- lib/fb_graph/connections/achievements.rb
Instance Method Summary collapse
- #achievement!(achievement_url, options = {}) ⇒ Object
- #achievements(options = {}) ⇒ Object
- #unregister_achievement!(achievement_url, options = {}) ⇒ Object
Instance Method Details
#achievement!(achievement_url, options = {}) ⇒ Object
12 13 14 |
# File 'lib/fb_graph/connections/achievements.rb', line 12 def achievement!(achievement_url, = {}) post .merge(:connection => :achievements, :achievement => achievement_url) end |
#achievements(options = {}) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/fb_graph/connections/achievements.rb', line 4 def achievements( = {}) [:access_token] ||= self.access_token achievements = self.connection :achievements, achievements.map! do |achievement| Achievement.new achievement[:id], achievement.merge(:access_token => [:access_token]) end end |
#unregister_achievement!(achievement_url, options = {}) ⇒ Object
16 17 18 |
# File 'lib/fb_graph/connections/achievements.rb', line 16 def unregister_achievement!(achievement_url, = {}) delete .merge(:connection => :achievements, :achievement => achievement_url) end |