crisp-api 1.1.9 → 1.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59db2e5908afa5ae5c95b38d016832ff57c2e789487a87f32e7ef8c322f993e3
4
- data.tar.gz: cdf9d1ed5d893af3ff760832acfe7c27d4194fd3847956e3fd68477803cc826b
3
+ metadata.gz: b0a0c4760c778003a2678bf91aeffddca2ff537a6a10d95e877dc5fcd7db9a0e
4
+ data.tar.gz: e95dd60c4c6af472c0bfdee29c0d99ae70d7698be4a5ec4fd624cd3b7bfc709d
5
5
  SHA512:
6
- metadata.gz: 3d4a16274e8d5786ffbe46fd0f6ee51094b43cd2f0eb626a303acc51eaaee4f4d3531b75f8f9403d5bf28962289cfe586a13bb68c2937acf49cdbd98e13726c5
7
- data.tar.gz: cfb799018b89104237bbc5b4d04311bc69065563b4d1f72591e32659063b74da3516ba4c2c8a25490b95691a3bda8a78e7ba13919651f8a1edc8aa81559519ff
6
+ metadata.gz: 86ab7ada912dbe4926c5a27bbc644cb9cd93c666c80089aa78eb6966d98c1608623d72144b2dab1aa52c272fcbef2dcaf180477aa4c3b6145a55d1ebfaa25002
7
+ data.tar.gz: 1bb9275844af933a6beea51e75eda47118b2e49b5836f1f4f8586ec94131ff4aa3ab925cf4e0ddf1ae2cc3ab4c7fec7e3c81a612c83bfc42431fe8bfbd478881
data/EXAMPLES.md CHANGED
@@ -221,6 +221,16 @@ client.website.list_conversation_events(website_id, session_id, page_number);
221
221
 
222
222
  =========================
223
223
 
224
+ https://docs.crisp.chat/references/rest-api/v1/#list-conversation-files
225
+
226
+ website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
227
+ session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
228
+ page_number = 1
229
+
230
+ client.website.list_conversation_files(website_id, session_id, page_number);
231
+
232
+ =========================
233
+
224
234
  https://docs.crisp.chat/references/rest-api/v1/#get-conversation-state
225
235
 
226
236
  website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Crisp API Wrapper
2
2
 
3
- [![Build and Release](https://github.com/crisp-im/ruby-crisp-api/workflows/Build%20and%20Release/badge.svg)](https://github.com/crisp-im/ruby-crisp-api/actions?query=workflow%3A%22Build+and+Release%22) [![NPM](https://img.shields.io/gem/v/crisp-api.svg)](https://rubygems.org/gems/crisp-api) [![Downloads](https://img.shields.io/gem/dt/crisp-api.svg)](https://rubygems.org/gems/crisp-api)
3
+ [![Build and Release](https://github.com/crisp-im/ruby-crisp-api/workflows/Build%20and%20Release/badge.svg)](https://github.com/crisp-im/ruby-crisp-api/actions?query=workflow%3A%22Build+and+Release%22) [![RubyGems](https://img.shields.io/gem/v/crisp-api.svg)](https://rubygems.org/gems/crisp-api) [![Downloads](https://img.shields.io/gem/dt/crisp-api.svg)](https://rubygems.org/gems/crisp-api)
4
4
 
5
5
  The Crisp API Ruby wrapper. Authenticate, send messages, fetch conversations, access your agent accounts from your Ruby code.
6
6
 
7
7
  Copyright 2023 Crisp IM SAS. See LICENSE for copying information.
8
8
 
9
- * **📝 Implements**: [REST API Reference (V1)](https://docs.crisp.chat/references/rest-api/v1/) at revision: 12/31/2017
9
+ * **📝 Implements**: [REST API Reference (V1)](https://docs.crisp.chat/references/rest-api/v1/) at revision: 16/01/2023
10
10
  * **😘 Maintainer**: [@valeriansaliou](https://github.com/valeriansaliou), [@eliottvincent](https://github.com/eliottvincent)
11
11
 
12
12
  ## Usage
@@ -16,7 +16,7 @@ You may follow the [REST API Quickstart](https://docs.crisp.chat/guides/rest-api
16
16
  Add the library to your `Gemfile`:
17
17
 
18
18
  ```bash
19
- gem "crisp-api", "~> 1.1.9"
19
+ gem "crisp-api", "~> 1.1.11"
20
20
  ```
21
21
 
22
22
  Then, import it:
@@ -387,6 +387,20 @@ client.website.send_message_in_conversation(
387
387
  ```
388
388
  </details>
389
389
 
390
+ * **List Conversation Files** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#list-conversation-files)
391
+ * `client.website.list_conversation_files(website_id, session_id, page_number)`
392
+ * <details>
393
+ <summary>See Example</summary>
394
+
395
+ ```ruby
396
+ website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
397
+ session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
398
+ page_number = 1
399
+
400
+ client.website.list_conversation_files(website_id, session_id, page_number);
401
+ ```
402
+ </details>
403
+
390
404
  * **Get Conversation State** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-conversation-state)
391
405
  * `client.website.get_conversation_state(website_id, session_id)`
392
406
  * <details>
data/crisp-api.gemspec CHANGED
@@ -2,7 +2,7 @@ require File.expand_path("../lib/crisp-api", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "crisp-api"
5
- s.version = "1.1.9"
5
+ s.version = "1.1.11"
6
6
  s.date = Date.today
7
7
  s.summary = "Crisp API Ruby"
8
8
  s.description = "Crisp API Ruby"
data/lib/crisp-api.rb CHANGED
@@ -91,7 +91,7 @@ module Crisp
91
91
  :payload => (data ? data.to_json : nil),
92
92
 
93
93
  :headers => {
94
- :user_agent => "ruby-crisp-api/1.1.9",
94
+ :user_agent => "ruby-crisp-api/1.1.11",
95
95
  :accept => :json,
96
96
  :content_type => :json,
97
97
  "X-Crisp-Tier" => @tier,
@@ -192,6 +192,10 @@ module Crisp
192
192
  return @parent.get(self._url_conversation(website_id, session_id, "/events/%d" % page_number))
193
193
  end
194
194
 
195
+ def list_conversation_files(website_id, session_id, page_number)
196
+ return @parent.get(self._url_conversation(website_id, session_id, "/files/%d" % page_number))
197
+ end
198
+
195
199
  def get_conversation_state(website_id, session_id)
196
200
  return @parent.get(self._url_conversation(website_id, session_id, "/state"))
197
201
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crisp-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valerian Saliou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-06 00:00:00.000000000 Z
11
+ date: 2023-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client