nylas 4.0.0.rc3 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/nylas.rb +2 -0
- data/lib/nylas/contact.rb +13 -2
- data/lib/nylas/contact_group.rb +12 -0
- data/lib/nylas/current_account.rb +1 -0
- data/lib/nylas/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bdbb6c150d3f86323edbef1c476fc87932507baa
|
4
|
+
data.tar.gz: 7d27d792c1967e0662148f2ed7073f49eb8a35a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73bfcdb6f6928a95d9183110e756547abc046e4e39ebe1b4a3ef7d63a2b91950f494b469c04ba7ca785d1abaa43d282a415da44c3e7f2efaacf4695915b9e4ba
|
7
|
+
data.tar.gz: 0e29d71b4c0a61f81fa4f5cd3da8712fdc37f396ee50e52a08e983c7865e784f69ef5f223ecc053719e3b8d5e47ba9f2d69367ef7b71843b5e68ef60bbe0936b
|
data/lib/nylas.rb
CHANGED
@@ -42,6 +42,7 @@ require_relative "nylas/deltas_collection"
|
|
42
42
|
require_relative "nylas/account"
|
43
43
|
require_relative "nylas/calendar"
|
44
44
|
require_relative "nylas/contact"
|
45
|
+
require_relative "nylas/contact_group"
|
45
46
|
require_relative "nylas/current_account"
|
46
47
|
require_relative "nylas/deltas"
|
47
48
|
require_relative "nylas/delta"
|
@@ -82,4 +83,5 @@ module Nylas
|
|
82
83
|
Types.registry[:timespan] = Types::ModelType.new(model: Timespan)
|
83
84
|
Types.registry[:web_page] = Types::ModelType.new(model: WebPage)
|
84
85
|
Types.registry[:nylas_date] = NylasDateType.new
|
86
|
+
Types.registry[:contact_group] = Types::ModelType.new(model: ContactGroup)
|
85
87
|
end
|
data/lib/nylas/contact.rb
CHANGED
@@ -19,7 +19,7 @@ module Nylas
|
|
19
19
|
attribute :middle_name, :string
|
20
20
|
attribute :picture_url, :string
|
21
21
|
attribute :surname, :string
|
22
|
-
attribute :birthday, :
|
22
|
+
attribute :birthday, :string
|
23
23
|
attribute :suffix, :string
|
24
24
|
attribute :nickname, :string
|
25
25
|
attribute :company_name, :string
|
@@ -29,10 +29,21 @@ module Nylas
|
|
29
29
|
attribute :notes, :string
|
30
30
|
attribute :web_page, :web_page
|
31
31
|
|
32
|
-
has_n_of_attribute :
|
32
|
+
has_n_of_attribute :groups, :contact_group
|
33
|
+
has_n_of_attribute :emails, :email_address
|
33
34
|
has_n_of_attribute :im_addresses, :im_address
|
34
35
|
has_n_of_attribute :physical_addresses, :physical_address
|
35
36
|
has_n_of_attribute :phone_numbers, :phone_number
|
36
37
|
has_n_of_attribute :web_pages, :web_page
|
38
|
+
|
39
|
+
# @returns [Tempfile] path to the retrieved picture. It is preferrable to cache this in your system than
|
40
|
+
# to retrieve it from nylas every time.
|
41
|
+
def picture
|
42
|
+
return @picture_tempfile if @picture_tempfile
|
43
|
+
@picture_tempfile = Tempfile.new
|
44
|
+
@picture_tempfile.write(api.get(path: "#{resource_path}/picture"))
|
45
|
+
@picture_tempfile.close
|
46
|
+
@picture_tempfile
|
47
|
+
end
|
37
48
|
end
|
38
49
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Nylas
|
2
|
+
# Structure to represent the Contact Group schema
|
3
|
+
# @see https://docs.nylas.com/reference#contactsid
|
4
|
+
class ContactGroup
|
5
|
+
include Model::Attributable
|
6
|
+
attribute :id, :string
|
7
|
+
attribute :object, :string
|
8
|
+
attribute :account_id, :string
|
9
|
+
attribute :name, :string
|
10
|
+
attribute :path, :string
|
11
|
+
end
|
12
|
+
end
|
data/lib/nylas/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nylas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nylas, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -253,6 +253,7 @@ files:
|
|
253
253
|
- lib/nylas/collection.rb
|
254
254
|
- lib/nylas/constraints.rb
|
255
255
|
- lib/nylas/contact.rb
|
256
|
+
- lib/nylas/contact_group.rb
|
256
257
|
- lib/nylas/current_account.rb
|
257
258
|
- lib/nylas/delta.rb
|
258
259
|
- lib/nylas/deltas.rb
|
@@ -314,12 +315,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
314
315
|
version: '2.2'
|
315
316
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
316
317
|
requirements:
|
317
|
-
- - "
|
318
|
+
- - ">="
|
318
319
|
- !ruby/object:Gem::Version
|
319
|
-
version:
|
320
|
+
version: '0'
|
320
321
|
requirements: []
|
321
322
|
rubyforge_project:
|
322
|
-
rubygems_version: 2.
|
323
|
+
rubygems_version: 2.5.2
|
323
324
|
signing_key:
|
324
325
|
specification_version: 4
|
325
326
|
summary: Gem for interacting with the Nylas API
|