Busy weekend for you :) Really great iniciative, with APIs I guess this is already more competitive than twitter. If you would also enable/document the Jabber based push delivery of presence...
Having a look at your API with a mash-up scenario in mind, I have a couple of comments/suggestions regarding the user feed, the one you can get through $user.jaiku.com/feed/(json|rss|atom)
1 - from within the RSS feed, an original Jaiku entry is hardly distinguishable from a post reprinted from an external RSS feed that is aggregated. The only way I found to achieve this is to check the presence or lack of a Jaiku:Location elements but I'm unsure is this method works in every situation
2 - the item contains a jaiku:comment element providing basically just a coutn attribute. Where do I get the comments attached to a given entry?
3 - the usage of CDATA chuncks will make the thingy more difficult to parse and to reuse in mash-ups
I'm writing a routine to consume the public feed using json but I'm running into a problem with an escaped character that I don't think should be escaped.
The short form of my question is this: I got the following as a string value:
"title":"I\'m taking a ride on the pillow train.",
and my parser is stoppiing on the \' which according to http://json.org/ is not in the list of characters that need escaping.
Is there some other place I can send questions to you about errors? A mailing list or dev group?
CLaueR, 1. good point, i'll make sure that gets added to the feeds, 2. you'll be able to get them at $user.jaiku.com/presence/$id/(json|atom) pretty soon, 3. i'll see what we can do to eliminate them
bear, i think our attempt to make sure that the double-quotes don't get broken we went a little overboard
re a mailing list or dev group, we have a little bit of an idea about maybe integrating jaiku with our internal bug tracker so that we can associate posts/comments with bugs, additionally a devku group is just around the corner which is probably the easiest place to post bugs once we get there
I'm probably just stupid and messed something up after testing, I'll take a look at it and at getting a devku group running in a couple minutes now that I have an inflated sense of power due to the site handling more traffic
php seems against having the ; at the end, against our poorly defined headers that theoretically tell the stuff to be utf-8, and against our excessive escaping, gonna see if i can get juha to fix it in the morning
mastermaq: you shouldn't be using a string value, but rather the xmlrpc type for dictionary (or associative array in php world, or hash in perl), most libraries will automatically convert it for you like IXR or xmlrpclib
(Perhaps a more relevant error message would be good!)
So like this right?
<?xml version="1.0"?>
<methodCall>
<methodName>presence.send</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>message</name>
<value>
<string>testing!</string>
</value>
</member>
<member>
<name>username</name>
<value>
<string>mastermaq</string>
</value>
</member>
<member>
<name>personal_key</name>
<value>
<string>xxxxxxx</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
Still no dice. I am using the XML-RPC.NET library from http://www.xml-rpc.net/
19 comments so far
hahah!
2 years, 10 months ago by bwana
Busy weekend for you :) Really great iniciative, with APIs I guess this is already more competitive than twitter. If you would also enable/document the Jabber based push delivery of presence...
2 years, 10 months ago by erix
heh heh.
2 years, 10 months ago by cervus
Hi,
Having a look at your API with a mash-up scenario in mind, I have a couple of comments/suggestions regarding the user feed, the one you can get through $user.jaiku.com/feed/(json|rss|atom)
1 - from within the RSS feed, an original Jaiku entry is hardly distinguishable from a post reprinted from an external RSS feed that is aggregated. The only way I found to achieve this is to check the presence or lack of a Jaiku:Location elements but I'm unsure is this method works in every situation
2 - the item contains a jaiku:comment element providing basically just a coutn attribute. Where do I get the comments attached to a given entry?
3 - the usage of CDATA chuncks will make the thingy more difficult to parse and to reuse in mash-ups
That's basically all for today ;)
Regards, /CL
2 years, 10 months ago by CLaueR
Hi,
I'm writing a routine to consume the public feed using json but I'm running into a problem with an escaped character that I don't think should be escaped.
The short form of my question is this: I got the following as a string value:
and my parser is stoppiing on the \' which according to http://json.org/ is not in the list of characters that need escaping.
Is there some other place I can send questions to you about errors? A mailing list or dev group?
thanks!
2 years, 10 months ago by bear
CLaueR, 1. good point, i'll make sure that gets added to the feeds, 2. you'll be able to get them at $user.jaiku.com/presence/$id/(json|atom) pretty soon, 3. i'll see what we can do to eliminate them
bear, i think our attempt to make sure that the double-quotes don't get broken we went a little overboard
re a mailing list or dev group, we have a little bit of an idea about maybe integrating jaiku with our internal bug tracker so that we can associate posts/comments with bugs, additionally a devku group is just around the corner which is probably the easiest place to post bugs once we get there
2 years, 10 months ago by devku
thanks for the update. a dev list/group would be very nice - let me know when it's ready. I'll continue testing when you've pushed the json changes.
2 years, 10 months ago by bear
I'm having issues with decoding the JSON strings given out by Jaiku. It seems PHP5 json_decode() always gets only NULL out of them.
Probably some syntax error in the JSON?
2 years, 10 months ago by bergie
I'm probably just stupid and messed something up after testing, I'll take a look at it and at getting a devku group running in a couple minutes now that I have an inflated sense of power due to the site handling more traffic
2 years, 10 months ago by devku
php seems against having the ; at the end, against our poorly defined headers that theoretically tell the stuff to be utf-8, and against our excessive escaping, gonna see if i can get juha to fix it in the morning
2 years, 10 months ago by termie
wooo - much thanks for the response on this item
2 years, 10 months ago by bear
It looks like Juha fixed a bunch of the JSON feed bits, give it another try and let us know about any errors.
2 years, 10 months ago by termie
Looking good!
My bot was able to poll the public feed using json - great fix, thanks!
oh crap - now I have to finish this feature ;)
2 years, 10 months ago by bear
Any idea when the XMLRPC endpoint will be up and running? All I get right now is:
"Dealing with some load, our apologies, we're feverishly working on it."
It has said that for days!
2 years, 10 months ago by mastermaq
it's been working, the quicksilver plugin uses it, what sort of information are you trying to send, you may be finding a bug
2 years, 10 months ago by termie
Here's what I am sending (using the actual personal_key of course):
<?xml version="1.0"?> <methodCall> <methodName>presence.send</methodName> <params> <param> <value> <string>{"username":"mastermaq","personal_key":"xxxxxx","message":"Testing!"}</string> </value> </param> </params> </methodCall>
In return, all I get back is the message I posted above, not wrapped in XML or anything.
2 years, 10 months ago by mastermaq
The JSON feeds are now working nicely with PHP. Midgard is finally able to import and display Jaiku presence information.
That means a good bye to Twitter :-)
2 years, 10 months ago by bergie
bergie: Glad we got it working for you
mastermaq: you shouldn't be using a string value, but rather the xmlrpc type for dictionary (or associative array in php world, or hash in perl), most libraries will automatically convert it for you like IXR or xmlrpclib
2 years, 10 months ago by termie
(Perhaps a more relevant error message would be good!) So like this right? <?xml version="1.0"?> <methodCall> <methodName>presence.send</methodName> <params> <param> <value> <struct> <member> <name>message</name> <value> <string>testing!</string> </value> </member> <member> <name>username</name> <value> <string>mastermaq</string> </value> </member> <member> <name>personal_key</name> <value> <string>xxxxxxx</string> </value> </member> </struct> </value> </param> </params> </methodCall> Still no dice. I am using the XML-RPC.NET library from http://www.xml-rpc.net/
2 years, 9 months ago by mastermaq