rails-pinterest 0.2.4 → 0.2.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e94c9217ac9b389dc20d380d2ac4a9ff143eae9db049001d241835a3e3c4ddc2
4
- data.tar.gz: 61560a661ce160863fa75c89b0a0272b5b344d390788ee519b9ca92e43ef7619
3
+ metadata.gz: c2511d23d52e43b2316914cd9ae42d5420a9677471f417c3d725c36c58abaabe
4
+ data.tar.gz: 17ca93046f01b103c386a01fcf3048da5736f14168cb6f9e27ddb4a3f554d5e9
5
5
  SHA512:
6
- metadata.gz: '0038c6c2baf964775a853dedecc910cb8b9274b064cee1243712322d3b4aa63faa18359a831ab83722000e376ad213fde64babd52b5c167886ef2c27d1378dfd'
7
- data.tar.gz: cbf1ce610a1ae06eb2a04899c42e4cd81d69d66a8849c4b082f81ffaaba555946a59429fbe965d37578071e0057c4f5b577b5d94cd896012e944dec09d7e4338
6
+ metadata.gz: dd55a3c51bb89ea98999bc7b9c11c79aeb2fc5ba03f9fbc0fe69dcc4b0fd2156725a57261fea987450329e7242c4841c820c300a290f04f3db11ca9104fc4a9a
7
+ data.tar.gz: 2cff0ae0bfe401e66c8445f8aef9222576c69d6227f05b2e229e9c043df2129b36bb1e71f43545e8b2f6ac4874135b2d0f73b4c89d22e92a9557a4de92b4c1e1
data/CHANGELOG.md CHANGED
@@ -47,4 +47,18 @@
47
47
  - Revert V.0.2.3
48
48
 
49
49
  ## [0.2.4] - 2024-04-09
50
- - Add User Account to API
50
+ - Add User Account to API
51
+
52
+ ## [0.2.5] - 2024-05-10
53
+ - Add the beta endpoint https://developer.pinterest.com/docs/api/v5/#operation/multi_pins/analytics (it doesn't really work right now)
54
+ - Example usage:
55
+ ```ruby
56
+ client = Pinterest::Client.new(access_token: "some-access-token")
57
+ params = {
58
+ pin_ids: ["920634348815764178","920634348815790715","920634348815829069","920634348815865049","920634348815897303","920634348815911959","920634348815943797","920634348816238458","920634348816183143","920634348816403644","920634348816488886","920634348816699966"],
59
+ start_date: "2024-03-01",
60
+ end_date: "2024-05-10",
61
+ metric_types: ["IMPRESSION", "OUTBOUND_CLICK", "PIN_CLICK", "SAVE", "SAVE_RATE", "VIDEO_MRC_VIEW", "VIDEO_10S_VIEW", "QUARTILE_95_PERCENT_VIEW", "VIDEO_V50_WATCH_TIME", "VIDEO_START", "VIDEO_AVG_WATCH_TIME", "TOTAL_COMMENTS", "TOTAL_REACTIONS"]
62
+ }
63
+ response = client.pins.get_multiple_pin_analytics(ids: params[:pin_ids], start_date: params[:start_date], end_date: params[:end_date], metric_types: params[:metric_types], parameters: {})
64
+ ```
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails-pinterest (0.2.4)
4
+ rails-pinterest (0.2.5)
5
5
  faraday (>= 1)
6
6
  faraday-multipart (>= 1)
7
7
 
data/README.md CHANGED
@@ -260,4 +260,7 @@ The gem is available as open source under the terms of the [MIT License](https:/
260
260
  Everyone interacting in the Ruby Pinterest project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/royalgiant/rails-pinterest/blob/main/CODE_OF_CONDUCT.md).
261
261
 
262
262
  ## Influences
263
- Project heavily influenced by [https://github.com/alexrudall/ruby-openai](https://github.com/alexrudall/ruby-openai). Great project, go give them a star!
263
+ Project heavily influenced by [https://github.com/alexrudall/ruby-openai](https://github.com/alexrudall/ruby-openai). Great project, go give them a star!
264
+
265
+ ## Where Is Rails-Pinterest Used?
266
+ Currently used by [Imagifyr](https://imagifyr.com) to allow creators to schedule their content. SEO Optimized with AI.
@@ -24,8 +24,12 @@ module Pinterest
24
24
  @client.patch(path: "/pins/#{id}", parameters: parameters)
25
25
  end
26
26
 
27
- def get_pin_analytics(id:, parameters: {})
28
- @client.get(path: "/pins/#{id}/analytics", parameters: parameters)
27
+ def get_pin_analytics(id:, start_date:, end_date:, metric_types:, parameters: {})
28
+ @client.get(path: "/pins/#{id}/analytics?start_date=#{start_date}&end_date=#{end_date}&metric_types=#{metric_types}", parameters: parameters)
29
+ end
30
+
31
+ def get_multiple_pin_analytics(ids:, start_date:, end_date:, metric_types:, parameters: {})
32
+ @client.get(path: "/pins/analytics?pin_ids=#{ids}&start_date=#{start_date}&end_date=#{end_date}&metric_types=#{metric_types}", parameters: parameters)
29
33
  end
30
34
 
31
35
  def save_pin(id: , parameters: {})
@@ -1,3 +1,3 @@
1
1
  module Pinterest
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
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.2.4
4
+ version: 0.2.5
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-04-10 00:00:00.000000000 Z
11
+ date: 2024-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday