linkedin2 0.0.6 → 0.0.7

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
  SHA1:
3
- metadata.gz: e81d1df72a3862c66ddcdbe4aeb921af88ca33cc
4
- data.tar.gz: 410375f89b5f5891fe969abd489f7cd5a2b71b51
3
+ metadata.gz: 0bfc000809e1a422a5b0d46b8c89d7ead2f19c58
4
+ data.tar.gz: 4fcd7b7eb82f0dfd1019e7acb44dd67b956974f2
5
5
  SHA512:
6
- metadata.gz: 6900a7eb801c6cdd5488893c22526179a72a67e82347b5aa96e191b2bb0c9c01cde4cb6900e2744b26c0cd064df4e82e89df35731f651dae241462f946a0afe6
7
- data.tar.gz: 9e111665cd4a373e3270dcb3961bdeee9aefcb1b73e8a3e4d6e953455c0b59282768fdad6c57c02c08da73d95b02ebda90e427c6a37193b5f0ba4648c38135e1
6
+ metadata.gz: c5ac474c20fbe86185dddbe79799d7e9c2d868c47c6a7f93617a2b02b5b0a8c94a1a5b7414309324cbe7f0ecf125e61900808280d4d80ab0c79dfb648b498b07
7
+ data.tar.gz: 7123f64b7fe24d02e4ad18971f165e5713496d18dfa33d196ce438397a0084ab1dda7fd523be1b80882bdc023f427ee8833ce11238832446d18c9ba3ba7fb12e
@@ -42,6 +42,20 @@ module LinkedIn
42
42
  req.body = connection_request.to_json
43
43
  end
44
44
  end
45
+
46
+ def message(subject, message, recipients)
47
+ recipients = [recipients].flatten
48
+
49
+ recipients = recipients.map { |recipient| { person: { _path: "/people/#{recipient.to_param}" } } }
50
+
51
+ message = { recipients: { values: recipients }, subject: subject, body: message }
52
+
53
+ post 'v1/people/~/mailbox' do |req|
54
+ req.headers['Content-Type'] = 'application/json'
55
+ req.headers['x-li-format'] = 'json'
56
+ req.body = message.to_json
57
+ end
58
+ end
45
59
  end
46
60
  end
47
61
  end
@@ -1,3 +1,3 @@
1
1
  module LinkedIn
2
- VERSION = "0.0.6"
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linkedin2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Breznak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-31 00:00:00.000000000 Z
11
+ date: 2014-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2