teamtailor 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0fb58dde09bf88aeefb1583c34f8b55dfeb27420a8bac2e0287d707ce28af0d0
4
- data.tar.gz: 8c6bad2854c056272020d5d9b3f774ac418d0f6a9f1558a3a29791422d959588
3
+ metadata.gz: 2ea15733d89440836cd11873349b83f5036f63f5e1ea16232ec3c442548ce4a7
4
+ data.tar.gz: a8793472aef8a5374f7ac1da3ad3aa9dc79a6ca77d2e12010e5d6c5d0bc6066c
5
5
  SHA512:
6
- metadata.gz: d946ffac4d073ad2bb82fc79c82c13abcaba7810334b870b50e3fce6ebce4158df4cc1080d0261b82603c98843d6e0b36920f2849c1f0db05e3fd5d67bc43d54
7
- data.tar.gz: d31194eae620d640623843109fe448b431b25feb278c2f1c85b248eeee15269cdaa0f264252bcc1275c476ab0569a0e945bf87e3b8dc2ffc3fe3e27a4c047246
6
+ metadata.gz: 77f8ed12b1e1d3145a32dfd7c351f8ffa9d7b19cfd59eb2776deee136dc05e7cf0167e50e77b26b1698f6ebca9f1107ad9874c13f3b13fef93ec7d3d5f7556a6
7
+ data.tar.gz: '09e87150351d60b41a898afaf14f028ab685726a50a929168868cd400636f6439ef927d92722bc07ad234e100cfb2b41e5a5129f07fcb84c18d33744ccf0140d'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Unreleased
2
2
 
3
+ ## v0.2.3 - 2020-04-06
4
+
5
+ - Add `Teamtailor::Company` and `Client#company` for fetching it (`05dde0`)
6
+
3
7
  ## v0.2.2 - 2020-03-31
4
8
 
5
9
  - Move serialization logic in the `Teamtailor::Record` base class (`9ec63a0`)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- teamtailor (0.2.2)
4
+ teamtailor (0.2.3)
5
5
  typhoeus (~> 1.3.1)
6
6
 
7
7
  GEM
@@ -10,6 +10,18 @@ module Teamtailor
10
10
  @api_version = api_version
11
11
  end
12
12
 
13
+ def company(include: [])
14
+ Teamtailor::Request.new(
15
+ base_url: base_url,
16
+ api_token: api_token,
17
+ api_version: api_version,
18
+ path: '/v1/company',
19
+ params: {
20
+ 'include' => include.join(',')
21
+ }
22
+ ).call
23
+ end
24
+
13
25
  def candidates(page: 1, include: [])
14
26
  Teamtailor::Request.new(
15
27
  base_url: base_url,
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'teamtailor/relationship'
4
3
  require 'teamtailor/parser/candidate'
5
4
  require 'teamtailor/parser/job'
6
5
  require 'teamtailor/parser/user'
7
6
  require 'teamtailor/parser/job_application'
7
+ require 'teamtailor/parser/company'
8
8
 
9
9
  module Teamtailor
10
10
  class Parser
@@ -19,6 +19,7 @@ module Teamtailor
19
19
  when 'jobs' then Teamtailor::Job.new(record, included)
20
20
  when 'users' then Teamtailor::User.new(record, included)
21
21
  when 'job-applications' then Teamtailor::JobApplication.new(record, included)
22
+ when 'companies' then Teamtailor::Company.new(record, included)
22
23
 
23
24
  else
24
25
  raise Teamtailor::UnknownResponseTypeError, record&.dig('type')
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'teamtailor/record'
4
+
5
+ module Teamtailor
6
+ class Company < Record
7
+ def id
8
+ data.dig('id')
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,5 @@
1
+ require 'teamtailor/relationship'
2
+
1
3
  module Teamtailor
2
4
  class Record
3
5
  def initialize(data, included = {})
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Teamtailor
4
- VERSION = '0.2.2'
4
+ VERSION = '0.2.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teamtailor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Ligné
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-31 00:00:00.000000000 Z
11
+ date: 2020-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -62,6 +62,7 @@ files:
62
62
  - lib/teamtailor/page_result.rb
63
63
  - lib/teamtailor/parser.rb
64
64
  - lib/teamtailor/parser/candidate.rb
65
+ - lib/teamtailor/parser/company.rb
65
66
  - lib/teamtailor/parser/job.rb
66
67
  - lib/teamtailor/parser/job_application.rb
67
68
  - lib/teamtailor/parser/user.rb