Web Services API and Wiki

  11 posts   Feedicon  
Replies: 10 - Last Post: May 12, 2011 05:58
by: dengdai
showing 1 - 11 of 11
 
Posted: November 07, 2009 13:23 by Bruce Schubert
I've fallen in love with the Project Kenai Wiki features. It allows me to focus more on my project and less on website presentation. I've setup the Wiki as the home page for my CPS project (http://cps.kenai.com).

I'd like to embed the "recent forum topics" into my Wiki home page (like a default Kenai home page). I'm guessing the "recent topics" is handled in Web Services API. Can the Web Services API be used in the Wiki's?

Are there any Project Kenai sites that are leveraging the Web Services API? Is JB's World (http://jbjb.kenai.com) an example?

-- Bruce
Emxsys.com).
 
Posted: November 07, 2009 18:27 by john_brock
Hi Bruce,

You found my toy project where I have been doing a lot of work with jQuery and the Kenai API. I'm not a professional programmer so the code is probably a bit rough around the edges. It does work though.

The best way to work with the Most Recent Topics section is to actually connect to an ATOM/RSS feed on your project. Take a look at this page on your CPS project for instance:
http://kenai.com/projects/cps/forums

You'll notice that there is a feed for the most active topics across both of your forums. You can also subscribe to the feeds for the individual forums if you like.

You can also use the Kenai API for Forums and pull the most recent posts with something like jQuery
http://kenai.com/projects/kenaiapis/pages/ForumsAPI

Now the bad part. We currently don't allow iFrames in the Wiki feature on Kenai. This is done for security reasons.

I'm guessing that there is some sample code out on the Net for using jQuery to displaying an RSS feed. This could be added to your website, but not to your Wiki page.

If I come up with something, I'll add it to the JB's World project for you to learn from.

We are looking into ways to implement widgets or iFrames of a kind into the Wiki, but for now, it's not possible.

--jb
 
Posted: November 09, 2009 20:32 by Bruce Schubert
Hi John,

I started investigating the ATOM/RSS feed. That's exactly what I'm looking for. Smile
I'll try to add the feed(s) to the http://emxsys.kenai.com website. This site is an aggregate of my Kenai projects.

I managed to get a Twitter feed on there, but web programming is not my forte, so if anyone has any suggestions, I'd appreciate them. Still looking for some JavaScript. The Kenai API's docs implied https is required, so that kinda scared me off.

BTW: Congrats on 30K members and 6K projects. I'm glad to be a part of it.

Thanks for your help,
-- Bruce
 
Posted: November 09, 2009 22:19 by Bruce Schubert
I've started playing with the RSS/ATOM feed. Yahoo complained about it when I tried to subscribe to it. So I checked the RSS/ATOM feed against http://feedvalidator.org and it didn't validate. Here's what it said:

This feed does not validate.

line 17, column 36: updated must be an RFC-3339 date-time: 2009-11-08 06:11:16 UTC (5 occurrences)

<updated>2009-11-08 06:11:16 UTC</updated>


In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendation.

line 5, column 97: Self reference doesn't match document location

... ://kenai.com/projects/cps/forums.atom"/>

Source: http://kenai.com/projects/cps/forums?format=atom

1. <?xml version="1.0" encoding="UTF-8"?>
2. <feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
3. <id>tag:kenai.com,2008-01-01Hmmmprojects/cps/forums?format=atom</id>
4. <link rel="alternate" type="text/html" href="http://kenai.com/projects/cps/forums"/>
5. <link rel="self" type="application/atom+xml" href="http://kenai.com/projects/cps/forums.atom"/>
6. <title>Campbell Prediction System (emxsys.com): Most Active Topics</title>
7. <updated>2009-11-08T06:11:16Z</updated>
8. <entry>
9. <id>tag:kenai.com,2008-01-01:Topic/1931</id>
10. <published>2009-11-08T06:11:16Z</published>
11. <link rel="alternate" type="text/html" href="http://kenai.com/projects/cps/forums/forum/topics/1931-CPS-Inception-Phase-Complete"/>
12. <title>CPS Inception Phase Complete (1 posts)</title>
13. <content type="text">A lot has happened behind the scenes in the last couple of weeks. Most notably, I&apos;ve implemented the Rational Unified Process (RUP) software process and I&apos;ve dealt with the initial project management overhead. As a result, the url: CPS Wiki has undergone significant changes. The Wiki home page has been revamped: th . . .</content>
14. <author>
15. <name>Bruce Schubert</name>
16. </author>
17. <updated>2009-11-08 06:11:16 UTC</updated>
18. </entry>
...
 
Posted: November 09, 2009 22:46 by john_brock
Hmmm, interesting. I'll file a bug on that.

Note, if you go to the individual forums themselves, the feeds will validate.

Also, if you run this URL instead of the one you did:

http://kenai.com/projects/cps/forums.atom

It will fail the validation with only the UTC date error. The Self warning isn't there. I only found this because a type on my part. Wink

--jb
 
Posted: November 10, 2009 00:27 by john_brock
Hi Bruce,

I've done a little bit of work in two different areas.

One is to just create a javascript widget and display the RSS feed in it.
The other is to load the Forum feed into a treeview jQuery UI component.

The first one is done and the treeview one is coming along, but giving me a bit of problems still.

You can see both on this page.
http://jbjb.kenai.com/feeds.html
 
Posted: November 11, 2009 14:41 by Bruce Schubert
Hi John,

I used your example and managed to get a list of hyper-linked topics onto my emxsys.kenai.com news page. Its a simple list for now. I'll explore and embellish the jQuery code as time permits.

Thanks a million!
-- Bruce
 
Posted: November 11, 2009 16:08 by Bruce Schubert
Hmm, after my most recent post to the CPS forum, the RSS feed doesn't work anymore. I was really scratching my head until I tried your feeds.html page and discovered it has the same problem.

My most recent post is longer than most and has a color markup in it.

I noted your Twitter message -- I wonder if message content is somehow messing things up.

-- Bruce
 
Posted: November 11, 2009 16:48 by john_brock
It's my javascript code Bruce.

You added an 11th post. That caused it to now have a second page. My code doesn't take into account that the total topics will be more then what is provided in the first page.

I'll see if I can fix it today.
 
Posted: November 11, 2009 17:13 by john_brock
code is fixed and posted. It will just show a "page two" link at the bottom right now. That link doesn't actually take you to page two though. It will send you a json file with the content of page two though. Smile

I'll have it completed in a bit. Just wanted to get you something that worked for now.
 
Posted: November 11, 2009 18:10 by Bruce Schubert
Hi John,

I'm beginning to "See the light!" I typed in some of the specific Forum API URLs that we're using into my browser (kinda like the Web API docs suggest) and its becoming a lot more clear to me now what's going on. It's neat how you can follow the links down to the forum posts and access the message_at_html member.

If anyone else wants to follow along, here's what we're working with:
https://kenai.com/api/projects/cps/features/forum/topics

Fun stuff, but I really must get back to my main project. Wink

-- Bruce

showing 1 - 11 of 11
Replies: 10 - Last Post: May 12, 2011 05:58
by: dengdai
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close