AppBlade pub/sub services
Ruby
Latest commit 30bdfec Aug 31, 2014 @jamesdaniels jamesdaniels New server settings

Readme.md

AppBlade Services

AppBlade services power the integration and plugin aspects of the AppBlade platform. These integration points are open source and under the MIT LICENSE.

How services work

  1. A service hooks are triggered by a background process when certain triggers are hit on AppBlade
  2. If any service hooks are enabled on the project/account AppBlade will pass the request on the services process (this project)
  3. "Services" will process the request and it's JSON payload

Service schema

The service schema is broadcasted via JSON on a GET /; AppBlade will consume this and display it in your project's settings.

See examples in the services directory to see how services are setup.

Available data-types
Schema typeArgumentsDescription
string *fields, options = {} A string data type (max-length 999)
password*fields, options = {} A string with a masked input field
boolean *fields, options = {} A string with a value of 1 or 0, true/false, will be presented as a checkbox in AppBlade
oauth service_identifier An OAuth token for a given service (sensitive by default)
Available options for the option hash
KeyValueDescription
required Boolean Fails validation if empty
sensitive Boolean Sensitive fields will only show their contents to the user that editted the integration last on AppBlade
default String AppBlade will show a default value
collection [Strings] AppBlade will show a combination box with the array values passed

Contributing

  1. Fork this project
  2. Start the services project by running either bundle exec services.rb or bundle exec ruby services.rb
  3. Create a new ruby file or modify one in /services with the following format:

    class Service::ServiceName < Service
    
        Title = 'Service Name'
        Description = 'One line description'
    
        string :foo, :required => true
        string :something, :something_else, :default => 'a'
    
        boolean :do_something
    
        oauth :named_service
    
        # Put your validations here (string only ATM)
        def settings_test
            return 'Success.'
        end
    
        # Do something when a unique crash report comes through
        def receive_crash_report 
        end
    
        # Do something when feedback is recieved
        def recieve_feedback
        end
    
    end
  4. Add any any needed tests in /tests

  5. Add documentation in /docs
  6. Add any dependencies to the Gemfile
  7. Send a pull request to AppBlade Services