Class OAuth::AccessToken
In: lib/oauth/tokens/access_token.rb
Parent: ConsumerToken

The Access Token is used for the actual "real" web service calls that you perform against the server

Methods

delete   get   head   post   put   request  

Public Instance methods

Make a regular DELETE request using AccessToken

  @response = @token.delete('/people/123')
  @response = @token.delete('/people/123', { 'Accept' => 'application/xml' })

Make a regular GET request using AccessToken

  @response = @token.get('/people')
  @response = @token.get('/people', { 'Accept'=>'application/xml' })

Make a regular HEAD request using AccessToken

  @response = @token.head('/people')

Make a regular POST request using AccessToken

  @response = @token.post('/people')
  @response = @token.post('/people', { :name => 'Bob', :email => 'bob@mailinator.com' })
  @response = @token.post('/people', { :name => 'Bob', :email => 'bob@mailinator.com' }, { 'Accept' => 'application/xml' })
  @response = @token.post('/people', nil, {'Accept' => 'application/xml' })
  @response = @token.post('/people', @person.to_xml, { 'Accept'=>'application/xml', 'Content-Type' => 'application/xml' })

Make a regular PUT request using AccessToken

  @response = @token.put('/people/123')
  @response = @token.put('/people/123', { :name => 'Bob', :email => 'bob@mailinator.com' })
  @response = @token.put('/people/123', { :name => 'Bob', :email => 'bob@mailinator.com' }, { 'Accept' => 'application/xml' })
  @response = @token.put('/people/123', nil, { 'Accept' => 'application/xml' })
  @response = @token.put('/people/123', @person.to_xml, { 'Accept' => 'application/xml', 'Content-Type' => 'application/xml' })

The less intrusive way. Otherwise, if we are to do it correctly inside consumer, we need to restructure and touch more methods: request(), sign!(), etc.

[Validate]