linkedin_orbit 0.1.3 → 0.1.4

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: b6f4f66d8e02d0462adeb017a15fc6117c8adbec5754410dda29693920e8a3c5
4
- data.tar.gz: d810c834be558471325109f67d73aed9be83b6bc935e060b724238d1ff4acac7
3
+ metadata.gz: 8796a2d61f0d7a8b454eb036291eef66e0b7f04ab5c9ffe36c7e4a6662dff34e
4
+ data.tar.gz: e083b2dc30609e1ee1d5cbf9f6c8e1d5b277e06cbf6f30580385aa64a900230b
5
5
  SHA512:
6
- metadata.gz: a02b3848153540d2d31cf41aca5c220b03e9381ec4b411ac6e218c7163a28d8dc7b563f2b6f3b6806ea147004de4dcff7b444c13433382fe03bef25f13c7f005
7
- data.tar.gz: d65539d673f67bb64c03229967c9345fd8a777062555bbe87688da18d10e6550de900843d3e6d9b0d81152a8227b98fd5a33af0ddd640fe6da2ea59bed12c57b
6
+ metadata.gz: c2ee0f8697cd95f02737396538669b2cfae02851df3da05d44f63d9572c552e7c015ba258bfe57b94668d59d1d1459f42f20526b2b1c44524867d73b7cb3fbee
7
+ data.tar.gz: acf4c02bcacabc318df46775bb86e61aef4c93e8aacc1ca3eb3965853fbd2bf52eab142b6fb6a823fc632d8177afefdf1c267880fb6f824fe1dbab8a629b303e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- linkedin_orbit (0.1.2)
4
+ linkedin_orbit (0.1.3)
5
5
  dotenv (~> 2.7)
6
6
  http (~> 4.4)
7
7
  json (~> 2.5)
data/README.md CHANGED
@@ -4,7 +4,9 @@
4
4
  [![Gem Version](https://badge.fury.io/rb/linkedin_orbit.svg)](https://badge.fury.io/rb/dev_orbit)
5
5
  [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](code_of_conduct.md)
6
6
 
7
- This is a Ruby app that can be used to integrate LinkedIn post comments into your organization's Orbit workspace.
7
+ Add your LinkedIn interactions into your Orbit workspace with this community-built integration.
8
+
9
+ ![New LinkedIn post comment in Orbit screenshot](readme_images/new-comment-screenshot.png)
8
10
 
9
11
  |<p align="left">:sparkles:</p> This is a *community project*. The Orbit team does its best to maintain it and keep it up to date with any recent API changes.<br/><br/>We welcome community contributions to make sure that it stays current. <p align="right">:sparkles:</p>|
10
12
  |-----------------------------------------|
@@ -12,6 +12,8 @@ module LinkedinOrbit
12
12
  def process_comments
13
13
  posts = get_posts
14
14
 
15
+ return posts unless posts.is_a?(Array)
16
+
15
17
  posts.each do |post|
16
18
  comments = get_post_comments(post["id"])
17
19
 
@@ -47,7 +49,16 @@ module LinkedinOrbit
47
49
  response = https.request(request)
48
50
 
49
51
  response = JSON.parse(response.body)
50
-
52
+
53
+ return response["message"] if response["serviceErrorCode"]
54
+
55
+ if response["elements"].nil? || response["elements"].empty?
56
+ return <<~HEREDOC
57
+ No new posts to process from your LinkedIn organization.
58
+ If you suspect this is incorrect, verify your LinkedIn organization schema is correct in your credentials.
59
+ HEREDOC
60
+ end
61
+
51
62
  response["elements"].each do |element|
52
63
  posts << {
53
64
  "id" => element["activity"],
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LinkedinOrbit
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linkedin_orbit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orbit DevRel
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-05-24 00:00:00.000000000 Z
12
+ date: 2021-06-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: http
@@ -171,6 +171,7 @@ files:
171
171
  - readme_images/linkedin_oauth_redirects.png
172
172
  - readme_images/logo.png
173
173
  - readme_images/marketing_platform_request_access.png
174
+ - readme_images/new-comment-screenshot.png
174
175
  - readme_images/products_list.png
175
176
  - readme_images/ways-to-use.png
176
177
  - scripts/check_comments.rb