hijam / twitcurl

Automatically exported from code.google.com/p/twitcurl
0 stars 0 forks source link

Enhancements - streaming API, JSON and SWIG .i files #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'd like to propose three enhancements:

1. Support the Streaming API. I believe this can be done via libcurl, but I
haven't tried it yet.

2. Return objects in JSON format in addition to or instead of XML. JSON is
much more compact, and quite a few modern "non-SQL" databases store objects
in JSON format, eliminating a conversion step.

3. Create SWIG ".i" files for the library. SWIG http://www.swig.org/ is a
wrapper generator. If you create interface .i files, SWIG can generate
wrapper code for nearly all higher-level languages, including Perl, PHP,
Ruby, Lisp, Scheme, Java and R.

I'm going to be working independently on 1. - I haven't had much experience
with libcurl, but I do have wrappers for Perl and R, so I don't need to
work in C/C++. I am not a C++ programmer, so I wouldn't be able to submit
patches for 2. or 3.

Original issue reported on code.google.com by zznmeb@gmail.com on 20 Jan 2010 at 6:07

GoogleCodeExporter commented 9 years ago
The 2. would be easy, afaik. I'll submit a patch sunday if I have some free 
time.

Original comment by marc31boss on 23 Mar 2012 at 10:40

GoogleCodeExporter commented 9 years ago
So, that's it: you only have to replace the xml by json in the requests URLs. 
The sample would need to be updated to use a json parser instead of xml... But 
the lib itself can be fully switched to json without issue. The real solution 
would be to let the library user choice if the client app will use xml or 
json...

Original comment by marc31boss on 25 Mar 2012 at 4:31

GoogleCodeExporter commented 9 years ago
Added support for choosing XML or JSON :)

Original comment by swatkat....@gmail.com on 7 Apr 2012 at 4:14

GoogleCodeExporter commented 9 years ago
Twitter REST API v1.1 only allows JSON format.

Also, the new version of the API introduces a few major changes. 

See:
1) https://dev.twitter.com/blog/current-status-api-v1.1
2) https://dev.twitter.com/discussions/10644

Original comment by alex.bu...@gmail.com on 13 Sep 2012 at 6:30