Class: SocialstatsSDK::Resources::Creators

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

Constant Summary

Constants inherited from Base

Base::CREATOR_IDENTIFIER_KEYS

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

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

Instance Method Details

#activities(**params) ⇒ Object



30
31
32
# File 'lib/socialstats_sdk/resources/creators.rb', line 30

def activities(**params)
  get("creators/activities", params: with_identifier(params))
end

Raises:

  • (ArgumentError)


64
65
66
67
68
69
70
# File 'lib/socialstats_sdk/resources/creators.rb', line 64

def add_link_request(link:, **params)
  raise ArgumentError, "link is required" if link.to_s.empty?

  query = with_identifier(params)
  query[:link] = link
  post("creators/link_request", params: query)
end

#audience(**params) ⇒ Object



18
19
20
# File 'lib/socialstats_sdk/resources/creators.rb', line 18

def audience(**params)
  get("creators/audience", params: with_identifier(params))
end

#audience_details(country_code:, **params) ⇒ Object

Raises:

  • (ArgumentError)


22
23
24
25
26
27
28
# File 'lib/socialstats_sdk/resources/creators.rb', line 22

def audience_details(country_code:, **params)
  raise ArgumentError, "country_code is required" if country_code.to_s.empty?

  query = with_identifier(params)
  query[:country_code] = country_code
  get("creators/audience/details", params: query)
end

#authorized_audience(**params) ⇒ Object



46
47
48
# File 'lib/socialstats_sdk/resources/creators.rb', line 46

def authorized_audience(**params)
  get("creators/authorized/audience", params: with_identifier(params))
end

#authorized_content(**params) ⇒ Object



50
51
52
# File 'lib/socialstats_sdk/resources/creators.rb', line 50

def authorized_content(**params)
  get("creators/authorized/content", params: with_identifier(params))
end

#authorized_historic_stats(**params) ⇒ Object



42
43
44
# File 'lib/socialstats_sdk/resources/creators.rb', line 42

def authorized_historic_stats(**params)
  get("creators/authorized/historic_stats", params: with_identifier(params))
end

#authorized_stats(**params) ⇒ Object



38
39
40
# File 'lib/socialstats_sdk/resources/creators.rb', line 38

def authorized_stats(**params)
  get("creators/authorized/stats", params: with_identifier(params))
end

#content(**params) ⇒ Object



34
35
36
# File 'lib/socialstats_sdk/resources/creators.rb', line 34

def content(**params)
  get("creators/content", params: with_identifier(params))
end

#historic_stats(**params) ⇒ Object



14
15
16
# File 'lib/socialstats_sdk/resources/creators.rb', line 14

def historic_stats(**params)
  get("creators/historic_stats", params: with_identifier(params))
end

#info(**params) ⇒ Object



6
7
8
# File 'lib/socialstats_sdk/resources/creators.rb', line 6

def info(**params)
  get("creators/info", params: with_identifier(params))
end

Raises:

  • (ArgumentError)


72
73
74
75
76
77
78
# File 'lib/socialstats_sdk/resources/creators.rb', line 72

def remove_link_request(link:, **params)
  raise ArgumentError, "link is required" if link.to_s.empty?

  query = with_identifier(params)
  query[:link] = link
  delete("creators/link_request", params: query)
end

#search(q:, **params) ⇒ Object

Raises:

  • (ArgumentError)


58
59
60
61
62
# File 'lib/socialstats_sdk/resources/creators.rb', line 58

def search(q:, **params)
  raise ArgumentError, "q is required" if q.to_s.empty?

  get("creators/search", params: params.merge(q: q))
end

#stats(**params) ⇒ Object



10
11
12
# File 'lib/socialstats_sdk/resources/creators.rb', line 10

def stats(**params)
  get("creators/stats", params: with_identifier(params))
end

#top_posts(**params) ⇒ Object



54
55
56
# File 'lib/socialstats_sdk/resources/creators.rb', line 54

def top_posts(**params)
  get("creators/top_posts", params: with_identifier(params))
end