Skip to content

Latest commit

 

History

85 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Layer

Build Status Coverage Status

Installation

  • Install Postgresql (8.1+)
  • Create the config/api_keys.yml file containing you api keys
  • And do some more steps

Test

bundle exec rake test

Run

bundle exec rails s

Deploy

bundle exec cap <stage> deploy

Usage

Push data to the layer endpoints

User data /api/users

Fields:

  • identifier:string (mandatory)
  • properties:hash
Create a new user
curl -H "Content-Type: application/json" -d '{"user": {"identifier": "1234", "properties": {"favorite_color": "pink"}}}' http://localhost:3000/api/users?api_key=12345

Item data /api/items

Fields:

  • identifier:string (mandatory)
  • name:string
  • properties:hash
Create a new item
curl -H "Content-Type: application/json" -d '{"item": {"name": "Walkman", "properties": {"color": "pink"}}}' http://localhost:3000/api/items\?api_key\=12345

Event data /api/events

Fields:

  • user_identifier:string (mandatory)
  • item_identifier:string (mandatory)
  • event:string (mandatory)

When an user_identifier / item_identifier is given and they don't exists. These objects will be created

Create a new event
curl -H "Content-Type: application/json" -d '{"event": {"user_identifier": "1234", "item_identifier": "sku23", "event": "view"}}' http://localhost:3000/api/events\?api_key\=123
List all registered events
curl -H "Content-Type: application/json" http://localhost:3000/api/events\?api_key\=123

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages