Class: ClashOfClansApi::Models::Token

Inherits:
Base
  • Object
show all
Defined in:
lib/clash_of_clans_api/models/token.rb

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#[], #cache_property, #initialize, property, #property_cached?, #property_from_cache, registered_properties, #to_h, #validate!

Constructor Details

This class inherits a constructor from ClashOfClansApi::Models::Base

Instance Method Details

#client_from_tokenObject



21
22
23
# File 'lib/clash_of_clans_api/models/token.rb', line 21

def client_from_token
	ClashOfClansApi::Client.new(self.key)
end

#revokeObject



17
18
19
# File 'lib/clash_of_clans_api/models/token.rb', line 17

def revoke
	self.client.revoke_api_key(self.id)
end