[ECODP-dev] Fwd: [EC ODP] Menu/Languages API

Girts Niedra girts.niedra at tenforce.com
Wed Feb 6 11:39:41 UTC 2013


---------- Forwarded message ----------
From: Girts Niedra <girts.niedra at specifit.com>
Date: Wed, Feb 6, 2013 at 12:33 PM
Subject: Fwd: [EC ODP] Menu/Languages API
To: Project list for EC ODP CKAN project <ecodp-dev at lists.okfn.org>


Darwin, all.

The api still works, e.g.

http://odp.tenforce.com/open-data/api/getMainMenu/en
{"en":{"Applications":"\/open-data\/apps","Home":"\/open-data\/","Linked
Data":"\/open-data\/linked-data","Data":"\/open-data\/data","Social
Media":"\/open-data\/social"}}

http://odp.tenforce.com/open-data/api/getMainMenu/fr
{"fr":{"Accueil":"\/open-data\/","Donn\u00e9es":"\/open-data\/node\/94","Applications":"\/open-data\/apps","Donn\u00e9es
connexes":"\/open-data\/node\/78","R\u00e9seaux
sociaux":"\/open-data\/node\/83"}}

Looks like the menuapi user password changed but can get to it with admin
user.

---------- Forwarded message ----------
From: Girts Niedra <girts.niedra at specifit.com>
Date: Thu, Mar 1, 2012 at 2:15 PM
Subject: [EC ODP] Menu/Languages API
To: David Raznick <david.raznick at okfn.org>, Michael Martin <
martin at informatik.uni-leipzig.de>
Cc: Remy Van Doosselaer <remy.van.doosselaer at tenforce.com>, Erika Pauwels <
Erika.Pauwels at tenforce.com>


Hi David, Michael.

Below the details for the API to access the menus and languages.

user: menuapi
password: .aCCes5
(note the "." at start of password)

---------- Forwarded message ----------
From: Remy Van Doosselaer <remy.van.doosselaer at tenforce.com>
Date: Wed, Feb 29, 2012 at 4:11 PM
Subject: EC Data Portal API
To: Girts Niedra <girts.niedra at tenforce.com>
Cc: Erika Pauwels <Erika.Pauwels at tenforce.com>


Hi,

I developed a module that enables a basic API functionality.

At this moment, there are 3 methods available:

* getHeaderMenu(languages)
* getMainMenu(languages)
* getLanguages

The parameter 'languages' is required, otherwise a '400 Bad Request' will
be returned.
This can be one language, or a comma seperated list of 2 char language
codes.
When one of the supplied languages a) does not exist b) does exist but is
not enabled in drupal
a '400 Bad Request' will be returned.

eg:
api/getHeaderMenu/en
api/getHeaderMenu/en,nl
api/getMainMenu/fr,cs
api/getMainMenu/en,fr,cs,da

*Some example calls:*

Call:
http://ecportal.demo.ckan.org/open-data/api/getMainMenu/en
Response:
{"en":{"Home":"\/open-data\/","Data":"\/open-data\/data","Forums":"\/open-data\/forums","Linked
data":"\/open-data\/linked-data","Blogs":"\/open-data\/blogs","Applications":"\/open-data\/apps"}}

Call:
http://ecportal.demo.ckan.org/open-data/api/getMainMenu/en,lv
Response:
{"en":{"Home":"\/open-data\/","Data":"\/open-data\/data","Forums":"\/open-data\/forums","Linked
data":"\/open-data\/linked-data","Blogs":"\/open-data\/blogs","Applications":"\/open-data\/apps"},"lv":{"M\u0101jaslapa":"\/open-data\/node\/10","Dati":"\/open-data\/data","Aplik\u0101cijas":"\/open-data\/node\/11","Saist\u012btie
dati":"\/open-data\/linked-data","Blogi":"\/open-data\/forums"}}

Call:
http://ecportal.demo.ckan.org/open-data/api/getMainMenu/af
Response:
400 Bad Request. The language 'af' cannot be found.

Call
http://ecportal.demo.ckan.org/open-data/api/getHeaderMenu/en
{"en":{"Legal notice":"\/open-data\/http:\/\/ec.europa.eu
\/geninfo\/legal_notices_en.htm","Contact":"\/open-data\/mailto:
girts.niedra at tenforce.com","Search":"\/open-data\/http:\/\/ec.europa.eu
\/geninfo\/query\/search_en.html"}}


kr,
Remy

-- 
*
Remy Van Doosselaer
Software Specialist

Email: remy.van.doosselaer at tenforce.com <wim.meeus at tenforce.com>
Phone: +32 (0)16 31 48 60
 Mobile: +32 (0)473 39 19 23


*



-- 
__________________________________________
Girts Niedra
Senior Project Manager
cell phone (BE): +32493073236
cell phone (LV): +37129169608




-- 
__________________________________________
Girts Niedra
Senior Project Manager
cell phone (BE): +32493073236
cell phone (LV): +37129169608



-- 
*Girts Niedra*
*Senior Project Manager*

Email: girts.niedra at tenforce.com
Mobile: +32 (0)493 07 32 36
Web: http://www.tenforce.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.okfn.org/mailman/private/ecodp-dev/attachments/20130206/570d1717/attachment.html>


More information about the ecodp-dev mailing list