Hi John, tanks for commit this.
After read your comments I start some improves in youtube module, and now I have another patch :), with some improves like a config screen.
And I already think in another improves to do in this module and I will do this in the next days.
Thanks
Renato FilhoOn 9/2/07, John Stowers < john stowers gmail com> wrote:On 9/2/07, Renato Araujo <renatox gmail com> wrote:Hi all,
After some talk in conduit irc channel I decided start my first dataprovider for study the conduit api.
I wold like submit my provider for you, to give me some feedbacks and talk about this.
Thanks. I committed the dp because it works, and is usable even at this early stage. Well done!My first module synchronize is the youtube most watched videos of the day.
The natural extension to this would be to provide a configuration dialog to allow the user to select between
* n number of most watched vids
* n new vids
* vids posted by a certain user
* etcFirst I start read the the tutorial about "create a writing A custom dataProvider" on wiki page, after this I copy the FeedModule and start my module, I fond some differences between the implementation and the tutorial.
This is my question: In the method "get", this receive the string LUID, generate by "get_all" method, in the tutorial you use the "get_num_items" to get the total of items and pass the integer index to method "get". What is the correct way to do this, or both are correct?
Your implementation is correct, the docs were out of date. I have now updated them and also updated the ExampleModule dataprovider in the help directory.
Basically get_num_items is no longer compulsory, get_all should return a list of UIDs, and get then accepts the UIDs returned by get_all.
Style wise I like to have private functions prefixed with _, eg
extract_video_url -> _extract_video_url
Also, see the discussion about selection of UID for the dataprovider ( http://www.conduit-project.org/wiki/WritingADataProvider), i.e. it should not be too closely tied to the dp configuration
Welcome to conduit!
JohnBR
Renato Filho
_______________________________________________
Conduit-list mailing list
Conduit-list gnome org
http://mail.gnome.org/mailman/listinfo/conduit-list