Class: Flatpack::Client::BaseApi

Inherits:
Object
  • Object
show all
Includes:
Flatpack::Core::MapInitialize
Defined in:
lib/flatpack/client/base_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#flatpackObject

Returns the value of attribute flatpack.



8
9
10
# File 'lib/flatpack/client/base_api.rb', line 8

def flatpack
  @flatpack
end

#server_baseObject

Returns the value of attribute server_base.



8
9
10
# File 'lib/flatpack/client/base_api.rb', line 8

def server_base
  @server_base
end

#verboseObject

Returns the value of attribute verbose.



8
9
10
# File 'lib/flatpack/client/base_api.rb', line 8

def verbose
  @verbose
end

Instance Method Details

#annotation_entity_get(entity) ⇒ Object



32
33
34
# File 'lib/flatpack/client/base_api.rb', line 32

def annotation_entity_get(entity)
  annotation_type_uuid_get(entity.entity_name, entity.uuid)
end

#auth_headersObject

Concrete implementations that require authentication should implement this method if authenticated requests require custom request headers



24
25
26
# File 'lib/flatpack/client/base_api.rb', line 24

def auth_headers
  return {}
end

#describe_entity_get(entity) ⇒ Object



28
29
30
# File 'lib/flatpack/client/base_api.rb', line 28

def describe_entity_get(entity)
  describe_type_uuid_get(entity.entity_name, entity.uuid)
end

#refresh_sessionObject

Concrete implementations that require authentication should implement this method to refresh an expired session



19
20
# File 'lib/flatpack/client/base_api.rb', line 19

def refresh_session
end

#session_active?Boolean

Concrete implementations that require authentication should implement this method do determine if the current session is still active.

Returns:

  • (Boolean)


12
13
14
15
# File 'lib/flatpack/client/base_api.rb', line 12

def session_active?
  # By default, the session is always active
  true
end