rails-pinterest 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6421681164c0404a35136922cc2c755936f6ed8c3356fb1bc3d34cfce7307e10
4
- data.tar.gz: f4030183d7657ea64ad908efeb7c044862ccc9dd6391ae4e53d52efa3f429500
3
+ metadata.gz: b1a4501772a0e79ce5a6e98df055a0d15a4c351d11f5831fccb1b69512219162
4
+ data.tar.gz: 4d6e15a765dc2b3660a5ff469eaa5b2fd8fc499499d6d387e38badec51a4ed1a
5
5
  SHA512:
6
- metadata.gz: 72aa68a0668507d90424b4275c2f16cb82a73e7444325009ea4de237e2673258b518872b08a974909581dc47eb8850b4ab0a324d1a44a565b77e7fd8b91e121b
7
- data.tar.gz: f737c5214cec1cdc427ddfba47b05a19c51d11221141c374e5d01b4fe07eb1c24fe4172c49982887f3d7ff250395b20170984c7638040337da21cf7ac423ab76
6
+ metadata.gz: ef9afaabc3af7ae78c21fa4018d29ff9da8a5e51c97f885165bdb892dbdb805a459a9e17a7eb8fe9790c07ffde09daaef7d4044c7bd5e622c55bea10f23a3b14
7
+ data.tar.gz: d213e04fe17e90d540693bfd3315d43d6f47ab88884a30516624e1ef7c5939006b1b52b45644c6e115504b29423eac212fe401e476a958ab97126193817d16ac
data/CHANGELOG.md CHANGED
@@ -35,4 +35,10 @@
35
35
  - Correct the parameters for keyword metrics, get_country_keyword_metrics
36
36
 
37
37
  ## [0.2.0] - 2024-02-25
38
- - Correct the query parameters for keyword trends
38
+ - Correct the query parameters for keyword trends
39
+
40
+ ## [0.2.1] - 2024-03-11
41
+ - Add Media to API
42
+
43
+ ## [0.2.2] - 2024-03-11
44
+ - Fix param requirement for Media#register_media_upload
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails-pinterest (0.2.0)
4
+ rails-pinterest (0.2.2)
5
5
  faraday (>= 1)
6
6
  faraday-multipart (>= 1)
7
7
 
@@ -42,5 +42,9 @@ module Pinterest
42
42
  def oauth
43
43
  @oauth ||= Pinterest::Oauth.new(client: self)
44
44
  end
45
+
46
+ def media
47
+ @media ||= Pinterest::Media.new(client: self)
48
+ end
45
49
  end
46
50
  end
@@ -0,0 +1,19 @@
1
+ module Pinterest
2
+ class Media
3
+ def initialize(client: nil)
4
+ @client = client
5
+ end
6
+
7
+ def list_media_uploads(bookmark:, page_size:, parameters: {})
8
+ @client.get(path: "/media", parameters: parameters)
9
+ end
10
+
11
+ def register_media_upload(media_type:, parameters: {})
12
+ @client.json_post(path: "/media", parameters: parameters)
13
+ end
14
+
15
+ def get_media_upload_details(media_id:, parameters: {})
16
+ @client.get(path: "/media/#{media_id}", parameters: parameters)
17
+ end
18
+ end
19
+ end
@@ -1,3 +1,3 @@
1
1
  module Pinterest
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.2"
3
3
  end
data/lib/pinterest.rb CHANGED
@@ -4,6 +4,7 @@ require_relative "pinterest/http"
4
4
  require_relative "pinterest/client"
5
5
  require_relative "pinterest/boards"
6
6
  require_relative "pinterest/keywords"
7
+ require_relative "pinterest/media"
7
8
  require_relative "pinterest/oauth"
8
9
  require_relative "pinterest/pins"
9
10
  require_relative "pinterest/terms"
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.0
4
+ version: 0.2.2
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-26 00:00:00.000000000 Z
11
+ date: 2024-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -61,6 +61,7 @@ files:
61
61
  - lib/pinterest/compatibility.rb
62
62
  - lib/pinterest/http.rb
63
63
  - lib/pinterest/keywords.rb
64
+ - lib/pinterest/media.rb
64
65
  - lib/pinterest/oauth.rb
65
66
  - lib/pinterest/pins.rb
66
67
  - lib/pinterest/terms.rb