Skip to content

aliajellu/sail.Arlo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to ARLO (Another Repository of Learning Objects)
==========================================================

Common Fields of First-Class Objects
-------------------------------------
id (int)
uid (int) 
type (string)
version (string)
author (string)
run_id (int)
created_at (timestamp)
updated_at (timestamp)


Current First-Class Objects
-----------------------------
Run
    - name (string)
    - status (string)
    
Question
    - image_path (string)
    - correct_answer (string)
    - choice_limit (string)
    - expertise_id (int)
    
Expertise
    - name
    
Tag
    - name
    
Answer
    - answer (string)
    - question_id (int)


First-Class Objects Relations
------------------------------
AnswerTag (joins Tag & Answer)

AllowedQuestionTag (joins Tag and Question)


RESTful API
----------------
Currently only the JSON interface of the RESTful API is available, so every URL should end with .json
An XML version is in the testing phases. 
An HTTP version is also available and should "work", but it's certainly not production-ready.

    Create
        method: POST
        url:    /<object>s
        params: a JSON object eg: {"question":{"image_path":"//some/address","correct_answer":"B"}}

        http:   /<object>s/create/new
        eg:     /questions/create/new?question[image_path]=//some/address&question[correct_answer]=B
       
    Show
        method: GET
        url:    
        params: 
        
        http:   /<object>s/show/<id>.json
                /<object>s/<id>.json
        eg:     /questions/show/3.json
        
    Update
        method: PUT
        url:    /<object>s/<id>.json
        params: JSON object eg: {"question":{"image_path":"//some/address"}}
        
        http:   /<objects>s/update/<id>
        eg:     /questions/update/3?question[image_path]=//some/address
        
    Delete
        method: DELETE
        url:    /<object>s/<id>.json
        params: -
        
        http:   /<object>s/destory/<id>
        eg:     /questions/destroy/5
        
    New
        method: GET
        url:    /<object>s/new.json
        params: -
        
        http:   /<object>s/new
        eg:     /questions/new
        
Query Interface
------------------
A simple GET to /query?query=<The Query in Ruby> will get you a resultset in JSON 

eg: http://localhost:3000/query?query=Tag.all
        
        
To Run Data Fixtures
----------------------
go to project directory:
rake db:fixtures:load

        
        
        
        
        
        
        
        

About

The SAIL framework repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published