creddit/libreddit
stoicism2323 5aea848c68 Fix bug with 'L' key not working. Fix up/down to just report score 2016-07-23 13:49:21 -07:00
..
README.md libreddit: Strip unneeded symbols 2013-10-04 11:05:24 -04:00
comment.c update date display in comment to grab UTC time from the reddit api 2016-04-26 15:25:18 -07:00
comment.h Change functions and variables into camel-case 2013-09-22 01:21:56 -04:00
cookie.c libreddit: Use GCC visibility attribute extension 2013-10-06 16:46:07 -04:00
cookie.h Initial commit of completely redone reddit API 2013-09-22 01:21:35 -04:00
global.c creddit: libreddit: Project-wide debug option 2013-10-31 22:45:28 -04:00
global.h libreddit: Unify the specification of the version number 2013-11-15 20:17:09 -05:00
jsmn.LICENSE Initial commit of completely redone reddit API 2013-09-22 01:21:35 -04:00
jsmn.c Initial commit of completely redone reddit API 2013-09-22 01:21:35 -04:00
jsmn.h Give API wide-character support, and implement it in cReddit 2013-09-22 01:21:57 -04:00
libreddit.mk Merge pull request #59 from DSMan195276/small-fixes 2013-11-16 09:46:38 -08:00
link.c Fix bug with 'L' key not working. Fix up/down to just report score 2016-07-23 13:49:21 -07:00
link.h Change functions and variables into camel-case 2013-09-22 01:21:56 -04:00
state.c creddit: libreddit: Move UserAgent string into RedditState 2013-10-25 07:09:03 -04:00
state.h Initial commit of completely redone reddit API 2013-09-22 01:21:35 -04:00
subreddit.c Initial commit of completely redone reddit API 2013-09-22 01:21:35 -04:00
subreddit.h Initial commit of completely redone reddit API 2013-09-22 01:21:35 -04:00
token.c Fix bug with 'L' key not working. Fix up/down to just report score 2016-07-23 13:49:21 -07:00
token.h update date display in comment to grab UTC time from the reddit api 2016-04-26 15:25:18 -07:00
user.c libreddit: Move Reddit.com strings into constants 2013-11-01 15:50:10 -04:00
user.h Change functions and variables into camel-case 2013-09-22 01:21:56 -04:00

README.md

libreddit

libreddit is a sub-project of cReddit, whose focus is to create a library written in C which is compliant with the Reddit API.

Current, the library uses libcurl for handling the networking, and libjsmn (Modified, and compiled in directly) as well as some internal tools to parse the JSON objects.

API

The full exposed API is in ../include/reddit.h. This file contains all the structures for each type of object Reddit uses, and good info on how to use them.

Known FIXMEs and TODOs

  • token.c:

    curl hangs if you don't have a internet connection, meaning libreddit will hang indefinitely if you're not connected to the internet. It is probably because we're using the 'curl_easy' functions. Making sure that libreddit doesn't wait forever on a broken connection will probably require a bit more advanced curl usage, but shouldn't be very hard since only one function has to be modified.

  • comment.c:

    The 'morechildren' API call is currently broken, needs to be updated to match the format of a morechildren JSON response (Which is different from a normal comment request reqponse).

  • subreddit.c:

    There's currently nothing in this file. Ideally, it should have a few functions that return info on a subreddit (like link.c, comment.c, etc...)

  • state.c:

    The redditStateSet and redditStateGet setup to keep an internal state going is convient and works well, but it's not thread-safe. Whether or not this should be a concern or a focus should be consitered.