Created
June 23, 2014 12:50
-
-
Save bishwanathjha/7797fcecc587d34316d9 to your computer and use it in GitHub Desktop.
API-Language
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LANGUAGE API GET Response | |
GET /core/v1/Language | |
{ | |
"data": [ | |
{ | |
"id": 1, | |
"locale": "en-us", | |
"icon": "\/__swift\/apps\/base\/assets\/__universal\/flags-iso\/64\/US.png", | |
"is_master": true, | |
"is_default": true, | |
"enabled": true, | |
"created_at": 1403249871, | |
"updated_At": 1403249871, | |
"phrases": [ | |
{ | |
"id": 1, | |
"resource_url": "http:\/\/10.1.0.108\/k5\/admin\/index.php?\/core\/v1\/phrase\/1" | |
}, | |
{ | |
"id": 2, | |
"resource_url": "http:\/\/10.1.0.108\/k5\/admin\/index.php?\/core\/v1\/phrase\/2", | |
} | |
] | |
} | |
], | |
} | |
Above is default response which is fine, Just displaying resource_url. Need to access it if you want to get phrases. | |
==================== | |
GET /core/v1/Language show_child=true(kind of parameter which should allow to show all child fields) | |
{ | |
"data": [ | |
{ | |
"id": 1, | |
"locale": "en-us", | |
"icon": "\/__swift\/apps\/base\/assets\/__universal\/flags-iso\/64\/US.png", | |
"is_master": true, | |
"is_default": true, | |
"enabled": true, | |
"created_at": 1403249871, | |
"updated_At": 1403249871, | |
"phrases": [ | |
{ | |
"id": 1, | |
"category" : "something", | |
"content": "something", | |
"status" : "true", | |
"app" : "Test" | |
}, | |
{ | |
"id": 2, | |
"category" : "something", | |
"content": "something", | |
"status" : "true", | |
"app" : "Test" | |
}, | |
] | |
} | |
], | |
} | |
Here we get all child data in a single call itself. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment