linkedin_orbit 0.1.4 → 0.5.1

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: 8796a2d61f0d7a8b454eb036291eef66e0b7f04ab5c9ffe36c7e4a6662dff34e
4
- data.tar.gz: e083b2dc30609e1ee1d5cbf9f6c8e1d5b277e06cbf6f30580385aa64a900230b
3
+ metadata.gz: e40d5cbbc3c822d02e6c4a37706413f68a0a5a6ef06ddbc0814e3dcfeb4f9f4e
4
+ data.tar.gz: 0ed2bc12b430d788d9c6bc7c31e53936a0bec2ceadbfcc94645c2c780e14c5fc
5
5
  SHA512:
6
- metadata.gz: c2ee0f8697cd95f02737396538669b2cfae02851df3da05d44f63d9572c552e7c015ba258bfe57b94668d59d1d1459f42f20526b2b1c44524867d73b7cb3fbee
7
- data.tar.gz: acf4c02bcacabc318df46775bb86e61aef4c93e8aacc1ca3eb3965853fbd2bf52eab142b6fb6a823fc632d8177afefdf1c267880fb6f824fe1dbab8a629b303e
6
+ metadata.gz: ac438b786ed497bff09b45556dc1ffde00dd9380d0035d5e5e86e8b9bfeab42495ebd9826d5d64659af5ec1c10e5397b7626b68a5412d5c1f59a7c61019a4407
7
+ data.tar.gz: e2d025027f454283f7f0385394d4628e3a22bd48144978404130ea52d64a72cada877ffd2f9f77c4eed7af06c3fd1078293ae4f11bc6242a3d51a92b1978dbed
data/Gemfile.lock CHANGED
@@ -1,19 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- linkedin_orbit (0.1.3)
4
+ linkedin_orbit (0.2.0)
5
5
  dotenv (~> 2.7)
6
6
  http (~> 4.4)
7
7
  json (~> 2.5)
8
8
  linkedin (~> 1.1)
9
- orbit_activities (~> 0.1)
9
+ orbit_activities (~> 0.2)
10
10
  thor (~> 1.1)
11
11
  zeitwerk (~> 2.4)
12
12
 
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- addressable (2.7.0)
16
+ addressable (2.8.0)
17
17
  public_suffix (>= 2.0.2, < 5.0)
18
18
  ast (2.4.2)
19
19
  byebug (11.1.3)
@@ -23,20 +23,24 @@ GEM
23
23
  domain_name (0.5.20190701)
24
24
  unf (>= 0.0.5, < 1.0.0)
25
25
  dotenv (2.7.6)
26
- faraday (1.4.2)
26
+ faraday (1.5.1)
27
27
  faraday-em_http (~> 1.0)
28
28
  faraday-em_synchrony (~> 1.0)
29
29
  faraday-excon (~> 1.1)
30
+ faraday-httpclient (~> 1.0.1)
30
31
  faraday-net_http (~> 1.0)
31
32
  faraday-net_http_persistent (~> 1.1)
33
+ faraday-patron (~> 1.0)
32
34
  multipart-post (>= 1.2, < 3)
33
35
  ruby2_keywords (>= 0.0.4)
34
36
  faraday-em_http (1.0.0)
35
37
  faraday-em_synchrony (1.0.0)
36
38
  faraday-excon (1.1.0)
39
+ faraday-httpclient (1.0.1)
37
40
  faraday-net_http (1.0.1)
38
41
  faraday-net_http_persistent (1.1.0)
39
- ffi (1.15.1)
42
+ faraday-patron (1.0.0)
43
+ ffi (1.15.3)
40
44
  ffi-compiler (1.0.1)
41
45
  ffi (>= 1.0.0)
42
46
  rake
@@ -47,7 +51,7 @@ GEM
47
51
  http-cookie (~> 1.0)
48
52
  http-form_data (~> 2.2)
49
53
  http-parser (~> 1.2.0)
50
- http-cookie (1.0.3)
54
+ http-cookie (1.0.4)
51
55
  domain_name (~> 0.5)
52
56
  http-form_data (2.3.0)
53
57
  http-parser (1.2.3)
@@ -67,18 +71,18 @@ GEM
67
71
  multi_json (~> 1.3)
68
72
  multi_xml (~> 0.5)
69
73
  rack (>= 1.2, < 3)
70
- orbit_activities (0.1.0)
74
+ orbit_activities (0.2.2)
71
75
  http (~> 4.4)
72
76
  json (~> 2.5)
73
77
  rake (~> 13.0)
74
78
  zeitwerk (~> 2.4)
75
79
  parallel (1.20.1)
76
- parser (3.0.1.1)
80
+ parser (3.0.2.0)
77
81
  ast (~> 2.4.1)
78
82
  public_suffix (4.0.6)
79
83
  rack (2.2.3)
80
84
  rainbow (3.0.0)
81
- rake (13.0.3)
85
+ rake (13.0.6)
82
86
  regexp_parser (2.1.1)
83
87
  rexml (3.2.5)
84
88
  rspec (3.10.0)
@@ -94,16 +98,16 @@ GEM
94
98
  diff-lcs (>= 1.2.0, < 2.0)
95
99
  rspec-support (~> 3.10.0)
96
100
  rspec-support (3.10.2)
97
- rubocop (1.14.0)
101
+ rubocop (1.18.3)
98
102
  parallel (~> 1.10)
99
103
  parser (>= 3.0.0.0)
100
104
  rainbow (>= 2.2.2, < 4.0)
101
105
  regexp_parser (>= 1.8, < 3.0)
102
106
  rexml
103
- rubocop-ast (>= 1.5.0, < 2.0)
107
+ rubocop-ast (>= 1.7.0, < 2.0)
104
108
  ruby-progressbar (~> 1.7)
105
109
  unicode-display_width (>= 1.4.0, < 3.0)
106
- rubocop-ast (1.5.0)
110
+ rubocop-ast (1.7.0)
107
111
  parser (>= 3.0.1.1)
108
112
  ruby-progressbar (1.11.0)
109
113
  ruby2_keywords (0.0.4)
@@ -112,7 +116,7 @@ GEM
112
116
  unf_ext
113
117
  unf_ext (0.0.7.7)
114
118
  unicode-display_width (2.0.0)
115
- webmock (3.12.0)
119
+ webmock (3.13.0)
116
120
  addressable (>= 2.3.6)
117
121
  crack (>= 0.3.2)
118
122
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -120,7 +124,6 @@ GEM
120
124
 
121
125
  PLATFORMS
122
126
  arm64-darwin-20
123
- x86_64-linux
124
127
 
125
128
  DEPENDENCIES
126
129
  byebug
data/README.md CHANGED
@@ -23,7 +23,7 @@ The application requires the following environment variables:
23
23
  | Variable | Description | More Info
24
24
  |---|---|--|
25
25
  | `LINKEDIN_TOKEN` | LinkedIn Token | Follow the [First Time Setup guide](docs/FIRST_TIME_INSTRUCTIONS.md) to obtain the token
26
- | `LINKEDIN_ORGANIZATION` | LinkedIn Organization Page ID | Format: `urn:li:organization:#{id}`. ID is the set of numbers in LinkedIn page URL, i.e. `https://www.linkedin.com/company/28866695`, the ID is `28866695`.
26
+ | `LINKEDIN_ORGANIZATION` | LinkedIn Organization Page ID | Format: `urn:li:organization:#{id}`, where `id` is the set of numbers in the LinkedIn page URL, i.e. `https://www.linkedin.com/company/28866695`, the `id` is `28866695`.
27
27
  | `ORBIT_API_KEY` | API key for Orbit | Found in `Account Settings` in your Orbit workspace
28
28
  | `ORBIT_WORKSPACE_ID` | ID for your Orbit workspace | Last part of the Orbit workspace URL, i.e. `https://app.orbit.love/my-workspace`, the ID is `my-workspace`
29
29
 
@@ -56,8 +56,20 @@ client = LinkedinOrbit::Client.new(
56
56
  client = LinkedinOrbit::Client.new
57
57
  ```
58
58
 
59
+ ### Performing a Historical Import
60
+
61
+ You may want to perform a one-time historical import to fetch all your previous LinkedIn interactions and bring them into your Orbit workspace. To do so, instantiate your `client` with the `historical_import` flag:
62
+
63
+ ```ruby
64
+ client = LinkedinOrbit::Client.new(
65
+ historical_import: true
66
+ )
67
+ ```
68
+
59
69
  ### Fetching LinkedIn Comments
60
70
 
71
+ **The API token owner must be an admin on the LinkedIn organization's page in order to fetch comments. Please ask the manager of your LinkedIn page to grant admin status to your account before attempting to fetch comments.**
72
+
61
73
  Once, you have an instantiated client, you can fetch LinkedIn comments on your organization's posts and send them to Orbit by invoking the `#comments` instance method:
62
74
 
63
75
  ```ruby
@@ -70,6 +82,8 @@ You can also use this package with the included CLI. To use the CLI pass in the
70
82
  ```bash
71
83
  $ ORBIT_API_KEY=... ORBIT_WORKSPACE_ID=... LINKEDIN_TOKEN=... LINKEDIN_ORGANIZATION=... bundle exec linkedin_orbit --check_comments
72
84
  ```
85
+
86
+ **Add the `--historical-import` flag to your CLI command to perform a historical import of all your LinkedIn interactions using the CLI.**
73
87
  ## GitHub Actions Automation Setup
74
88
 
75
89
  ⚡ You can set up this integration in a matter of minutes using our GitHub Actions template. It will run regularly to add new activities to your Orbit workspace. All you need is a GitHub account.
data/bin/linkedin_orbit CHANGED
@@ -2,6 +2,7 @@
2
2
  require 'optparse'
3
3
 
4
4
  check_comments = false
5
+ historical_import = false
5
6
 
6
7
  options = {}
7
8
  choices = OptionParser.new do |opts|
@@ -13,6 +14,9 @@ choices = OptionParser.new do |opts|
13
14
  opts.on("--check-comments", "Check for new LinkedIn comments") do
14
15
  check_comments = true
15
16
  end
17
+ opts.on("--historical-import", "Performa historical import of all LinkedIn interactions") do
18
+ historical_import = true
19
+ end
16
20
  end.parse!
17
21
 
18
22
  $LOAD_PATH.unshift(File.expand_path('../lib/dev_orbit', __dir__))
@@ -23,5 +27,6 @@ require_relative '../scripts/check_comments'
23
27
  if check_comments
24
28
  puts "Checking for new LinkedIn comments and posting them to your Orbit workspace..."
25
29
  ARGV[0] = 'render'
30
+ ARGV[1] = historical_import
26
31
  LinkedinOrbit::Scripts::CheckComments.start(ARGV)
27
32
  end
@@ -1,8 +1,17 @@
1
1
  # Instructions for First Time Set Up
2
2
 
3
- These instructions will walk you through authenticating to LinkedIn, and receiving your LinkedIn token, which is needed to use this integration. You will only need to do this once every two months.
3
+ |These instructions will walk you through authenticating to LinkedIn, and receiving your LinkedIn token, which is needed to use this integration. You will only need to do this once every two months.|
4
+ |-----------------------------------------|
4
5
 
5
- ## Creating a LinkedIn Developers App
6
+ ![Setup Flow for LinkedIn](../readme_images/linkedin-flow.png)
7
+
8
+ ## 1. Before You Start
9
+
10
+ LinkedIn requires that the personal account (your LinkedIn account) requesting API access for an organization or company on LinkedIn be an admin of the organization or company's LinkedIn page.
11
+
12
+ Please verify that you have administrative privileges for the organization LinkedIn page. If you do not, your organization's administrator can grant your account the correct access level.
13
+ ## 2. LinkedIn Setup
14
+ ### Creating a LinkedIn Developers App
6
15
 
7
16
  The first thing you must do is create a LinkedIn Developers app.
8
17
 
@@ -21,7 +30,7 @@ Once you submit the form, it usually takes 3-4 days for LinkedIn to confirm the
21
30
 
22
31
  While you wait for verification, you can do the next step, which is to request the right API scope from LinkedIn.
23
32
 
24
- ## Requesting the LinkedIn Marketing Developer Platform API Access
33
+ ### Requesting the LinkedIn Marketing Developer Platform API Access
25
34
 
26
35
  LinkedIn has many different types of APIs and many different types of access levels to those APIs. The API your app needs access to is the **Marketing Developer Platform**.
27
36
 
@@ -33,7 +42,17 @@ This will take another few days for LinkedIn to verify and confirm this request.
33
42
 
34
43
  ![LinkedIn Developer Products List](../readme_images/products_list.png)
35
44
 
36
- ## LinkedIn API Credentials
45
+ ## 3. Wait for LinkedIn
46
+
47
+ At this point, you need to wait for LinkedIn to approve both your new developer application, and access to the Marketing Developer Platform API. This generally takes several days. LinkedIn will both email you with an update, and post an update inside the [LinkedIn Developers](https://www.linkedin.com/developers) page.
48
+
49
+ If your request is denied access, you can submit an appeal to LinkedIn. The appeal process can take several days again. Pay close attention to the specified reason LinkedIn provided for the initial rejection, and work to remedy it before submitting an appeal.
50
+
51
+ The Orbit Developer Relations team unfortunately cannot assist or address LinkedIn API approval processes.
52
+
53
+ ## 4. Integration Setup
54
+
55
+ ### LinkedIn API Credentials
37
56
 
38
57
  You will need your LinkedIn API credentials to move forward. You can copy your LinkedIn credentials, which are your Client ID and Client Secret from the "Auth" section in the LinkedIn Developers dashboard.
39
58
 
@@ -45,7 +64,9 @@ You will also see on the "Auth" page a section called "OAuth 2.0 Settings". We w
45
64
 
46
65
  After you have finished all of the above steps, you are ready to move on to the last step in this first time setup instructions.
47
66
 
48
- ## LinkedIn Token
67
+ ### LinkedIn Token
68
+
69
+ **Do not proceed to this step until you have received approval from LinkedIn for your API access request. This next step will not work until that has happened.**
49
70
 
50
71
  LinkedIn uses OAuth 2.0 as its authentication format, and as such, you need to authenticate *one time every two months* to obtain a token that will be used for the integration from then on.
51
72
 
@@ -73,14 +94,14 @@ Now, return back to your browser window with your Heroku app running. Click on t
73
94
 
74
95
  The last step you need to complete in this first time setup is to add the LinkedIn token you created into the LinkedIn Orbit community integration credentials, either in the context of a standalone app or in the context of running it as a GitHub Action.
75
96
 
76
- ## Add the LinkedIn Token to the LinkedIn Orbit Community Integration
77
- ### Within GitHub Actions
97
+ ### Add the LinkedIn Token to the LinkedIn Orbit Community Integration
98
+ #### Within GitHub Actions
78
99
 
79
100
  *(This step assumes you have a GitHub repository created already to run the LinkedIn Orbit community integration. If you do not, please follow [this guide](https://docs.github.com/en/github/getting-started-with-github/create-a-repo) first.)*
80
101
 
81
102
  The LinkedIn token you created in the last step needs to be added to the GitHub repository that you are running the LinkedIn Orbit community integration from. To do so, follow the step-by-step guide in the [README](https://github.com/orbit-love/github-actions-templates/blob/main/README.md#adding-your-credentials-to-github) in the GitHub Actions instructions. The name for this secret **must** be: `LINKEDIN_TOKEN`.
82
103
 
83
- ### Within a Standalone App
104
+ #### Within a Standalone App
84
105
 
85
106
  If you are running the community integration as a standalone app, you can add the LinkedIn token as an environment variable inside the `.env` file in the root directory of the codebase.
86
107
 
@@ -89,6 +110,6 @@ Open up the `.env` file and add a new line starting with `LINKEDIN_TOKEN=` and a
89
110
 
90
111
  You have now successfully finished the setup for your LinkedIn Orbit community integration. This steps needs to occur once every 60 days.
91
112
 
92
- In between, you can safely delete the Heroku app you created and recreate a new one when you need to do this again.
113
+ In between, you should delete the Heroku app you created and recreate a new one when you need to do this again as keeping it alive potentially exposes your LinkedIn token to those who may come across it.
93
114
 
94
115
  From within the Heroku dashboard, navigate to the "Settings" for the app and at the very bottom of the page is a button called "Delete app". Once you click on that button, Heroku will confirm you wish to delete the app. Upon confirmation, the app will be deleted and the deployment on the web will be removed.
@@ -29,13 +29,18 @@ require "json"
29
29
  # The LinkedIn organization would use the last component of that web address and would be:
30
30
  # urn:li:organization:28866695
31
31
  #
32
+ # @option params [Boolean] :historical_import
33
+ # Whether to do an import of all LinkedIn interactions ignoring latest
34
+ # activity already in the Orbit workspace.
35
+ # Default is false.
36
+ #
32
37
  # @param [Hash] params
33
38
  #
34
39
  # @return [DevOrbit::Client]
35
40
  #
36
41
  module LinkedinOrbit
37
42
  class Client
38
- attr_accessor :orbit_api_key, :orbit_workspace, :linkedin_organization
43
+ attr_accessor :orbit_api_key, :orbit_workspace, :linkedin_organization, :historical_import
39
44
  attr_reader :linkedin_token
40
45
 
41
46
  def initialize(params = {})
@@ -43,6 +48,7 @@ module LinkedinOrbit
43
48
  @orbit_workspace = params.fetch(:orbit_workspace, ENV["ORBIT_WORKSPACE_ID"])
44
49
  @linkedin_token = token
45
50
  @linkedin_organization = params.fetch(:linkedin_organization, ENV["LINKEDIN_ORGANIZATION"])
51
+ @historical_import = params.fetch(:historical_import, false)
46
52
  end
47
53
 
48
54
  def token
@@ -54,7 +60,8 @@ module LinkedinOrbit
54
60
  linkedin_token: @linkedin_token,
55
61
  linkedin_organization: @linkedin_organization,
56
62
  orbit_api_key: @orbit_api_key,
57
- orbit_workspace: @orbit_workspace
63
+ orbit_workspace: @orbit_workspace,
64
+ historical_import: @historical_import
58
65
  ).process_comments
59
66
  end
60
67
  end
@@ -34,6 +34,7 @@ module LinkedinOrbit
34
34
  occurred_at: Time.at(@comment["created"]["time"] / 1000).utc,
35
35
  key: @comment["id"],
36
36
  link: "https://www.linkedin.com/feed/update/#{@comment["object"]}",
37
+ link_text: "View on LinkedIn",
37
38
  member: {
38
39
  name: name
39
40
  }
@@ -1,5 +1,4 @@
1
1
  # frozen_string_literal: true
2
-
3
2
  module LinkedinOrbit
4
3
  class Linkedin
5
4
  def initialize(params = {})
@@ -7,6 +6,7 @@ module LinkedinOrbit
7
6
  @linkedin_token = params.fetch(:linkedin_token)
8
7
  @orbit_api_key = params.fetch(:orbit_api_key)
9
8
  @orbit_workspace = params.fetch(:orbit_workspace)
9
+ @historical_import = params.fetch(:historical_import, false)
10
10
  end
11
11
 
12
12
  def process_comments
@@ -14,14 +14,41 @@ module LinkedinOrbit
14
14
 
15
15
  return posts unless posts.is_a?(Array)
16
16
 
17
+ orbit_timestamp = last_orbit_activity_timestamp
18
+
19
+ times = 0
17
20
  posts.each do |post|
21
+
18
22
  comments = get_post_comments(post["id"])
19
23
 
20
- comments.reject! { |comment| comment["actor~"]["id"] == "private" }
21
-
22
24
  next if comments.nil? || comments.empty?
23
25
 
26
+ # Indicates that the member does not want their information shared
27
+ # Member viewing access if forbidden for profile memberId
28
+ comments.reject! do |comment|
29
+ if comment.has_key? "actor!"
30
+ true if comment["actor!"]["status"] == 403
31
+ end
32
+ end
33
+
34
+ # Indicates that the member does not want their information shared
35
+ comments.reject! do |comment|
36
+ if comment.has_key? "actor~"
37
+ true if comment["actor~"]["id"] == "private"
38
+ end
39
+ end
40
+
24
41
  comments.each do |comment|
42
+ unless @historical_import && orbit_timestamp
43
+ next if Time.at(comment["created"]["time"] / 1000).utc.to_s < orbit_timestamp unless orbit_timestamp.nil?
44
+ end
45
+
46
+ if orbit_timestamp && @historical_import == false
47
+ next if Time.at(comment["created"]["time"] / 1000).utc.to_s < orbit_timestamp
48
+ end
49
+
50
+ times += 1
51
+
25
52
  LinkedinOrbit::Orbit.call(
26
53
  type: "comments",
27
54
  data: {
@@ -33,37 +60,53 @@ module LinkedinOrbit
33
60
  )
34
61
  end
35
62
  end
63
+
64
+ output = "Sent #{times} new comments to your Orbit workspace"
65
+
66
+ puts output
67
+ return output
36
68
  end
37
69
 
38
70
  def get_posts
39
71
  posts = []
40
- url = URI("https://api.linkedin.com/v2/shares?q=owners&owners=#{@linkedin_organization}")
41
- https = Net::HTTP.new(url.host, url.port)
42
- https.use_ssl = true
72
+ page = 0
73
+ count = 100
74
+ total = 0
43
75
 
44
- request = Net::HTTP::Get.new(url)
45
- request["Accept"] = "application/json"
46
- request["Content-Type"] = "application/json"
47
- request["Authorization"] = "Bearer #{@linkedin_token}"
76
+ while page * count <= total
77
+ url = URI("https://api.linkedin.com/v2/ugcPosts?q=authors&authors=List(#{CGI.escape(@linkedin_organization)})&sortBy=LAST_MODIFIED&start=#{page*count}&count=#{count}")
78
+ https = Net::HTTP.new(url.host, url.port)
79
+ https.use_ssl = true
48
80
 
49
- response = https.request(request)
81
+ request = Net::HTTP::Get.new(url)
82
+ request["Accept"] = "application/json"
83
+ request["X-Restli-Protocol-Version"] = "2.0.0"
84
+ request["Content-Type"] = "application/json"
85
+ request["Authorization"] = "Bearer #{@linkedin_token}"
50
86
 
51
- response = JSON.parse(response.body)
87
+ response = https.request(request)
52
88
 
53
- return response["message"] if response["serviceErrorCode"]
89
+ response = JSON.parse(response.body)
54
90
 
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
91
+ total = response["paging"]["total"] if page == 0
92
+
93
+ return response["message"] if response["serviceErrorCode"]
61
94
 
62
- response["elements"].each do |element|
63
- posts << {
64
- "id" => element["activity"],
65
- "message_highlight" => element["text"]["text"][0, 40]
66
- }
95
+ if response["elements"].nil? || response["elements"].empty?
96
+ return <<~HEREDOC
97
+ No new posts to process from your LinkedIn organization.
98
+ If you suspect this is incorrect, verify your LinkedIn organization schema is correct in your credentials.
99
+ HEREDOC
100
+ end
101
+
102
+ response["elements"].each do |element|
103
+ next if element["id"].nil?
104
+ posts << {
105
+ "id" => element["id"],
106
+ "message_highlight" => element["specificContent"]["com.linkedin.ugc.ShareContent"]["shareCommentary"]["text"][0, 40]
107
+ }
108
+ end
109
+ page += 1
67
110
  end
68
111
 
69
112
  posts
@@ -85,5 +128,17 @@ module LinkedinOrbit
85
128
 
86
129
  response["elements"]
87
130
  end
131
+
132
+ def last_orbit_activity_timestamp
133
+ @last_orbit_activity_timestamp ||= begin
134
+ OrbitActivities::Request.new(
135
+ api_key: @orbit_api_key,
136
+ workspace_id: @orbit_workspace,
137
+ user_agent: "community-ruby-linkedin-orbit/#{LinkedinOrbit::VERSION}",
138
+ action: "latest_activity_timestamp",
139
+ filters: { activity_type: "custom:linkedin:comment" }
140
+ ).response
141
+ end
142
+ end
88
143
  end
89
144
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LinkedinOrbit
4
- VERSION = "0.1.4"
4
+ VERSION = "0.5.1"
5
5
  end
@@ -5,7 +5,7 @@ require_relative "lib/linkedin_orbit/version"
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "linkedin_orbit"
7
7
  spec.version = LinkedinOrbit::VERSION
8
- spec.authors = ["Orbit DevRel", "Ben Greenberg"]
8
+ spec.authors = ["Orbit DevRel", "Ben Greenberg", "Colin Loretz"]
9
9
  spec.email = ["devrel@orbit.love"]
10
10
 
11
11
  spec.summary = "Integrate LinkedIn interactions into Orbit"
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
  spec.add_dependency "thor", "~> 1.1"
33
33
  spec.add_dependency "linkedin", "~> 1.1"
34
34
  spec.add_dependency "dotenv", "~> 2.7"
35
- spec.add_dependency "orbit_activities", "~> 0.1"
35
+ spec.add_dependency "orbit_activities", "~> 0.2"
36
36
  spec.add_development_dependency "rspec", "~> 3.4"
37
37
  spec.add_development_dependency "webmock", "~> 3.12"
38
38
  end
Binary file
@@ -8,8 +8,8 @@ module LinkedinOrbit
8
8
  module Scripts
9
9
  class CheckComments < Thor
10
10
  desc "render", "check for new LinkedIn post comments and push them to Orbit"
11
- def render
12
- client = LinkedinOrbit::Client.new
11
+ def render(*params)
12
+ client = LinkedinOrbit::Client.new(historical_import: params[0])
13
13
  client.comments
14
14
  end
15
15
  end
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linkedin_orbit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orbit DevRel
8
8
  - Ben Greenberg
9
- autorequire:
9
+ - Colin Loretz
10
+ autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2021-06-10 00:00:00.000000000 Z
13
+ date: 2021-12-21 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: http
@@ -101,14 +102,14 @@ dependencies:
101
102
  requirements:
102
103
  - - "~>"
103
104
  - !ruby/object:Gem::Version
104
- version: '0.1'
105
+ version: '0.2'
105
106
  type: :runtime
106
107
  prerelease: false
107
108
  version_requirements: !ruby/object:Gem::Requirement
108
109
  requirements:
109
110
  - - "~>"
110
111
  - !ruby/object:Gem::Version
111
- version: '0.1'
112
+ version: '0.2'
112
113
  - !ruby/object:Gem::Dependency
113
114
  name: rspec
114
115
  requirement: !ruby/object:Gem::Requirement
@@ -168,6 +169,7 @@ files:
168
169
  - readme_images/client_credentials.png
169
170
  - readme_images/create_app_button.png
170
171
  - readme_images/heroku_view_app_button.png
172
+ - readme_images/linkedin-flow.png
171
173
  - readme_images/linkedin_oauth_redirects.png
172
174
  - readme_images/logo.png
173
175
  - readme_images/marketing_platform_request_access.png
@@ -182,7 +184,7 @@ metadata:
182
184
  homepage_uri: https://github.com/orbit-love/community-ruby-linkedin-orbit
183
185
  source_code_uri: https://github.com/orbit-love/community-ruby-linkedin-orbit
184
186
  changelog_uri: https://github.com/orbit-love/community-ruby-linkedin-orbit/blob/main/CHANGELOG.md
185
- post_install_message:
187
+ post_install_message:
186
188
  rdoc_options: []
187
189
  require_paths:
188
190
  - lib
@@ -197,8 +199,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
199
  - !ruby/object:Gem::Version
198
200
  version: '0'
199
201
  requirements: []
200
- rubygems_version: 3.2.15
201
- signing_key:
202
+ rubygems_version: 3.1.4
203
+ signing_key:
202
204
  specification_version: 4
203
205
  summary: Integrate LinkedIn interactions into Orbit
204
206
  test_files: []