Forum Rest API

I would like to give you access to the forum rest API. Hopefully this will inspire you to create some kind of reader perhaps :wink:

URL

This method will give you a list of boards on TinyCLR forum.

[line]

URL

This method will give you a list of topics within a board.

Required Parameter
boardId=xx
xx is the ID of the board from the board list.

[line]

URL

This method will give you a list of messages within a topic.

Required Parameter
topicId=xx
xx is the ID of the topic from the topic list.

[line]

The following parameters apply to the [italic]topiclist[/italic] and [italic]msglist[/italic] URL calls:

page=xx
xx is the page your currently viewing. This is one by default.

limit=xx
xx is the number of results per page.
For topics this may be set anywhere from 1 to 25. By default it is 25.
For messages it can be 1 to 15. By default it is 15.

Nice!!! The bots war begins :slight_smile:

Coolness. Any chance you can OData your service so we can use from WCF Data services and linq? On the server side, you leverage the built in query syntax and ability so you donā€™t have to surface api methods, just expose the tables in the DataService with read access and you get query for free. Also things like $expand, $filer, $count, $orderby, $select, $skip, $top for free.

Such as:
http://api.tinyclr.com/Boards => All boards
http://api.tinyclr.com/Boards(ā€œDominoā€) => domino board
http://api.tinyclr.com/Boards(ā€œDominoā€)/Topics => all topics on board
http://api.tinyclr.com/Boards(ā€œDominoā€)/Topics?$filter=ID eq 32

i know nothing about what I am about to say :slight_smile:

Nice one Josh, looks awesome. Any chance we can have a non-public option, so thereā€™s some level of authentication/API Key, and then we can have a ā€œmy unreadā€ :slight_smile:

Very cool. My Panda based forum ticker will be done soon. You wonā€™t be able to reply, but you could read and see statistics of number of unread, etc.

@ William
I donā€™t foresee any plans to make it available via an OData service. This API was simple and quick to create. I may find some personal time to expand upon it and allow authentication and making posts.

@ Josh. Not trying to push a direction. But you may want to check out WCF DataServices at some point if you have not already. The point here is you get all that stuff for free without having to define custom api and the end user gets more value from it. You just map your table structure with entity framework and expose the dataservice and your done. You get query operators and the normalized namespaces for free and service methods if you need. And OAuth, but have tried that yet. So donā€™t have to reinvent the wheel for most things. MS really hit a winner on that one :).

Josh,

Can you add a last modified time field (can be unix time f.e.) to each message and topic?

Thanks

Wouter I made a change to the system. When within topiclist or msglist you can add a parameter:

dateFormat=xxx

[italic]topiclist[/italic] defaults to ā€œdatetimeā€ but it you can set it to ā€œunixtimeā€
[italic]msglist[/italic] defaults to ā€œelapsedā€ e.g. ā€œ4 days agoā€ but can be set to ā€œdatetimeā€ and ā€œunixtimeā€

Under [italic]msglist[/italic] I changed the element to

Josh,

Any chance of getting me a way to login for posts? I have a reader ready for both stand-alone & Pyxis 2 apps but Iā€™d really love to allow posts.

I had previously done a login using HTTP Post to process/account.php but it no longer seems to be executing correctly. I can set get all the threads but no acct data like unread, etc.

Iā€™ll get something up soon.

Thanks. I also fixed my side too. Seems you changed the case on a POST value and ā€¦ well ā€¦ perhaps I wasnā€™t handling cookies too wellā€¦ :-[

The stand alone client is now available [url]http://code.tinyclr.com/project/301/tinyclr-forum-client/[/url] 8)

Thank you!

Iā€™m open to suggestions for posting methods with the API. Iā€™m thinking a successful API log in returns a token. This token is passed along to make post/edit requests. Tokens expire after 15 minutes.

Thatā€™s a great idea as long as the token time is re-upped every request.

So far without reading CSS or Java (and the fact that PNGs arenā€™t supported) hereā€™s Google rendering [current work done on engine: 4hrs]

Looks to be coming along well. Canā€™t wait to see it with the image, input and buttons :slight_smile:

Josh, is the API still working?

Skewworks, all i see is an ftp server. Am i missing something?

I did a code update for the FTP awhile ago and accidentally overwrote forum instead :frowning:

Iā€™ll see if I can find the code on one of my machines this weekend