Added a draft AJAX API specification.
diff --git a/GSoC2010DataSeeder.wiki b/GSoC2010DataSeeder.wiki index 7fde3b0..6994d55 100644 --- a/GSoC2010DataSeeder.wiki +++ b/GSoC2010DataSeeder.wiki
@@ -224,6 +224,111 @@ *TODO!* +== AJAX API == + + * _*/get_models_* + * Returns a list of models that can be seeded. + * Input: N/A + * Output: +{{{ +{ + "models" : [ + "models.student.Student": + { + "name": "Student", + "description": "Student details for a specific Program." + "parent": "Role" + }, + "models.linkable.Linkable": + { + "name": "Linkable", + "description": "...", + "parent": "base.ModelWithFieldAttributes" + } + "models.base.ModelWithFieldAttributes": + { + "name": "ModelWithFieldAttributes", + "description": "...", + "parent": null + }, + ... + ] +} +}}} + + * _*/get_properties*_ + * Returns a list of properties for a specific model. + * Input: +{{{ +{ + "model": "models.student.Student" +} +}}} + * Output: +{{{ +{ + "model": "models.student.Student", + "properties": [ + "school_name": { + "name": "School name", + "type": "StringProperty", + "group": "5. Education", + "required": true, + "description": "..." + }, + "school_type": { + "name" : "School Type", + "type": "StringProperty", + "group": "5. Education", + "required": false, + "choices": ["University", "High School"], + "description": "..." + }, + ... + ] +} +}}} + + * _*/get_data_providers*_ + * Returns a list of possible data providers for a property type. + * Input: +{{{ +{ + "type": "StringProperty" +} +}}} + * Output: +{{{ +{ + "type": "StringProperty", + "data_providers": [ + "FixedStringProvider": { + "name": "Fixed string providers", + "description": "Returns a fixed string.", + "parameters" : [ + "value": { + "name": "Value", + "description": "The value of the string to return", + "required": true + } + ] + }, + "RandomWordProvider": { + "name": "Random word provider", + "description": "Returns a random word.", + "parameters" : [ + "choices": { + "name": "Choices", + "description": "A list of words to choose from", + "required": false + } + ] + } + ... + ] +} +}}} + = Proposed timeline = == Week 1 (24 May - 30 May) ==