agilecrm-wrapper 1.0.2 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/agilecrm-wrapper.rb +1 -0
- data/lib/agilecrm-wrapper/tag.rb +22 -0
- data/lib/agilecrm-wrapper/version.rb +1 -1
- data/spec/agilecrm-wrapper/tag_spec.rb +11 -0
- data/spec/fixtures/tags/list_tags.json +38 -0
- data/spec/support/fake_agilecrm.rb +4 -0
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4021786d7a9dfad0f80f6cf54de5744a5fa8696
|
4
|
+
data.tar.gz: cd4723ed8726d2b9b6a3f97dd085d67c85fe7fc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bf8f1656e67dd9ef1f6a620139becabff21f401d3caa9c28fd94a5ea5f1ac0895136abbd76657d2b1b3328b865b2e151c2ed6cd2e96744ee461cb22c7d3f676
|
7
|
+
data.tar.gz: 886187ae5a984890bc01ebb37baec00bb03cca43dc7d0d59a0c976bb60be2ffcbeb2f3d5709f79aeb9cb384f025a00c1d86825002a611e8b78621f944ceca49c
|
data/README.md
CHANGED
data/lib/agilecrm-wrapper.rb
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'agilecrm-wrapper/error'
|
2
|
+
require 'hashie'
|
3
|
+
|
4
|
+
module AgileCRMWrapper
|
5
|
+
class Tag < Hashie::Mash
|
6
|
+
class << self
|
7
|
+
|
8
|
+
##
|
9
|
+
# Get all tags
|
10
|
+
# `AgileCRMWrapper::Tag.all`
|
11
|
+
|
12
|
+
def all
|
13
|
+
response = AgileCRMWrapper.connection.get('tags')
|
14
|
+
if response.status == 200
|
15
|
+
return response.body.map { |body| new body }
|
16
|
+
else
|
17
|
+
return response
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"tag": "Agile",
|
4
|
+
"createdTime": 0,
|
5
|
+
"availableCount": 0,
|
6
|
+
"entity_type": "tag"
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"tag": "tag1",
|
10
|
+
"createdTime": 0,
|
11
|
+
"availableCount": 0,
|
12
|
+
"entity_type": "tag"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"tag": "tag2",
|
16
|
+
"createdTime": 0,
|
17
|
+
"availableCount": 0,
|
18
|
+
"entity_type": "tag"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"tag": "tag3",
|
22
|
+
"createdTime": 0,
|
23
|
+
"availableCount": 0,
|
24
|
+
"entity_type": "tag"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"tag": "tag4",
|
28
|
+
"createdTime": 0,
|
29
|
+
"availableCount": 0,
|
30
|
+
"entity_type": "tag"
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"tag": "tag5",
|
34
|
+
"createdTime": 0,
|
35
|
+
"availableCount": 0,
|
36
|
+
"entity_type": "tag"
|
37
|
+
}
|
38
|
+
]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: agilecrm-wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyle
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -214,10 +214,12 @@ files:
|
|
214
214
|
- lib/agilecrm-wrapper/error.rb
|
215
215
|
- lib/agilecrm-wrapper/note.rb
|
216
216
|
- lib/agilecrm-wrapper/response/raise_error.rb
|
217
|
+
- lib/agilecrm-wrapper/tag.rb
|
217
218
|
- lib/agilecrm-wrapper/version.rb
|
218
219
|
- spec/agilecrm-wrapper/agilecrm_wrapper_spec.rb
|
219
220
|
- spec/agilecrm-wrapper/contact_spec.rb
|
220
221
|
- spec/agilecrm-wrapper/note_spec.rb
|
222
|
+
- spec/agilecrm-wrapper/tag_spec.rb
|
221
223
|
- spec/fixtures/contacts/create_contact.json
|
222
224
|
- spec/fixtures/contacts/get_contact.json
|
223
225
|
- spec/fixtures/contacts/get_contact_notes.json
|
@@ -227,6 +229,7 @@ files:
|
|
227
229
|
- spec/fixtures/contacts/updated_contact.json
|
228
230
|
- spec/fixtures/notes/create_note.json
|
229
231
|
- spec/fixtures/notes/create_without_contact.json
|
232
|
+
- spec/fixtures/tags/list_tags.json
|
230
233
|
- spec/spec_helper.rb
|
231
234
|
- spec/support/fake_agilecrm.rb
|
232
235
|
homepage: https://github.com/nozpheratu/agilecrm-wrapper
|
@@ -249,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
249
252
|
version: '0'
|
250
253
|
requirements: []
|
251
254
|
rubyforge_project:
|
252
|
-
rubygems_version: 2.
|
255
|
+
rubygems_version: 2.4.6
|
253
256
|
signing_key:
|
254
257
|
specification_version: 4
|
255
258
|
summary: Ruby wrapper for Agile CRM API.
|
@@ -257,6 +260,7 @@ test_files:
|
|
257
260
|
- spec/agilecrm-wrapper/agilecrm_wrapper_spec.rb
|
258
261
|
- spec/agilecrm-wrapper/contact_spec.rb
|
259
262
|
- spec/agilecrm-wrapper/note_spec.rb
|
263
|
+
- spec/agilecrm-wrapper/tag_spec.rb
|
260
264
|
- spec/fixtures/contacts/create_contact.json
|
261
265
|
- spec/fixtures/contacts/get_contact.json
|
262
266
|
- spec/fixtures/contacts/get_contact_notes.json
|
@@ -266,5 +270,7 @@ test_files:
|
|
266
270
|
- spec/fixtures/contacts/updated_contact.json
|
267
271
|
- spec/fixtures/notes/create_note.json
|
268
272
|
- spec/fixtures/notes/create_without_contact.json
|
273
|
+
- spec/fixtures/tags/list_tags.json
|
269
274
|
- spec/spec_helper.rb
|
270
275
|
- spec/support/fake_agilecrm.rb
|
276
|
+
has_rdoc:
|