forked from stringer-rss/stringer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresponse.rb
More file actions
43 lines (34 loc) · 1.2 KB
/
Copy pathresponse.rb
File metadata and controls
43 lines (34 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
require_relative "authentication"
require_relative "read_groups"
require_relative "read_feeds"
require_relative "read_feeds_groups"
require_relative "read_favicons"
require_relative "read_items"
require_relative "read_links"
require_relative "sync_unread_item_ids"
require_relative "sync_saved_item_ids"
require_relative "write_mark_item"
require_relative "write_mark_feed"
require_relative "write_mark_group"
module FeverAPI
class Response
def initialize(params)
@response = { api_version: 3 }
@response.merge! Authentication.new.call(params)
@response.merge! ReadFeeds.new.call(params)
@response.merge! ReadGroups.new.call(params)
@response.merge! ReadFeedsGroups.new.call(params)
@response.merge! ReadFavicons.new.call(params)
@response.merge! ReadItems.new.call(params)
@response.merge! ReadLinks.new.call(params)
@response.merge! SyncUnreadItemIds.new.call(params)
@response.merge! SyncSavedItemIds.new.call(params)
@response.merge! WriteMarkItem.new.call(params)
@response.merge! WriteMarkFeed.new.call(params)
@response.merge! WriteMarkGroup.new.call(params)
end
def to_json
@response.to_json
end
end
end