Class: Api::V1::StreamsController

Inherits:
BaseController show all
Defined in:
app/controllers/api/v1/streams_controller.rb

Instance Attribute Summary

Attributes included from OpenidConnect::ProtectedResourceEndpoint

#current_token

Instance Method Summary collapse

Methods included from OpenidConnect::ProtectedResourceEndpoint

#access_token?, #require_access_token

Instance Method Details

#activityObject


24
25
26
# File 'app/controllers/api/v1/streams_controller.rb', line 24

def activity
  stream_responder(Stream::Activity, "posts.interacted_at", "interacted_at")
end

#aspectsObject


18
19
20
21
22
# File 'app/controllers/api/v1/streams_controller.rb', line 18

def aspects
  aspect_ids = params.has_key?(:aspect_ids) ? JSON.parse(params[:aspect_ids]) : []
  @stream = Stream::Aspect.new(current_user, aspect_ids, max_time: stream_max_time)
  stream_responder
end

#commentedObject


32
33
34
# File 'app/controllers/api/v1/streams_controller.rb', line 32

def commented
  stream_responder(Stream::Comments)
end

#followed_tagsObject


44
45
46
# File 'app/controllers/api/v1/streams_controller.rb', line 44

def followed_tags
  stream_responder(Stream::FollowedTag)
end

#likedObject


36
37
38
# File 'app/controllers/api/v1/streams_controller.rb', line 36

def liked
  stream_responder(Stream::Likes)
end

#mentionsObject


40
41
42
# File 'app/controllers/api/v1/streams_controller.rb', line 40

def mentions
  stream_responder(Stream::Mention)
end

#multiObject


28
29
30
# File 'app/controllers/api/v1/streams_controller.rb', line 28

def multi
  stream_responder(Stream::Multi)
end