aircall 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/doc/calls.md +7 -2
- data/doc/contacts.md +5 -2
- data/lib/aircall/calls.rb +3 -3
- data/lib/aircall/connection.rb +3 -1
- data/lib/aircall/contacts.rb +2 -2
- data/lib/aircall/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4a17bdee214787d7f2186d2a09c809208e2cada
|
4
|
+
data.tar.gz: 59c0a6fa96547a35958f3a1997630ac3fec9a7fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 677005bb8fc19899cf9b956a6b79b771ab516300bc5962c4fa808fe8e9cb18722daa3d81db46a884eb5b122d0a9c5c2249c101bc997b5db88d23aff467e31668
|
7
|
+
data.tar.gz: e735367307b0d6b5a62e821180ce7e9c1d73ccab3a3701c95aa129452ea594473011c7af0e078dea45e6fed5374caa459075eb1df0e2bac55a273ae6f428cbdf
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/doc/calls.md
CHANGED
@@ -14,6 +14,8 @@
|
|
14
14
|
| per_page | 5 |
|
15
15
|
| order | asc |
|
16
16
|
| order_by | created_at |
|
17
|
+
| from | |
|
18
|
+
| to | |
|
17
19
|
|
18
20
|
|
19
21
|
### By id
|
@@ -43,7 +45,8 @@
|
|
43
45
|
| per_page | 5 |
|
44
46
|
| order | asc |
|
45
47
|
| order_by | created_at |
|
46
|
-
|
48
|
+
| from | |
|
49
|
+
| to | |
|
47
50
|
|
48
51
|
### By phone number
|
49
52
|
|
@@ -58,4 +61,6 @@
|
|
58
61
|
| page | 1 |
|
59
62
|
| per_page | 5 |
|
60
63
|
| order | asc |
|
61
|
-
| order_by | created_at |
|
64
|
+
| order_by | created_at |
|
65
|
+
| from | |
|
66
|
+
| to | |
|
data/doc/contacts.md
CHANGED
@@ -27,7 +27,8 @@
|
|
27
27
|
| per_page | 5 |
|
28
28
|
| order | asc |
|
29
29
|
| order_by | created_at |
|
30
|
-
|
30
|
+
| from | |
|
31
|
+
| to | |
|
31
32
|
|
32
33
|
### By phone number
|
33
34
|
|
@@ -42,4 +43,6 @@
|
|
42
43
|
| page | 1 |
|
43
44
|
| per_page | 5 |
|
44
45
|
| order | asc |
|
45
|
-
| order_by | created_at |
|
46
|
+
| order_by | created_at |
|
47
|
+
| from | |
|
48
|
+
| to | |
|
data/lib/aircall/calls.rb
CHANGED
@@ -2,7 +2,7 @@ module Aircall
|
|
2
2
|
class Calls
|
3
3
|
include Connection
|
4
4
|
|
5
|
-
def get_all(page: 1, per_page: 5, order: "asc", order_by: "created_at")
|
5
|
+
def get_all(page: 1, per_page: 5, order: "asc", order_by: "created_at", from: nil, to: nil)
|
6
6
|
get(construct_request_with_arguments("/calls", binding))
|
7
7
|
end
|
8
8
|
|
@@ -10,11 +10,11 @@ module Aircall
|
|
10
10
|
get("/calls/#{call_id}")
|
11
11
|
end
|
12
12
|
|
13
|
-
def get_by_user_id(user_id, page: 1, per_page: 5, order: "asc", order_by: "created_at")
|
13
|
+
def get_by_user_id(user_id, page: 1, per_page: 5, order: "asc", order_by: "created_at", from: nil, to: nil)
|
14
14
|
get(construct_request_with_arguments("/calls/search", binding))
|
15
15
|
end
|
16
16
|
|
17
|
-
def get_by_phone_number(phone_number, page: 1, per_page: 5, order: "asc", order_by: "created_at")
|
17
|
+
def get_by_phone_number(phone_number, page: 1, per_page: 5, order: "asc", order_by: "created_at", from: nil, to: nil)
|
18
18
|
get(construct_request_with_arguments("/calls/search", binding))
|
19
19
|
end
|
20
20
|
|
data/lib/aircall/connection.rb
CHANGED
@@ -45,7 +45,9 @@ module Aircall
|
|
45
45
|
def construct_request_with_arguments(base_request, ext_binding)
|
46
46
|
request = base_request.concat("?")
|
47
47
|
get_method_arguments(ext_binding).each do |arg_name, arg_value|
|
48
|
-
|
48
|
+
if !arg_value.nil?
|
49
|
+
request.concat(arg_name.to_s).concat("=").concat(arg_value.to_s).concat("&")
|
50
|
+
end
|
49
51
|
end
|
50
52
|
|
51
53
|
# Suppression du dernier "&"
|
data/lib/aircall/contacts.rb
CHANGED
@@ -6,11 +6,11 @@ module Aircall
|
|
6
6
|
get("/contacts/#{contact_id}")
|
7
7
|
end
|
8
8
|
|
9
|
-
def get_by_email(email, page: 1, per_page: 5, order: "asc", order_by: "created_at")
|
9
|
+
def get_by_email(email, page: 1, per_page: 5, order: "asc", order_by: "created_at", from: nil, to: nil)
|
10
10
|
get(construct_request_with_arguments("/contacts/search", binding))
|
11
11
|
end
|
12
12
|
|
13
|
-
def get_by_phone_number(phone_number, page: 1, per_page: 5, order: "asc", order_by: "created_at")
|
13
|
+
def get_by_phone_number(phone_number, page: 1, per_page: 5, order: "asc", order_by: "created_at", from: nil, to: nil)
|
14
14
|
get(construct_request_with_arguments("/contacts/search", binding))
|
15
15
|
end
|
16
16
|
|
data/lib/aircall/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aircall
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilek
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-05-
|
12
|
+
date: 2018-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|