frontapp 0.0.2 → 0.0.3

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: b72d9d6b2c1eea163c33b6cad6cb6046a4c215cd
4
- data.tar.gz: 31fd474a8418872037e25537c2c17436a8c246ff
3
+ metadata.gz: eb6e10d72e85df3fdb773b42ac7c4397c58ae8fd
4
+ data.tar.gz: d74a70415b8fdb1999333bb4cbdcc064b2a18e0b
5
5
  SHA512:
6
- metadata.gz: 97994bfcef0d6a0a0c4142af819392952584fccf7da4df202b9cfe421b16ede0b3e34c11976ad7cf614dbca7fe079075237cdfefcc09908824ab7c9ab1085236
7
- data.tar.gz: f0ba0543e4c01ab56805b68d4f3fead3517e2b9bd0fc0953e59361981f48e1bbe6d0638b0e32cd153f7cecbf59ac18e66fe0cfb6b8f7898c2c410ee68cad5e75
6
+ metadata.gz: eac3ae044b701e0b84fc07f4847a5fb297eea7c2b1ead633a1179162bf7ecbde67503d4752281474ed2079fa59c62b222632468702a9cd6093fb5952240812ab
7
+ data.tar.gz: 3a3cd244eb780abce879a8241481ec6965c35c9753e8018f50e83afced3e24cc68b24ad7d6f09946a6b7c96adb413a056121350bf2add667a008d2ef3d94acdc
@@ -0,0 +1,60 @@
1
+ module Frontapp
2
+ class Client
3
+ module Exports
4
+
5
+ def exports(params = {})
6
+ list("exports", params)
7
+ end
8
+
9
+ # Parameters
10
+ # Name Type Description
11
+ # ------------------------------
12
+ # export_id string ID of the requested export
13
+ # ------------------------------
14
+ def get_export(export_id)
15
+ get("exports/#{export_id}")
16
+ end
17
+
18
+ # Allowed attributes:
19
+ # Name Type Description
20
+ # -------------------------
21
+ # inbox_id string (optional) ID of the inbox to export the analytics for. If omitted, the export will contain all the inboxes.
22
+ # tag_id string (optional) ID the tag to export the analytics for. If omitted, the export will contain all the tags.
23
+ # start number Start time of the data to include in the export.
24
+ # end number End time of the data to include in the export.
25
+ # timezone string (optional) Name of the timezone to format the dates. If omitted, the export will use UTC.
26
+ # should_export_events boolean (optional) Whether to export all the events or only messages. Default to false.
27
+ # -------------------------
28
+ def create_export!(params = {})
29
+ cleaned = params.permit(:inbox_id,
30
+ :tag_id,
31
+ :start,
32
+ :end,
33
+ :timezone,
34
+ :should_export_events)
35
+ create("exports", cleaned)
36
+ end
37
+
38
+ # Allowed attributes:
39
+ # Name Type Description
40
+ # -------------------------
41
+ # inbox_id string (optional) ID of the inbox to export the analytics for. If omitted, the export will contain all the inboxes.
42
+ # tag_id string (optional) ID the tag to export the analytics for. If omitted, the export will contain all the tags.
43
+ # start number Start time of the data to include in the export.
44
+ # end number End time of the data to include in the export.
45
+ # timezone string (optional) Name of the timezone to format the dates. If omitted, the export will use UTC.
46
+ # should_export_events boolean (optional) Whether to export all the events or only messages. Default to false.
47
+ # -------------------------
48
+ def create_export_for_team!(team_id, params = {})
49
+ cleaned = params.permit(:inbox_id,
50
+ :tag_id,
51
+ :start,
52
+ :end,
53
+ :timezone,
54
+ :should_export_events)
55
+ create("teams/#{team_id}/exports", cleaned)
56
+ end
57
+
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,23 @@
1
+ module Frontapp
2
+ class Client
3
+ module Topics
4
+
5
+ # Parameters
6
+ # Name Type Description
7
+ # -----------------------------
8
+ # topic_id string Id of the requested topic
9
+ # -----------------------------
10
+ #
11
+ # Allowed params:
12
+ # Name Type Description
13
+ # ------------------------------------------
14
+ # q object (optional) Search query.
15
+ # q.statuses array (optional) List of the statuses of the conversations you want to list
16
+ # ------------------------------------------
17
+ def get_topic_conversations(topic_id, params = {})
18
+ cleaned = params.permit({ q: [:statuses] })
19
+ list("topics/#{topic_id}/conversations", cleaned)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -13,6 +13,8 @@ require_relative 'client/rules.rb'
13
13
  require_relative 'client/tags.rb'
14
14
  require_relative 'client/teammates.rb'
15
15
  require_relative 'client/teams.rb'
16
+ require_relative 'client/topics.rb'
17
+ require_relative 'client/exports.rb'
16
18
 
17
19
  module Frontapp
18
20
  class Client
@@ -29,6 +31,8 @@ module Frontapp
29
31
  include Frontapp::Client::Tags
30
32
  include Frontapp::Client::Teammates
31
33
  include Frontapp::Client::Teams
34
+ include Frontapp::Client::Topics
35
+ include Frontapp::Client::Exports
32
36
 
33
37
  def initialize(options={})
34
38
  auth_token = options[:auth_token]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frontapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Niels van der Zanden
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-07 00:00:00.000000000 Z
11
+ date: 2018-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -80,12 +80,14 @@ files:
80
80
  - lib/frontapp/client/contacts.rb
81
81
  - lib/frontapp/client/conversations.rb
82
82
  - lib/frontapp/client/events.rb
83
+ - lib/frontapp/client/exports.rb
83
84
  - lib/frontapp/client/inboxes.rb
84
85
  - lib/frontapp/client/messages.rb
85
86
  - lib/frontapp/client/rules.rb
86
87
  - lib/frontapp/client/tags.rb
87
88
  - lib/frontapp/client/teammates.rb
88
89
  - lib/frontapp/client/teams.rb
90
+ - lib/frontapp/client/topics.rb
89
91
  - lib/frontapp/utils/hash.rb
90
92
  homepage: https://github.com/phusion/frontapp
91
93
  licenses: