Class: Forem::Services::BaseService Abstract
- Inherits:
-
Object
- Object
- Forem::Services::BaseService
- Defined in:
- lib/forem/services/base_service.rb
Overview
Subclass and add public methods that delegate to the appropriate model class.
Abstract base class for all Forem API service objects.
Each service wraps a specific area of the Forem API and delegates method calls to the corresponding model class, automatically injecting the client's APIRequestor so that the correct credentials and base URL are used for every request.
Concrete subclasses (e.g. ArticleService, UserService) are accessed through the reader methods on Client and should not be instantiated directly.
Direct Known Subclasses
AdminConceptService, AdminUserService, AgentSessionService, AnalyticsService, ArticleService, BillboardService, CommentService, ConceptService, FollowService, FollowerService, HealthCheckService, OrganizationService, PageService, PodcastEpisodeService, ProfileImageService, ReactionService, ReadingListService, RecommendedArticlesListService, RequestRedirectService, SegmentService, SurveyService, TagService, TrendService, UserService, VideoService
Instance Method Summary collapse
-
#initialize(requestor) ⇒ BaseService
constructor
Create a new service instance bound to the given requestor.
Constructor Details
#initialize(requestor) ⇒ BaseService
Create a new service instance bound to the given requestor.
25 26 27 |
# File 'lib/forem/services/base_service.rb', line 25 def initialize(requestor) @requestor = requestor end |