Class: Alman::CalendarVacanciesEndpoint

Inherits:
ApiEndpoint show all
Defined in:
lib/alman/endpoints/calendar_vacancies_endpoint.rb

Instance Attribute Summary

Attributes inherited from ApiEndpoint

#client, #parent

Instance Method Summary collapse

Methods inherited from ApiEndpoint

#initialize

Constructor Details

This class inherits a constructor from Alman::ApiEndpoint

Instance Method Details

#all(params = {}, headers = {}) ⇒ Object



4
5
6
7
8
# File 'lib/alman/endpoints/calendar_vacancies_endpoint.rb', line 4

def all(params={}, headers={})
  method = ApiMethod.new(:get, "/calendars/:id/vacancies", params, headers, @parent)
  json = @client.execute(method)
  ApiList.new(:Vacancy, json, method)
end

#all_within(params = {}, headers = {}) ⇒ Object



10
11
12
13
14
# File 'lib/alman/endpoints/calendar_vacancies_endpoint.rb', line 10

def all_within(params={}, headers={})
  method = ApiMethod.new(:get, "/calendars/:id/vacancies/within", params, headers, @parent)
  json = @client.execute(method)
  ApiList.new(:Vacancy, json, method)
end

#create(params = {}, headers = {}) ⇒ Object



16
17
18
19
20
# File 'lib/alman/endpoints/calendar_vacancies_endpoint.rb', line 16

def create(params={}, headers={})
  method = ApiMethod.new(:post, "/calendars/:id/vacancies", params, headers, @parent)
  json = @client.execute(method)
  Vacancy.new(json, method)
end

#create_range(params = {}, headers = {}) ⇒ Object



22
23
24
25
26
# File 'lib/alman/endpoints/calendar_vacancies_endpoint.rb', line 22

def create_range(params={}, headers={})
  method = ApiMethod.new(:post, "/calendars/:id/vacancies/range", params, headers, @parent)
  json = @client.execute(method)
  ApiList.new(:Vacancy, json, method)
end

#delete_overlap(params = {}, headers = {}) ⇒ Object



28
29
30
31
32
# File 'lib/alman/endpoints/calendar_vacancies_endpoint.rb', line 28

def delete_overlap(params={}, headers={})
  method = ApiMethod.new(:delete, "/calendars/:id/vacancies/overlap", params, headers, @parent)
  json = @client.execute(method)
  ApiList.new(:Vacancy, json, method)
end