API
This describes the resources that make up the official Ostext API v0.1. If you have any problems or requests please contact us.
Quick Info
- All API access is over HTTP GET Requests, and accessed from the http://api.dieletztedomain.de/ostext/ url.
- All data is sent and received as JSON (JSONP if callback parameter is set).
- There is no authentication. Anybody can query any method without API-Key, OAuth or anything else for authentication
API Methods
/search.php
URL:
http://api.dieletztedomain.de/ostext/search.php
Parameters:
q = Query String
s = Start Position (Optional, Default = 0)
l = Language Code (Optional)
Response:
info = Query informations
info -> anz = Number of results for query
info -> start = Start result-set
info -> end = End result-set
info -> query = Query String
info -> time = Execution time for query
results = Query result-set as array
results[] -> id = Ostext Message ID
results[] -> nr = Number in result-set
results[] -> string = HTML formatted message string with syntax highlighting
results[] -> raw = Raw message string
results[] -> languages = Message string is used in languages (language codes, space separated)
results[] -> languageshtml = Message string is used in languages (language names as HTML)
results[] -> anz = Message string usage count
Sample:
http://api.dieletztedomain.de/ostext/search.php?q=Einstellungen&l=de&s=2000
{ “info” : { “anz” : 2185, “start” : “2000″, “query” : “Einstellungen AND lang:de”, “end” : 2019, “time” : 1.5147759914398 }, “results” : [ { “id” : “4829095”, “nr” : 2000, “string” : “<!DOCTYPE html PUBLIC \”-//W3C//DTD HTML 4.0 Transitional//EN\” \”http://www.w3.org/TR/REC-html40/loose.dtd\”>\n<html><head><meta http-equiv=\”Content-type\” content=\”text/html; charset=UTF-8\”></head><body>»%s«-Ei<b style=\”color:black;background-color:#FFFFFF\”>nstellungen</b></body></html>\n”, “raw” : “»%s«-Einstellungen”, “languages” : “de”, “languageshtml” : “German”, “anz” : “1”}, … { “id” : “4959372”, “nr” : 2019, “string” : “<!DOCTYPE html PUBLIC \”-//W3C//DTD HTML 4.0 Transitional//EN\” \”http://www.w3.org/TR/REC-html40/loose.dtd\”>\n<html><head><meta http-equiv=\”Content-type\” content=\”text/html; charset=UTF-8\”></head><body>Standard-<b style=\”color:black;background-color:#FFFFFF\”>einstellungen</b> wurden gespeichert.</body></html>\n”, “raw” : “Standard-einstellungen wurden gespeichert.”, “languages” : “de”, “languageshtml” : “German”, “anz” : “1” } ] } |
/key.php
URL:
http://api.dieletztedomain.de/ostext/key.php
Parameters:
id = Message Id
Response:
id = Given message id
string = The message key/value
kids = Array of message keys if id matches to a translation
kids -> anz = Number of results for query
kids -> id = Id of the message key
kids -> string = The message key string
translations = Array of translations if id matches to a message key
translations -> id = Id of the translation message
translations -> string = The translation message string value
translations -> code = The translation message language code
translations -> language = The translation message language name
projects = Array of using projects if id matches to a message key
projects -> id = Id of the project
projects -> name = Name of the project
projects -> version = Version of the project
projects -> summary = Project summary (Short description)
projects -> license = License of the project
Sample: (With given key id)
http://api.dieletztedomain.de/ostext/key.php?id=42
{“id” : “42″, “string” : “Credential Cache Template specifies the location in which to place the user’s session-specific credential cache.”, “kids” : [], “translations” : [{ “code” : “ar”, “language” : “Arabic”, “id” : “416652”, “string” : “قالب ذاكرة التخزين المؤقت مؤهلات الاعتماد يحدد الموقع ليتم وضع التخزين المؤقت مؤهلات الاعتماد الخاصة بجلسة المستخدم.” },{ “code” : “de”, “language” : “German”, “id” : “232113”, “string” : “Zwischenspeicher für Berechtigungen gibt den Speicherort an, in dem die sitzungsspezifischen Berechtigungsdateien des Benutzers zwischengespeichert werden.”}, … { “code” : “ja”, “language” : “Japanese”, “id” : “159931”, “string” : “証明書キャッシュの雛型 では、セッション固有のユーザ証明書キャッシュを置く場所を指定してください。” },{ “code” : “es”, “language” : “Spanish; Castilian”, “id” : “106889”, “string” : “Plantilla de caché de credenciales indica la ubicación en la que se colocará el caché de credenciales específico de la sesión del usuario.”}], “projects” : [{ “id” : “55”, “name” : “yast2-trans-ar”, “version” : “2.23.0”, “summary” : “YaST2 – Arabic Translations”, “license” : “GPL-2.0+” }, … { “id” : “20”, “name” : “yast2-trans-zh_CN”, “version” : “2.23.0”, “summary” : “YaST2 – Simplified Chinese Translations”, “license” : “GPL-2.0+” } ]} |
/translation.php
URL:
http://api.dieletztedomain.de/ostext/translation.php
Parameters:
id = Translation Id
Response:
id = Given translation id
filename = Filename of the message file
name = Name of the translation
tranlator = Translator name (and email if available)
mailinglist = The translation mailing list (if available)
code = Translation file language code
language = Translation file language name
messages = Array of messages included in this translation
messages -> id = The message value id
messages -> key = The message key id
messages -> string = The message string
projects = Array of using projects
projects -> id = Id of the project
projects -> name = Name of the project
projects -> version = Version of the project
projects -> release = Release of the project
projects -> summary = Project summary (Short description)
projects -> license = License of the project
Sample:
http://api.dieletztedomain.de/ostext/translation.php?id=42
{“id” : “42″, “filename” : “/usr/share/YaST2/locale/cs/LC_MESSAGES/restore.mo”, “name” : “restore”, “translator” : “Jan Papez (honyczek) <honyczek@centrum.cz>”, “mailinglist” : “Czech <opensuse-translation@opensuse.org>”, “code” : “cs”, “language” : “Czech”, “messages” : [{ “id” : “14603”, “key” : “14602”, “string” : “&IP adresa nebo jméno NFS serveru” }, … { “id” : “14671”, “key” : “14670”, “string” : “Zvolte archív” }],”projects” : [{ “id” : “10”, “name” : “yast2-trans-cs”, “version” : “2.23.0”, “release” : “5.4.1”, “summary” : “YaST2 – Czech Translations”, “license” : “GPL-2.0+” }]} |
/project.php
URL:
http://api.dieletztedomain.de/ostext/project.php
Parameters:
id = Project id
Response:
id = The given project id (equals request parameter id)
name = The name of the project
version = The project version
release = The project release
summary = Project summary (short info)
description = Project description
distribution = Project distribution if project is part of a distribution
vendor = Vendor of project/distribution
license = Project license
group = Project group (if available)
url = Project/distribution homepage
translations = Array of incl. translations
translations -> id = Translation id
translations -> pid = Project id (equals request parameter id)
translations -> filename = Message-file filename
translations -> name = Message-file name
translations -> translator = Message-file translator name (and email if available)
translations -> mailinglist = Translation-file mailing list (if available)
translations -> code = Message-file language code
translations -> language = Message-file language name
Sample:
http://api.dieletztedomain.de/ostext/project.php?id=42
{“id” : “42″, “name” : “yast2-trans-ro”, “version” : “2.23.0″, “release” : “5.4.1″, “summary” : “YaST2 – Romanian Translations”, “description” : “YaST2 – Translations for Romanian.”, “distribution” : “openSUSE 12.3″, “vendor” : “openSUSE”, “license” : “GPL-2.0+”, “group” : “System/YaST”, “url” : “http://en.opensuse.org”, “translations” : [{ “id” : “3233”, “pid” : “42”, “filename” : “/usr/share/YaST2/locale/ro/LC_MESSAGES/kerberos.mo”, “name” : “OpenSUSE”, “translator” : “Alexandru Szasz <alexxed@gmail.com>”, “mailinglist” : “Romanian <LL@li.org>”, “code” : “ro”, “language” : “Romanian” }, … { “id” : “3333”, “pid” : “42”, “filename” : “/usr/share/YaST2/locale/ro/LC_MESSAGES/irda.mo”, “name” : “OpenSUSE”, “translator” : “Alexandru Szasz <alexxed@gmail.com>”, “mailinglist” : “Romanian <LL@li.org>”, “code” : “ro”, “language” : “Romanian”}]} |