Module: Blueprint

Defined in:
lib/blueprint/api/rails.rb,
lib/blueprint/api/rails/version.rb

Defined Under Namespace

Modules: Api Classes: ActivityDesignContext, ConceptDesignContext, DesignContext, LinkDesignContext, StructuralElementDesignContext, StructureDesignContext

Constant Summary collapse

BLUEPRINT_SERVER =
ENV['BLUEPRINT_SERVER'] || 'http://anaxim.io'
BLUEPRINT_URL_CONTEXT =
'/api/v1/events'
STRUCTURE_NEW =

TODO deprecate all of the branch stuff TODO limit messages that are lists to a maximum of 10 elements TODO add support for getting the current user (so we can analysis log messages per user)

'start'
MESSAGE =
'message'
CLASSIFIER_NEW =
'classifier-new'
DESCRIBE_ELEMENT =
'describe-element'
DESCRIBE_CONCEPT =
'describe-concept'
CONTAINS =
'contains'
RULES =

the set of validation and verification rules for the system (executed locally)

{ }

Class Method Summary collapse

Class Method Details

.set_api_key(api_key) ⇒ Object

allow users to set the API key



27
28
29
# File 'lib/blueprint/api/rails.rb', line 27

def self.set_api_key api_key
  @api_key = api_key
end

.start(structure_id, name, description = nil) ⇒ Object

call this to create a structure and get a design context



32
33
34
35
36
37
38
# File 'lib/blueprint/api/rails.rb', line 32

def self.start(structure_id, name, description = nil)
  StructureDesignContext.new(@api_key, structure_id).send STRUCTURE_NEW,
                                                          {
                                                              :name => name,
                                                              :description => description
                                                          }
end