rails-pinterest 0.1.8 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/pinterest/keywords.rb +10 -4
- data/lib/pinterest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6421681164c0404a35136922cc2c755936f6ed8c3356fb1bc3d34cfce7307e10
|
4
|
+
data.tar.gz: f4030183d7657ea64ad908efeb7c044862ccc9dd6391ae4e53d52efa3f429500
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72aa68a0668507d90424b4275c2f16cb82a73e7444325009ea4de237e2673258b518872b08a974909581dc47eb8850b4ab0a324d1a44a565b77e7fd8b91e121b
|
7
|
+
data.tar.gz: f737c5214cec1cdc427ddfba47b05a19c51d11221141c374e5d01b4fe07eb1c24fe4172c49982887f3d7ff250395b20170984c7638040337da21cf7ac423ab76
|
data/CHANGELOG.md
CHANGED
@@ -29,4 +29,10 @@
|
|
29
29
|
- Update URL of keyword metrics
|
30
30
|
|
31
31
|
## [0.1.8] - 2024-02-24
|
32
|
-
- Bump version for changes in ReadMe.
|
32
|
+
- Bump version for changes in ReadMe.
|
33
|
+
|
34
|
+
## [0.1.9] - 2024-02-24
|
35
|
+
- Correct the parameters for keyword metrics, get_country_keyword_metrics
|
36
|
+
|
37
|
+
## [0.2.0] - 2024-02-25
|
38
|
+
- Correct the query parameters for keyword trends
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -245,7 +245,7 @@ To install this gem onto your local machine, run `bundle exec rake install`.
|
|
245
245
|
|
246
246
|
## Release
|
247
247
|
|
248
|
-
Update the version number in `version.rb`, update `CHANGELOG.md`, run `bundle install` to update Gemfile.lock, run `gem build rails-pinterest.gemspec`, and then run `sudo bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org) by `gem push rails-pinterest-{number}.gem`.
|
248
|
+
Update the version number in `version.rb`, update `CHANGELOG.md`, run `bundle install` to update Gemfile.lock, delete previous `rails-pinterest-{number}.gem`, run `gem build rails-pinterest.gemspec`, `commit` the changes,and then run `sudo bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org) by `gem push rails-pinterest-{number}.gem`.
|
249
249
|
|
250
250
|
## Contributing
|
251
251
|
|
data/lib/pinterest/keywords.rb
CHANGED
@@ -16,15 +16,21 @@ module Pinterest
|
|
16
16
|
@client.patch(path: "/ad_accounts/#{ad_account_id}/keywords", parameters: parameters)
|
17
17
|
end
|
18
18
|
|
19
|
-
def get_country_keyword_metrics(ad_account_id:, parameters: {})
|
20
|
-
@client.get(path: "/ad_accounts/#{ad_account_id}/keywords/metrics", parameters: parameters)
|
19
|
+
def get_country_keyword_metrics(ad_account_id:, country_code:, keywords:, parameters: {})
|
20
|
+
@client.get(path: "/ad_accounts/#{ad_account_id}/keywords/metrics?country_code=#{country_code}&keywords=#{keywords}", parameters: parameters)
|
21
21
|
end
|
22
22
|
|
23
23
|
# Region list: "US" "CA" "DE" "FR" "ES" "IT" "DE+AT+CH" "GB+IE" "IT+ES+PT+GR+MT" "PL+RO+HU+SK+CZ" "SE+DK+FI+NO" "NL+BE+LU" "AR" "BR" "CO" "MX" "MX+AR+CO+CL" "AU+NZ"
|
24
24
|
# trend_type: "growing" "monthly" "yearly" "seasonal"
|
25
|
+
# interest: "animals" "architecture" "art" "beauty" "childrens_fashion" "design" "diy_and_crafts" "education" "electronics" "entertainment" "event_planning" "finance"
|
26
|
+
# "food_and_drinks" "gardening" "health" "home_decor" "mens_fashion" "parenting" "quotes" "sport" "travel" "vehicles" "wedding" "womens_fashion"
|
27
|
+
# genders: "female" "male" "unknown"
|
28
|
+
# ages: "18-24" "25-34" "35-44" "45-49" "50-54" "55-64" "65+"
|
29
|
+
# normalize_against_group (boolean): false (default)
|
30
|
+
# limit [1-50]
|
25
31
|
# https://developer.pinterest.com/docs/api/v5/#operation/trending_keywords/list
|
26
|
-
def list_trending_keywords(region:, trend_type:, parameters: {})
|
27
|
-
@client.get(path: "/trends/keywords/#{region}/top/#{trend_type}", parameters: parameters)
|
32
|
+
def list_trending_keywords(region:, trend_type:, interest:, gender:, ages:, normalize_against_group:, limit:, parameters: {})
|
33
|
+
@client.get(path: "/trends/keywords/#{region}/top/#{trend_type}?interest=#{interest}&gender=#{gender}&ages=#{ages}&normalize_against_group=#{normalize_against_group}&limit=#{limit}", parameters: parameters)
|
28
34
|
end
|
29
35
|
end
|
30
36
|
end
|
data/lib/pinterest/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-pinterest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Donald Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|