Class: XingApi::Company::Update

Inherits:
Base
  • Object
show all
Defined in:
lib/xing_api/company/update.rb,
lib/xing_api/company/update/comment.rb

Defined Under Namespace

Classes: Comment

Class Method Summary collapse

Methods inherited from Base

request, request_with_body

Class Method Details

.create(company_id, headline, content, options = {}) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/xing_api/company/update.rb', line 8

def self.create(company_id, headline, content, options = {})
  request(
    :post,
    "/v1/companies/#{company_id}/updates",
    {
      headline: headline,
      content: content
    }.merge(options)
  )
end

.delete(update_id, options = {}) ⇒ Object



23
24
25
# File 'lib/xing_api/company/update.rb', line 23

def self.delete(update_id, options = {})
  request(:delete, "/v1/companies/updates/#{update_id}", options)
end

.edit(update_id, options = {}) ⇒ Object



19
20
21
# File 'lib/xing_api/company/update.rb', line 19

def self.edit(update_id, options = {})
  request(:put, "/v1/companies/updates/#{update_id}", options)
end

.like(update_id, options = {}) ⇒ Object



27
28
29
# File 'lib/xing_api/company/update.rb', line 27

def self.like(update_id, options = {})
  request(:put, "/v1/companies/updates/#{update_id}/like", options)
end

.list(company_id, options = {}) ⇒ Object



4
5
6
# File 'lib/xing_api/company/update.rb', line 4

def self.list(company_id, options = {})
  request(:get, "/v1/companies/#{company_id}/updates", options)
end

.unlike(update_id, options = {}) ⇒ Object



31
32
33
# File 'lib/xing_api/company/update.rb', line 31

def self.unlike(update_id, options = {})
  request(:delete, "/v1/companies/updates/#{update_id}/like", options)
end