Class: TentClient::Following

Inherits:
Object
  • Object
show all
Defined in:
lib/tent-client/following.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Following

Returns a new instance of Following.



3
4
5
# File 'lib/tent-client/following.rb', line 3

def initialize(client)
  @client = client
end

Instance Method Details

#count(params = {}) ⇒ Object



7
8
9
# File 'lib/tent-client/following.rb', line 7

def count(params={})
  @client.http.get('followings/count', params)
end

#create(entity_uri) ⇒ Object



19
20
21
# File 'lib/tent-client/following.rb', line 19

def create(entity_uri)
  @client.http.post 'followings', :entity => entity_uri.sub(%r{/$}, '')
end

#delete(id) ⇒ Object



27
28
29
# File 'lib/tent-client/following.rb', line 27

def delete(id)
  @client.http.delete "followings/#{id}"
end

#get(id) ⇒ Object



23
24
25
# File 'lib/tent-client/following.rb', line 23

def get(id)
  @client.http.get "followings/#{id}"
end

#list(params = {}) ⇒ Object



11
12
13
# File 'lib/tent-client/following.rb', line 11

def list(params = {})
  @client.http.get 'followings', params
end

#update(id, data) ⇒ Object



15
16
17
# File 'lib/tent-client/following.rb', line 15

def update(id, data)
  @client.http.put "followings/#{id}", data
end