freshdesk-rest 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/freshdesk-rest/resource/contact.rb +11 -3
- data/lib/freshdesk-rest/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c74123eb5c07012c97676484ee6108c47107f0cda0f957efb5879f7261eef3ed
|
4
|
+
data.tar.gz: 9eb577566814c58629699b870e44ce2400d3cb5248731a697d1945474a5ba0a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6086003c53dc44115635ab05f0a2bba4c0427757a598c6fb07fb0a9ec1653efc9434b1cb83bc946f9044ce8f06dfde7975b93fa88273e9e25f9ca28be085370
|
7
|
+
data.tar.gz: ab148eaf62ab0fde40df14fdc75da967d19b8e339097703f1a9cdda34733fb1e29d4cf0856406333533deb49f6aeb92a85489ae6b8a2e8a566f2462c02d05a73
|
@@ -10,9 +10,7 @@ module Freshdesk
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def list(params: {})
|
13
|
-
|
14
|
-
path = [@path, (query.empty? ? nil : query)].compact.join('?')
|
15
|
-
Parser.parse(@client.get(path))
|
13
|
+
Parser.parse(@client.get([@path, presence(query(params))].compact.join('?')))
|
16
14
|
end
|
17
15
|
|
18
16
|
def get(id:)
|
@@ -30,6 +28,16 @@ module Freshdesk
|
|
30
28
|
def delete(id:)
|
31
29
|
Parser.parse(@client.delete("#{@path}/#{id}"))
|
32
30
|
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def presence(value)
|
35
|
+
value.empty? ? nil : value
|
36
|
+
end
|
37
|
+
|
38
|
+
def query(params)
|
39
|
+
URI.encode_www_form(params.to_a)
|
40
|
+
end
|
33
41
|
end
|
34
42
|
end
|
35
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: freshdesk-rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paweł Placzyński
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A ruby gem to interact with Freshdesk REST resources
|
14
14
|
email: placzynski.pawel@gmail.com
|
@@ -27,7 +27,7 @@ homepage: https://rubygems.org/gems/freshdesk-rest
|
|
27
27
|
licenses:
|
28
28
|
- MIT
|
29
29
|
metadata:
|
30
|
-
source_code_uri: https://github.com/
|
30
|
+
source_code_uri: https://github.com/Helpling/freshdesk-rest
|
31
31
|
post_install_message:
|
32
32
|
rdoc_options: []
|
33
33
|
require_paths:
|