zelf-sdk 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/zelf/errors.rb +6 -1
- data/lib/zelf/models.rb +1 -1
- data/lib/zelf/resources/analytics.rb +5 -3
- data/lib/zelf/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d5906c5eb31b484ae684e1c6cbaf652e3878e7e83ad59261e25d48587cd13575
|
|
4
|
+
data.tar.gz: dea4ccf742ee13926b1e18ed7ea4534c4dd28eabedf6879bb5dac5b57fa0019b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0719c811813b0c7fd4cd9bb8fcf5bb69bf1d35071d8f8bbac1088e2eb46a60019ed0ba9fb75a07b00d2691a789794450acb560311a25a4e4930d71e708c9e770'
|
|
7
|
+
data.tar.gz: a9e8fa52599fb860053406c1e7b5cf3098329d32eab6f579f0ff6465172c9f8836c606c663abfd4275cf6732071cc73f7a2c346a65706038bc4d57bd9daf5a92
|
data/lib/zelf/errors.rb
CHANGED
|
@@ -14,7 +14,12 @@ module Zelf
|
|
|
14
14
|
attr_reader :status, :code, :details, :log_id
|
|
15
15
|
|
|
16
16
|
def initialize(message, status:, code: nil, details: nil, log_id: nil)
|
|
17
|
-
|
|
17
|
+
# The message alone says a request was refused but never which
|
|
18
|
+
# field or which limit, and that is the part a caller can act on.
|
|
19
|
+
reasons = (details || {}).map do |field, said|
|
|
20
|
+
"#{field}: #{said.is_a?(Array) ? said.join(' ') : said}"
|
|
21
|
+
end.join(' ')
|
|
22
|
+
super(reasons.empty? ? message : "#{message} #{reasons}")
|
|
18
23
|
@status = status
|
|
19
24
|
@code = code
|
|
20
25
|
@details = details || {}
|
data/lib/zelf/models.rb
CHANGED
|
@@ -507,7 +507,7 @@ module Zelf
|
|
|
507
507
|
field :transcript, "transcript"
|
|
508
508
|
# Direct URL to the post on its platform
|
|
509
509
|
field :platform_url, "platform_url"
|
|
510
|
-
#
|
|
510
|
+
# What the content was most recently collected under: a hashtag, a creator handle,...
|
|
511
511
|
field :last_keyword, "last_keyword"
|
|
512
512
|
# Short AI-generated summary of the content
|
|
513
513
|
field :ai_summary, "ai_summary"
|
|
@@ -9,9 +9,11 @@ module Zelf
|
|
|
9
9
|
|
|
10
10
|
# Compare Brand Performance. Returns one row of totals per brand: the top-level brand
|
|
11
11
|
# named by `brand_id` first, then each of its competitor sub-brands by title. Theme
|
|
12
|
-
# sub-brands are not competitors and are left out. The statistics block
|
|
13
|
-
# `content.statistics`, so the same parsing works for both.
|
|
14
|
-
#
|
|
12
|
+
# sub-brands are not competitors and are left out. The statistics block has the same
|
|
13
|
+
# shape as `content.statistics`, so the same parsing works for both. It counts the
|
|
14
|
+
# same window, and it leaves out mentions that appear only in a comment, which
|
|
15
|
+
# `content.statistics` includes. `brand_id` must name a top-level brand. A sub-brand
|
|
16
|
+
# is refused with the id of the parent to use instead.
|
|
15
17
|
#
|
|
16
18
|
# Calls GET /api/v1/analytics/brand_comparison/ (analytics.brand_comparison).
|
|
17
19
|
def brand_comparison(brand_id:, platform: nil, posted_after: nil, posted_before: nil, posted_within_days: nil, posted_within_hours: nil)
|
data/lib/zelf/version.rb
CHANGED