teamleader 0.9.0 → 0.10.0
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/CHANGELOG.md +4 -0
- data/lib/teamleader/api.rb +32 -0
- data/lib/teamleader/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: 76fad4a78815592a018fd56de16abf6ef06e9f96
|
4
|
+
data.tar.gz: b733581ec2ceee62182499e4bb37b4640e81cd24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a556517d034ae45471afc20751065cccf49d0b100ffeb0e0d0e4311828f56015117fbd7075ac288cafe0f6289194b395e50ad02b00c0de0b95692bb7cd094a5d
|
7
|
+
data.tar.gz: 760dfa498fa7e8534eb08315c9ed7e3bb9db6cc39ce255173a6aa050b5da7556aa5982eee849ab942eee4525e66623302c0a8924b96adaffbf53ed962d7d20b9
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## [0.10.0] - 2018-01-09
|
5
|
+
### Added
|
6
|
+
- All methods related to companies: `add_company`, `update_company`, `delete_company`, `get_companies`, `get_company`, `get_business_types`
|
7
|
+
|
4
8
|
## [0.9.0] - 2018-01-05
|
5
9
|
### Added
|
6
10
|
- Some methods related to notes: `add_note`, `get_notes`
|
data/lib/teamleader/api.rb
CHANGED
@@ -304,6 +304,38 @@ module Teamleader
|
|
304
304
|
request "/addNote.php", params
|
305
305
|
end
|
306
306
|
|
307
|
+
def add_company(params={})
|
308
|
+
raise "name is required" if params[:name].nil?
|
309
|
+
request "/addCompany.php", params
|
310
|
+
end
|
311
|
+
|
312
|
+
def update_company(params={})
|
313
|
+
raise "company_id is required" if params[:company_id].nil?
|
314
|
+
raise "track_changes is required" if params[:track_changes].nil?
|
315
|
+
request "/updateCompany.php", params
|
316
|
+
end
|
317
|
+
|
318
|
+
def delete_company(params={})
|
319
|
+
raise "company_id is required" if params[:company_id].nil?
|
320
|
+
request "/deleteCompany.php", params
|
321
|
+
end
|
322
|
+
|
323
|
+
def get_companies(params={})
|
324
|
+
raise "amount is required" if params[:amount].nil?
|
325
|
+
raise "pageno is required" if params[:pageno].nil?
|
326
|
+
request "/getCompanies.php", params
|
327
|
+
end
|
328
|
+
|
329
|
+
def get_company(params={})
|
330
|
+
raise "company_id is required" if params[:company_id].nil?
|
331
|
+
request "/getCompany.php", params
|
332
|
+
end
|
333
|
+
|
334
|
+
def get_business_types(params={})
|
335
|
+
raise "country is required" if params[:country].nil?
|
336
|
+
request "/getBusinessTypes.php", params
|
337
|
+
end
|
338
|
+
|
307
339
|
private
|
308
340
|
def request(path, data={})
|
309
341
|
headers = {
|
data/lib/teamleader/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teamleader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pierre-Yves Orban
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|