This shows you the differences between two versions of the page.
en:public:developer:template_system:tags:api:get_wwwfile_content [2013/05/21 12:31] svanderclock [Example] |
en:public:developer:template_system:tags:api:get_wwwfile_content [2013/05/21 12:33] (current) svanderclock old revision restored (2013/03/09 14:24) |
||
---|---|---|---|
Line 12: | Line 12: | ||
| <html><span style="color:#008000">output_format</span></html> | No | REST | **JSON** to retrieve response in [[en:public:developer:template_system:tags:api:JSON_Response_Format|JSON Format]] or **REST** to retrieve in [[en:public:developer:template_system:tags:api:REST_Response_Format|REST Format]] | | | <html><span style="color:#008000">output_format</span></html> | No | REST | **JSON** to retrieve response in [[en:public:developer:template_system:tags:api:JSON_Response_Format|JSON Format]] or **REST** to retrieve in [[en:public:developer:template_system:tags:api:REST_Response_Format|REST Format]] | | ||
| <html><span style="color:#008000">jsoncallback</span></html> | No | | Callback function to use in [[en:public:developer:template_system:tags:api:JSON_Response_Format|JSON Response Format]] | | | <html><span style="color:#008000">jsoncallback</span></html> | No | | Callback function to use in [[en:public:developer:template_system:tags:api:JSON_Response_Format|JSON Response Format]] | | ||
+ | |||
+ | ==== Error Codes ==== | ||
+ | |||
+ | ^ Code ^ Description ^ | ||
+ | | <html><span style="color:#008000">1</span></html> | Insufficient rights. You must be logged as an admin to see logs | | ||
+ | | <html><span style="color:#008000">114</span></html> | File not found | | ||
+ | | <html><span style="color:#008000">119</span></html> | Wrong Params | | ||
+ | |||
Line 18: | Line 26: | ||
<code html> | <code html> | ||
- | <#get_geoplaces output_format="json" | + | <#get_wwwfile_content filename="/templates/maintemplates/maintemplate.html"> |
- | geoplacerequest.id_direct_parent_geoplace="XW" | + | |
- | fields="geoplace.id;geoplace.havechilds;geoplace.label;geoplace.translations[usa].label;geoplace.translations[usa].label_propertylistings_url(1,1);geoplace.aggregated_data.NB_ad_filtered(1,1)"> | + | |
</code> | </code> | ||
- | will output in **JSON** | + | will output in **REST** |
+ | |||
+ | <code xml> | ||
+ | |||
+ | <rsp stat="ok"> | ||
+ | <content> | ||
+ | ... | ||
+ | </content> | ||
+ | </rsp> | ||
+ | |||
+ | </code> | ||
+ | |||
+ | And in **JSON** | ||
<code javascript> | <code javascript> | ||
- | { | + | { |
- | "geoplaces":[ | + | "stat":"ok", |
- | { | + | "content":"..." |
- | "aggregated_data":{ | + | } |
- | "nb_ad_filtered":"1452948" | + | |
- | }, | + | |
- | "havechilds":"1", | + | |
- | "id":"XA", | + | |
- | "label":"Africa", | + | |
- | "translations":{ | + | |
- | "usa":{ | + | |
- | "label":"Africa", | + | |
- | "label_propertylistings_url":"/real-estate/for-sale/africa/listings/" | + | |
- | } | + | |
- | } | + | |
- | }, | + | |
- | { | + | |
- | "aggregated_data":{ | + | |
- | "nb_ad_filtered":"411438" | + | |
- | }, | + | |
- | "havechilds":"1", | + | |
- | "id":"XE", | + | |
- | "label":"Europe", | + | |
- | "translations":{ | + | |
- | "usa":{ | + | |
- | "label":"Europe", | + | |
- | "label_propertylistings_url":"/real-estate/for-sale/europe/listings/" | + | |
- | } | + | |
- | } | + | |
- | }, | + | |
- | { | + | |
- | "aggregated_data":{ | + | |
- | "nb_ad_filtered":"28917" | + | |
- | }, | + | |
- | "havechilds":"1", | + | |
- | "id":"XI", | + | |
- | "label":"Asia", | + | |
- | "translations":{ | + | |
- | "usa":{ | + | |
- | "label":"Asia", | + | |
- | "label_propertylistings_url":"/real-estate/for-sale/asia/listings/" | + | |
- | } | + | |
- | } | + | |
- | }, | + | |
- | { | + | |
- | "aggregated_data":{ | + | |
- | "nb_ad_filtered":"177798" | + | |
- | }, | + | |
- | "havechilds":"1", | + | |
- | "id":"XN", | + | |
- | "label":"North and Central America", | + | |
- | "translations":{ | + | |
- | "usa":{ | + | |
- | "label":"North and Central America", | + | |
- | "label_propertylistings_url":"/real-estate/for-sale/north-and-central-america/listings/" | + | |
- | } | + | |
- | } | + | |
- | }, | + | |
- | { | + | |
- | "aggregated_data":{ | + | |
- | "nb_ad_filtered":"131" | + | |
- | }, | + | |
- | "havechilds":"1", | + | |
- | "id":"XO", | + | |
- | "label":"Oceania", | + | |
- | "translations":{ | + | |
- | "usa":{ | + | |
- | "label":"Oceania", | + | |
- | "label_propertylistings_url":"/real-estate/for-sale/oceania/listings/" | + | |
- | } | + | |
- | } | + | |
- | }, | + | |
- | { | + | |
- | "aggregated_data":{ | + | |
- | "nb_ad_filtered":"665" | + | |
- | }, | + | |
- | "havechilds":"1", | + | |
- | "id":"XS", | + | |
- | "label":"South America", | + | |
- | "translations":{ | + | |
- | "usa":{ | + | |
- | "label":"South America", | + | |
- | "label_propertylistings_url":"/real-estate/for-sale/south-america/listings/" | + | |
- | } | + | |
- | } | + | |
- | } | + | |
- | ], | + | |
- | "stat":"ok" | + | |
- | } | + | |
</code> | </code> |