Main Site Documentation

Forum Rest API


#1

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
http://api.tinyclr.com/?q=forum&m=boardlist
This method will give you a list of boards on TinyCLR forum.

[line]

URL
http://api.tinyclr.com/?q=forum&m=topiclist&boardId=xx
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
http://api.tinyclr.com/?q=forum&m=msglist&topicId=xx
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.


#2

Nice!!! The bots war begins :slight_smile:


#3

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.

http://msdn.microsoft.com/en-us/data/ff478141.aspx

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


#4

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:


#5

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.


#6

@ 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.


#7

@ 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 :).


#8

Josh,

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

Thanks


#9

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


#10

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.


#11

I’ll get something up soon.


#12

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… :-[


#13

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


#14

Thank you!


#15

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.


#16

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


#17

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]


#18

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


#19

Josh, is the API still working?

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


#20

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