Class: Forem::Services::FollowService
- Inherits:
-
BaseService
- Object
- BaseService
- Forem::Services::FollowService
- Defined in:
- lib/forem/services/follow_service.rb
Overview
Service for interacting with the Forem Follows API.
Lists the tags the authenticated user follows, and follows users or organizations in bulk.
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Forem::Follow
Follow one or more users and/or organizations.
-
#list(params = {}, opts = {}) ⇒ Forem::ListObject<Forem::Follow>
List tags followed by the authenticated user.
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from Forem::Services::BaseService
Instance Method Details
#create(params = {}, opts = {}) ⇒ Forem::Follow
Follow one or more users and/or organizations.
The Forem API takes flat user_ids and/or organization_ids
arrays — not a wrapped follows: key, despite the resource name.
Tags are not followed through this endpoint.
56 57 58 |
# File 'lib/forem/services/follow_service.rb', line 56 def create(params = {}, opts = {}) Follow.create(params, opts_with_requestor(opts)) end |
#list(params = {}, opts = {}) ⇒ Forem::ListObject<Forem::Follow>
List tags followed by the authenticated user.
29 30 31 |
# File 'lib/forem/services/follow_service.rb', line 29 def list(params = {}, opts = {}) Follow.list(params, opts_with_requestor(opts)) end |