Class: SocialstatsSDK::Resources::Posts
- Inherits:
-
Base
- Object
- Base
- SocialstatsSDK::Resources::Posts
show all
- Defined in:
- lib/socialstats_sdk/resources/posts.rb
Constant Summary
collapse
- POST_IDENTIFIER_KEYS =
%i[post_id id_unique external_id].freeze
Constants inherited
from Base
Base::CREATOR_IDENTIFIER_KEYS
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#authorized_historic_stats(source_id:, **params) ⇒ Object
23
24
25
26
|
# File 'lib/socialstats_sdk/resources/posts.rb', line 23
def authorized_historic_stats(source_id:, **params)
query = with_post_identifier(params.merge(source_id: source_id))
get("posts/authorized/#{URI.encode_uri_component(source_id.to_s)}/historic_stats", params: query)
end
|
#authorized_stats(source_id:, **params) ⇒ Object
18
19
20
21
|
# File 'lib/socialstats_sdk/resources/posts.rb', line 18
def authorized_stats(source_id:, **params)
query = with_post_identifier(params.merge(source_id: source_id))
get("posts/authorized/#{URI.encode_uri_component(source_id.to_s)}/stats", params: query)
end
|
#historic_stats(source_id:, **params) ⇒ Object
14
15
16
|
# File 'lib/socialstats_sdk/resources/posts.rb', line 14
def historic_stats(source_id:, **params)
get("posts/historic_stats", params: with_post_identifier(params.merge(source_id: source_id)))
end
|
#stats(source_id:, **params) ⇒ Object
10
11
12
|
# File 'lib/socialstats_sdk/resources/posts.rb', line 10
def stats(source_id:, **params)
get("posts/stats", params: with_post_identifier(params.merge(source_id: source_id)))
end
|