Class: QiitaExport::Fetcher::ApiEndPoint
- Inherits:
-
Object
- Object
- QiitaExport::Fetcher::ApiEndPoint
show all
- Defined in:
- lib/qiita-export/fetcher/api_end_point.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of ApiEndPoint.
6
7
8
|
# File 'lib/qiita-export/fetcher/api_end_point.rb', line 6
def initialize
@config = ::QiitaExport::Config
end
|
Class Method Details
.instance(end_point_sym) ⇒ Object
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/qiita-export/fetcher/api_end_point.rb', line 14
def self.instance(end_point_sym)
case end_point_sym
when :user
UserEndPoint.new
when :team
TeamEndPoint.new
else
raise ArgumentError("unsupported endpont: #{end_point_sym}")
end
end
|
Instance Method Details
#next_page(page) ⇒ Object
10
11
12
|
# File 'lib/qiita-export/fetcher/api_end_point.rb', line 10
def next_page(page)
raise NotImplementedError.new("You must implement #{self.class}##{__method__}")
end
|