Sha256: 537977d5803620f5d1129c49d57c9a3a399bb0bdcebd038f12175554c23e643a

Contents?: true

Size: 869 Bytes

Versions: 25

Compression:

Stored size: 869 Bytes

Contents

module SlackRubyBotServer
  module Api
    module Presenters
      module TeamPresenter
        include Roar::JSON::HAL
        include Roar::Hypermedia
        include Grape::Roar::Representer

        property :id, type: String, desc: 'Team ID.'
        property :team_id, type: String, desc: 'Slack team ID.'
        property :name, type: String, desc: 'Team name.'
        property :domain, type: String, desc: 'Team domain.'
        property :active, type: Boolean, desc: 'Team is active.'
        property :created_at, type: DateTime, desc: 'Date/time when the team was created.'
        property :updated_at, type: DateTime, desc: 'Date/time when the team was accepted, declined or canceled.'

        link :self do |opts|
          request = Grape::Request.new(opts[:env])
          "#{request.base_url}/api/teams/#{id}"
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
slack-ruby-bot-server-1.2.0 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-1.1.0 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-1.0.0 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.12.3 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.12.2 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.12.1 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.12.0 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.11.1 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.11.0 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.10.0 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.9.0 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.8.3 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.8.2 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.8.1 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.8.0 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.7.0 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.6.1 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.6.0 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.5.0 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb
slack-ruby-bot-server-0.4.0 lib/slack-ruby-bot-server/api/presenters/team_presenter.rb