Class: Oauth::Models::Consumers::SimpleClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oauth/models/consumers/simple_client.rb

Overview

This is just a simple

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (SimpleClient) initialize(token)



9
10
11
# File 'lib/oauth/models/consumers/simple_client.rb', line 9

def initialize(token)
  @token = token
end

Instance Attribute Details

- (Object) token (readonly)

Returns the value of attribute token



7
8
9
# File 'lib/oauth/models/consumers/simple_client.rb', line 7

def token
  @token
end

Instance Method Details

- (Object) delete(path)



18
19
20
# File 'lib/oauth/models/consumers/simple_client.rb', line 18

def delete(path)
  parse(token.delete(path, {'Accept' => 'application/json'}))
end

- (Object) get(path)



26
27
28
# File 'lib/oauth/models/consumers/simple_client.rb', line 26

def get(path)
  parse(token.get(path, {'Accept' => 'application/json'}))
end

- (Object) post(path, params = {})



22
23
24
# File 'lib/oauth/models/consumers/simple_client.rb', line 22

def post(path,params={})
  parse(token.post(path,params, {'Accept' => 'application/json'}))
end

- (Object) put(path, params = {})



14
15
16
# File 'lib/oauth/models/consumers/simple_client.rb', line 14

def put(path,params={})
  parse(token.put(path,params, {'Accept' => 'application/json'}))
end