Extending the drupal 7 feed-aggregator module to modify the URL programmatically and add feed options

StackOverflow https://stackoverflow.com/questions/6107153

문제

I'd like to use the Drupal feed aggregator to fetch events from a web service (providing Atom, JSON, etc. access to those events). However, it allows to retrieve protected events by providing not only an API key but also signing the request.

So I'd like to know if it's easily possible to extend the aggregator module (preferably through a separate module without having to modify the aggregator module's code) in a way to process the used URL with a custom function (to add timestamp, signature etc.). Being able to add custom option fields ("API key", "Secret key" etc) would be important, too.

Right now I'm using a completely custom module which does not use a cronjob to retrieve the events, relies on the block cache, etc - the main issue of it is that it's just a block without e.g. a "view more" option.

도움이 되었습니까?

해결책

You may have more success implementing the various aggregator module hooks.

For example hook_aggregator_fetch

and the other related hooks listed on that page.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top