class Contentful::Management::PersonalAccessToken
Resource
class for PersonalAccessToken
. @see _ www.contentful.com/developers/docs/references/content-management-api/#/reference/personal-access-tokens
Public Class Methods
build_endpoint(endpoint_options)
click to toggle source
@private
# File lib/contentful/management/personal_access_token.rb, line 20 def self.build_endpoint(endpoint_options) endpoint = 'users/me/access_tokens' endpoint = "#{endpoint}/#{endpoint_options[:resource_id]}" if endpoint_options[:resource_id] endpoint = "#{endpoint}#{endpoint_options[:suffix]}" if endpoint_options[:suffix] endpoint end
create_attributes(_client, attributes)
click to toggle source
@private
# File lib/contentful/management/personal_access_token.rb, line 28 def self.create_attributes(_client, attributes) attributes end
Public Instance Methods
destroy()
click to toggle source
Not supported
# File lib/contentful/management/personal_access_token.rb, line 33 def destroy fail 'Not supported' end
revoke()
click to toggle source
Revokes the personal access token.
# File lib/contentful/management/personal_access_token.rb, line 38 def revoke ResourceRequester.new(client, self.class).update( self, resource_id: id, suffix: '/revoked' ) end