Created
January 17, 2015 18:23
-
-
Save aishek/b42d07a3a7bf9ee8ac0e to your computer and use it in GitHub Desktop.
grape-entity statuses api example
This file contains 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
module Api | |
module V1 | |
class StatusesAPI < Api::V1::BaseAPI | |
get '/' do | |
statuses = Status.all | |
detailed_statuses = DetailedStatus.all | |
present statuses, with: Api::V1::StatusEntity, type: :full | |
present detailed_statuses, with: Api::V1::StatusDetailedEntity | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment