Class: SocialstatsSDK::Resources::Posts

Inherits:
Base
  • Object
show all
Defined in:
lib/socialstats_sdk/resources/posts.rb

Constant Summary collapse

CREATOR_IDENTIFIER_KEYS =
%i[socialstats_creator_id].freeze
POST_IDENTIFIER_KEYS =
%i[post_id id_unique external_id].freeze

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from SocialstatsSDK::Resources::Base

Instance Method Details

#historic_stats(source_id:, **params) ⇒ Object



13
14
15
# File 'lib/socialstats_sdk/resources/posts.rb', line 13

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



9
10
11
# File 'lib/socialstats_sdk/resources/posts.rb', line 9

def stats(source_id:, **params)
  get("posts/stats", params: with_post_identifier(params.merge(source_id: source_id)))
end