March 15, 2011

ZapB ZapB
Ant Farmer
1427 posts

Qt DevNet Web Service API

Page  
1

Hi,

Does QtDN provide a webservice API of any sort? I am asking because I was wondering if it would be interesting to you all to have either a plugin for qt-creator and/or a stand-alone app that provides access to QtDevNet.Within qt-creator, this could be integrated into “Welcome” mode or indeed appear as it’s own “Community/QtDN” mode.

I do not have any mockups or anything yet. I am just toying with the concept at present.

Thoughts/comments/flames?

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

60 replies

March 15, 2011

peppe peppe
Ant Farmer
1028 posts

It would indeed be a good idea. :-)

 Signature 

Software Engineer
KDAB (UK) Ltd., a KDAB Group company

March 15, 2011

ZapB ZapB
Ant Farmer
1427 posts

I am thinking of having updates (notifications of new posts, threads etc.) displayed directly in the app (or plugin) rather than having to wait for notification emails to arrive as one nice feature.

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

March 15, 2011

Gerolf Gerolf
Robot Herder
3254 posts

There is an API, which is used by vass’ chrome plugin.
Additionally, you have the rss feeds.

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

March 15, 2011

ZapB ZapB
Ant Farmer
1427 posts

The more I think about it, the more I think that this could be a good way to reach more people in the community – especially if done as a plugin to qt-creator. I know several users of qt-creator who do not really use QtDN. Such a plugin would provide them with a way in and provide greater visibility as well as providing a way of quickly asking for or providing help.

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

March 15, 2011

ZapB ZapB
Ant Farmer
1427 posts

Gerolf: Ah OK thanks for that. I’ll have a look at Vass’ plugin.

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

March 15, 2011

Gerolf Gerolf
Robot Herder
3254 posts

The discussion about it was in this thread [developer.qt.nokia.com]
I think, the API was described in JIRA [bugreports.qt.nokia.com]

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

March 15, 2011

ZapB ZapB
Ant Farmer
1427 posts

Thanks Gerolf. I have just read both of those and have tried the API (using browser). Now to learn how to use QJson to parse the responses and get a proof of concept example working…

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

March 15, 2011

ZapB ZapB
Ant Farmer
1427 posts

Marius if you happen to read this, is there a way to login to QtDN without scraping the various fields from the login form? Can I just submit a post request using QNAM directly? What fields are required in the post request?

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

March 28, 2011

Alexandra Alexandra
Hobby Entomologist
607 posts
ZapB wrote:
Thanks Gerolf. I have just read both of those and have tried the API (using browser). Now to learn how to use QJson to parse the responses and get a proof of concept example working…

I like the idea. :) I have been toying with the idea of some integration into the KDE Social Desktop [techbase.kde.org] resp. into the Open Collaboration Services [freedesktop.org] as well. It never really materialized though.

Currently, I am waiting for some proper documentation for the existing API from the developer who wrote it. As soon as I have that I’ll make it available on the wiki. Maybe I should nag him a bit…

If you have suggestions for improvements while you play with the API, please let us know. :)

 Signature 

*THE CAKE IS A LIE*
Web Community Manager - Qt Development Frameworks

March 28, 2011

ZapB ZapB
Ant Farmer
1427 posts

Thank you for that. I’ll look forward to seeing the docs. I’ve nto made much progress yet as I was offline last week (son’s birthday and decorating home office). I’ll post back with API extensions that would be useful as I come across them.

Thanks again!

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

April 9, 2011

ZapB ZapB
Ant Farmer
1427 posts

I have had a couple of hours ot play around with this today. Here is the result of my tinkering so far:
QtDevNet Profile Details

So far my simple test harness just uses QNAM to login to QtDN and then uses the web api described here [bugreports.qt.nokia.com] to query my profile details. The main widget is a declarative view in which I have a simple qml scene that binds to properties of a C++ Profile object.

Could I put in a request for an addition to the profile api please? It would be very useful if it also returned an entry for the total number of points in this rank. That is the total number of points required to go from Robot Herder to Dinosaur Breeder for example. This would allow me to calculate a percentage towards next level value and show that in a progress bar without the need to hard-code the rank point boundaries.

Next I will start looking at the Unread Forum Posts api and see if I can make another qml component for that. I will also add in support for profile badges. I’ll try to find some time tomorrow to make this little code available to anybody who is interested.

Eventually I would like to release a little QML based QtDevNet app for Symbian etc.

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

April 9, 2011

ZapB ZapB
Ant Farmer
1427 posts

Oh another api request…would it be possible to have the url to the profile’s avatar image returned in the profile call too please?

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

April 10, 2011

ZapB ZapB
Ant Farmer
1427 posts

If anybody is interested, you can now download my little test harness from my subversion repository. Just do:

  1. svn co https://svn.theharmers.co.uk/svn/codes/public/qtdevnetclient/trunk qtdevnetclient

Then build as normal. This project requires qjson to be available. If the compiler cannot find it then export QJSONROOT with the path to where qjson is installed and re-run qmake.

The test harness app now polls QtDN every 60 seconds for an update to your profile which is then relfected in the QML scene.

For now it is just functional. I’ll add some bling later ;-)

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

April 11, 2011

mariusg mariusg
Ant Farmer
1099 posts

Good stuff, and a QNAM login. You’re on a roll ZapB :)

ZapB wrote:
Oh another api request…would it be possible to have the url to the profile’s avatar image returned in the profile call too please?

I’ll add it to the backlog, no room in the current iteration and filling up fast for the next.

 Signature 

Project Manager - Qt Development Frameworks

April 11, 2011

ZapB ZapB
Ant Farmer
1427 posts

It was surprisingly easy – only 453 lines of code plus a little QML so far. If I get something useful going then maybe you’ll see a new user-agent string showing up in the analytics soon ;-)

  1. request.setRawHeader( "User-Agent", "ZapB's QtDevNet Client 0.1" );

When I finish the next stage I may have some more API requests as that will likely be the much easier option as opposed to scraping fragments from a complete web-page. It will result in a lighter load on the server too.

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

Page  
1

  ‹‹ [Suggestion] Remove Quota for wiki edits      Qt Ambassador Badge ››

You must log in to post a reply. Not a member yet? Register here!