aircall 0.1.2 → 0.1.3
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +8 -1
- data/aircall.gemspec +1 -1
- data/doc/calls.md +16 -0
- data/lib/aircall/calls.rb +5 -1
- data/lib/aircall/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 746f432e23ae5007a5fe74534b249afa55637300
|
|
4
|
+
data.tar.gz: 22ed6476d7ec75c9fdb9dfde9b8c70b45e504087
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0387761fb3376a6bb47917dd0e44ae1cc6fd88bbba75302e186d3308aea9a7504b960cd6fffc3b8a877c19fc15341f48b1ec9c81aa2252178c6970b8cf74639a
|
|
7
|
+
data.tar.gz: 6b2e5b5d604e6caaecb8953194543292af4a449a87936c33fcfb1ef26f7ebfb46781274298597d0cbce7177ef357738ce1d51b39a2da76b727ee00c1f1f30efd
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Aircall
|
|
2
2
|
|
|
3
|
+
[](https://github.com/HazAT/badge/blob/master/LICENSE)
|
|
4
|
+
[](https://rubygems.org/gems/aircall)
|
|
5
|
+
|
|
3
6
|
A Ruby gem for [Aircall](https://developer.aircall.io/api-references/).
|
|
4
7
|
Only some methods are presents for the moment.
|
|
5
8
|
|
|
@@ -42,10 +45,14 @@ Or like this:
|
|
|
42
45
|
#### [Contacts](./doc/contacts.md)
|
|
43
46
|
#### [Users](./doc/users.md)
|
|
44
47
|
|
|
48
|
+
### Examples
|
|
49
|
+
`aircall.contacts.get_by_email("youremail@gmail.com")`
|
|
50
|
+
|
|
51
|
+
`aircall.contacts.get_by_phone_number("+33612345678", per_page:1, page:3, order: "desc", order_by: "updated_at")`
|
|
45
52
|
|
|
46
53
|
## Tests
|
|
47
54
|
|
|
48
55
|
Create **.env** file from **.env.example**.
|
|
49
56
|
Complete with your variables.
|
|
50
57
|
|
|
51
|
-
Run test with `rake test`.
|
|
58
|
+
Run test with `rake test`.
|
data/aircall.gemspec
CHANGED
|
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
|
8
8
|
spec.version = Aircall::VERSION
|
|
9
9
|
spec.licenses = ['MIT']
|
|
10
10
|
spec.authors = ["Ilek", "Jerome"]
|
|
11
|
-
spec.email = ["jerome@ilek.fr", "jeromearsene@gmail.com"]
|
|
11
|
+
spec.email = ["julien@ilek.fr", "jerome@ilek.fr", "jeromearsene@gmail.com"]
|
|
12
12
|
|
|
13
13
|
spec.summary = "Ruby Gem for Aircall"
|
|
14
14
|
# spec.description = %q{TODO: Write a longer description or delete this line.}
|
data/doc/calls.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Calls
|
|
2
2
|
|
|
3
|
+
### All
|
|
4
|
+
|
|
5
|
+
##### Method
|
|
6
|
+
|
|
7
|
+
`calls.get_all`
|
|
8
|
+
|
|
9
|
+
##### Parameters
|
|
10
|
+
|
|
11
|
+
| Name | Default value |
|
|
12
|
+
| ------------- |:-------------:|
|
|
13
|
+
| page | 1 |
|
|
14
|
+
| per_page | 5 |
|
|
15
|
+
| order | asc |
|
|
16
|
+
| order_by | created_at |
|
|
17
|
+
|
|
18
|
+
|
|
3
19
|
### By id
|
|
4
20
|
|
|
5
21
|
##### Method
|
data/lib/aircall/calls.rb
CHANGED
|
@@ -2,13 +2,17 @@ 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")
|
|
6
|
+
get(construct_request_with_arguments("/calls", binding))
|
|
7
|
+
end
|
|
8
|
+
|
|
5
9
|
def get_by_id(call_id)
|
|
6
10
|
get("/calls/#{call_id}")
|
|
7
11
|
end
|
|
8
12
|
|
|
9
13
|
def get_by_user_id(user_id, page: 1, per_page: 5, order: "asc", order_by: "created_at")
|
|
10
14
|
get(construct_request_with_arguments("/calls/search", binding))
|
|
11
|
-
|
|
15
|
+
end
|
|
12
16
|
|
|
13
17
|
def get_by_phone_number(phone_number, page: 1, per_page: 5, order: "asc", order_by: "created_at")
|
|
14
18
|
get(construct_request_with_arguments("/calls/search", binding))
|
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.3
|
|
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-
|
|
12
|
+
date: 2018-05-14 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: httparty
|
|
@@ -97,6 +97,7 @@ dependencies:
|
|
|
97
97
|
version: '10.0'
|
|
98
98
|
description:
|
|
99
99
|
email:
|
|
100
|
+
- julien@ilek.fr
|
|
100
101
|
- jerome@ilek.fr
|
|
101
102
|
- jeromearsene@gmail.com
|
|
102
103
|
executables: []
|
|
@@ -112,7 +113,6 @@ files:
|
|
|
112
113
|
- aircall.gemspec
|
|
113
114
|
- bin/console
|
|
114
115
|
- bin/setup
|
|
115
|
-
- bin/temporary_tests
|
|
116
116
|
- doc/calls.md
|
|
117
117
|
- doc/contacts.md
|
|
118
118
|
- doc/numbers.md
|