frontapp 0.0.1 → 0.0.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
  SHA1:
3
- metadata.gz: f3e435b63630c56d64d442d07157db616154e354
4
- data.tar.gz: 42a573b784d7888ab23cb8262315403b7215d1b8
3
+ metadata.gz: b72d9d6b2c1eea163c33b6cad6cb6046a4c215cd
4
+ data.tar.gz: 31fd474a8418872037e25537c2c17436a8c246ff
5
5
  SHA512:
6
- metadata.gz: 5050cb6fb326a571606ab64594e4863b93112392cffb0d20c0843d7ec105756dc058ca865a93d4ce4abc995996bd75c6614022f4f3ae5663b94831675ef0da9b
7
- data.tar.gz: d76fe968f65a4d7ea0e72771d3cf72c3f94adc4327e685369358f60e23b2617df8cbdcfca80fa86147dea30a2ce6f9decf1ff49ed97113921681127d0b887ead
6
+ metadata.gz: 97994bfcef0d6a0a0c4142af819392952584fccf7da4df202b9cfe421b16ede0b3e34c11976ad7cf614dbca7fe079075237cdfefcc09908824ab7c9ab1085236
7
+ data.tar.gz: f0ba0543e4c01ab56805b68d4f3fead3517e2b9bd0fc0953e59361981f48e1bbe6d0638b0e32cd153f7cecbf59ac18e66fe0cfb6b8f7898c2c410ee68cad5e75
@@ -12,6 +12,7 @@ require_relative 'client/messages.rb'
12
12
  require_relative 'client/rules.rb'
13
13
  require_relative 'client/tags.rb'
14
14
  require_relative 'client/teammates.rb'
15
+ require_relative 'client/teams.rb'
15
16
 
16
17
  module Frontapp
17
18
  class Client
@@ -27,6 +28,7 @@ module Frontapp
27
28
  include Frontapp::Client::Rules
28
29
  include Frontapp::Client::Tags
29
30
  include Frontapp::Client::Teammates
31
+ include Frontapp::Client::Teams
30
32
 
31
33
  def initialize(options={})
32
34
  auth_token = options[:auth_token]
@@ -15,7 +15,7 @@ module Frontapp
15
15
  # body string Content of the comment
16
16
  # ------------------------------
17
17
  def create_comment!(conversation_id, params = {})
18
- cleaned = params.permit(:author_id,:body)
18
+ cleaned = params.permit(:author_id, :body)
19
19
  create("conversations/#{conversation_id}/comments", cleaned)
20
20
  end
21
21
 
@@ -112,13 +112,14 @@ module Frontapp
112
112
  # -------------------------------
113
113
  #
114
114
  # Allowed attributes:
115
- # Name Type Description
116
- # ---------------------------
117
- # handle string Handle used to reach the contact. Can be an email address, a twitter, handle, a phone number, …
118
- # source enum Can be 'twitter’, 'email’ or 'phone’.
119
- # ---------------------------
115
+ # Name Type Description
116
+ # ---------------------------------------
117
+ # handle string Handle used to reach the contact. Can be an email address, a twitter, handle, a phone number, …
118
+ # source enum Can be 'twitter’, 'email’ or 'phone’.
119
+ # force boolean (optional) Force the deletetion of the contact if the handle is the last one
120
+ # ---------------------------------------
120
121
  def delete_contact_handle!(contact_id, params = {})
121
- cleaned = params.permit(:handle, :source)
122
+ cleaned = params.permit(:handle, :source, :force)
122
123
  delete("contacts/#{contact_id}/handles", cleaned)
123
124
  end
124
125
 
@@ -25,12 +25,13 @@ module Frontapp
25
25
  # Name Type Description
26
26
  # ---------------------------------------------
27
27
  # assignee_id string (optional) ID of the teammate to assign the conversation to. Set it to null to unassign.
28
+ # inbox_id string (optional) ID of the inbox to move the conversation to.
28
29
  # status enum (optional) New status of the conversation
29
30
  # tags array (optional) List of all the tag names replacing the old conversation tags
30
31
  # ---------------------------------------------
31
32
  # The assignee id is their Frontapp handle, e.g. @username
32
33
  def update_conversation!(conversation_id, params = {})
33
- cleaned = params.permit(:assignee_id, :status, :tags)
34
+ cleaned = params.permit(:assignee_id, :inbox_id, :status, :tags)
34
35
  update("conversations/#{conversation_id}", cleaned)
35
36
  end
36
37
 
@@ -21,6 +21,7 @@ module Frontapp
21
21
  # Name Type Description
22
22
  # ------------------------------------------------
23
23
  # author_id string (optional) Id of the teammate on behalf of whom the answer is sent
24
+ # sender_name string (optional) Name used for the sender info of the message
24
25
  # subject string (optional) Subject of the message for email message
25
26
  # body string Body of the message
26
27
  # text string (optional) Text version of the body for messages with non-text body
@@ -33,6 +34,7 @@ module Frontapp
33
34
  # ------------------------------------------------
34
35
  def send_message(channel_id, params)
35
36
  cleaned = params.permit(:author_id,
37
+ :sender_name,
36
38
  :subject,
37
39
  :body,
38
40
  :text,
@@ -53,6 +55,7 @@ module Frontapp
53
55
  # Name Type Description
54
56
  # ------------------------------------------------
55
57
  # author_id string (optional) ID of the teammate on behalf of whom the answer is sent
58
+ # sender_name string (optional) Name used for the sender info of the message
56
59
  # subject string (optional) Subject of the message for email message
57
60
  # body string Body of the message
58
61
  # text string (optional) Text version of the body for messages with non-text body
@@ -66,6 +69,7 @@ module Frontapp
66
69
  # ------------------------------------------------
67
70
  def send_reply(conversation_id, params)
68
71
  cleaned = params.permit(:author_id,
72
+ :sender_name,
69
73
  :subject,
70
74
  :body,
71
75
  :text,
@@ -0,0 +1,19 @@
1
+ module Frontapp
2
+ class Client
3
+ module Teams
4
+
5
+ def teams(params = {})
6
+ list("teams", params)
7
+ end
8
+
9
+ # Parameters
10
+ # Name Type Description
11
+ # --------------------------------
12
+ # team_id string Id of the requested team
13
+ # --------------------------------
14
+ def get_team(team_id)
15
+ get("teams/#{team_id}")
16
+ end
17
+ end
18
+ end
19
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frontapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Niels van der Zanden
@@ -85,6 +85,7 @@ files:
85
85
  - lib/frontapp/client/rules.rb
86
86
  - lib/frontapp/client/tags.rb
87
87
  - lib/frontapp/client/teammates.rb
88
+ - lib/frontapp/client/teams.rb
88
89
  - lib/frontapp/utils/hash.rb
89
90
  homepage: https://github.com/phusion/frontapp
90
91
  licenses:
@@ -106,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
107
  version: '0'
107
108
  requirements: []
108
109
  rubyforge_project:
109
- rubygems_version: 2.6.11
110
+ rubygems_version: 2.5.2.1
110
111
  signing_key:
111
112
  specification_version: 4
112
113
  summary: Ruby client for Frontapp API