Created
May 26, 2012 08:08
-
-
Save tylr/2792865 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require '../pidgin/lib/pidgin/dialect' | |
dialect :facebook do | |
# Filter invoked as soon as it's mounted | |
mount do |credentials| | |
end | |
# Filter should return boolean in response to determine | |
# if we really have access | |
authenticate do | |
@session.authorized | |
end | |
# If the dialect does not respond via a responds_to | |
# handle it here. Could be used for dynamic responders | |
default do |path| | |
end | |
responds_to '/Liked' do | |
# ... # | |
end | |
responds_to '/Photos/Tagged' do | |
# ... # | |
end | |
responds_to '/Photos/Tagged/With/Me/In It' do | |
# ... # | |
end | |
responds_to '/Blah/Me/Fucking/shit/apple.txt' do | |
# ... # | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment