0

OK, im not sure if there is going to be excitement by this but: First C# app using the API.

Note this is a quick 10 minute job. No error checking, no nothing. Completely alpha. Just a point of concept showing compatibility between the API and C#

Simply introduce a members name and it will print out his post number.

Since the DaniWeb team wont fix the Firefox bug where I cannot see the file dialog box, Ill upload this to Mega.

https://mega.co.nz/#!5JBAhIiD!SogpRGEczT7rKuZkprVG-xWEvehOir_e0x_3wLwvjcw

Simply, extract the folder anywhere and run the exe.

0

BTW, if someone wants the source code, Ill put it up as well with some comments :) although its very sloppy :P

Edited by riahc3

0

So the program doesnt explode because someone tries putting stupid stuff, Ive barred spaces so "Nick Evan" for example does not work.

0

So the program doesnt explode because someone tries putting stupid stuff, Ive barred spaces so "Nick Evan" for example does not work.

Just URL encode the username. I fixed the bug where that was broken before.

Since the DaniWeb team wont fix the Firefox bug where I cannot see the file dialog box, Ill upload this to Mega.

You're confusing "won't" with "have no clue what's wrong". You say that it suddenly stopped working one day, but I made absolutely no code changes that could possibly have affected anything. I really am not sure at all what's wrong. Try disabling all Firefox plugins. Maybe one of your plugins/extensions is conflicting??

0

Avatars - if user has a gravatar, I think the avatar field returns empty.

It should return their Gravatar. I'll check on this in a bit.

0

Just URL encode the username. I fixed the bug where that was broken before.

As I mentioned it is a demo app; Not really useful for anything but shows that the API is also working with a desktop client.

You're confusing "won't" with "have no clue what's wrong". You say that it suddenly stopped working one day, but I made absolutely no code changes that could possibly have affected anything. I really am not sure at all what's wrong. Try disabling all Firefox plugins. Maybe one of your plugins/extensions is conflicting??

A extension is the only thing that could be causing it but it works on other pages with a similar system (hides dialog then shows)

2

OK, here's a simple card battle game from the API:

http://dw.diafol.org/dwcard.php

It's still a prototype, but it works after a fashion. BTW - when it's the CPUs turn - it plays really quickly! Webkit browsers work best as it uses CSS3 grayscale (loser). Havent' developed it further for other browsers yet.

Votes + Comments
Nice job :)
1

Oh awesome :) Still have a lot of work to do on the API, but when I'm done, I'm going to work on creating some type of directory of all of the API apps that everyone writes.

1

Oh awesome :)

Hah, it's my first ever game - so bit of a learning curve. ANyway, here's a screenshot of the opening salvo:

Screenshot_4

The Stars:

'Dani', 'happygeek', 'Ancient Dragon', 'crunchie', '~s.o.s~', 'pritaeas', 'diafol', 'vegaseat', 'Narue', 'deceptikon','salem','nick evan','peter_budo','ezzaral','JamesCherrill','WaltP','jbennet','__avd','caperjack','VernonDozier','pyTony','NormR1'

Apologies to those I left out, or maybe apologies to those I included!

BTW - if you get 'Ancient Dragon' in your hand, you've got a good chance!

The ability to extract multiple users' data in one call would speed things up immeasurably.

Edited by diafol

1

The ability to extract multiple users' data in one call would speed things up immeasurably.

Working on it :) Trying to balance figuring out how to streamline the backend and still make it RESTful.

0

Hmm. I was looking at an urlencoded array like this:

?id%5B%5D=one&id%5B%5D=two&id%5B%5D=three

To make it easy for GET form submitted data, but further reading suggests a comma separated list:

?id=one,two,three
2

You can now fetch multiple members by ID #. You can also fetch a list of all members who recently logged in.

Votes + Comments
awesome!
0

riahc, I can't run your program because it says I don't have the latest version of .NET. Plus, I'm on a mac.

0

The multiple members works on id numbers:

http://www.daniweb.com/api/members?ids=120589,1 (diafol, Dani)

However, couldn't get the similar for usernames (usernames= or ids=) - or perhaps this isn't implemented?

Anyway, got the member ids from the stats page. The load time now is about 1.5 seconds compared to about 4+ before - so GREATT!

//EDIT
gravatar seems to be working now. :)

Edited by diafol

0

How often is the RSS feed updated? There seems to be a discrepency between the lastest post on the RSS and the forum. I was hoping to use it (rss api) to keep track of new posts as and when they appear.

0

RSS feeds and API calls are cached hourly.

That is neat. It's like you created a mini stock market ticker for Daniweb.

What's the purpose of the secert key?

Does it change everytime I sign in?

It's seems like it.

0

riahc, I can't run your program because it says I don't have the latest version of .NET. Plus, I'm on a mac.

Here are screenshots of riahc's C# application:

main_window

postcount_dialog

0

What's the purpose of the secert key?

It's for OAuth 2.0. It allows someone to write an application that gains access to your account, without requiring you to tell them your login information / password.

1

Super sorry! Have been working on it like crazy and accidently breaking things in the process it seems :(

On another note: While results are heavily cached, you can now retrieve uncached results by passing in an access token.

Votes + Comments
You work too much, do you ever sleep? :D
2

OK - got an live-ish update box (no auth):

Updates every minute, but has manual update button. You can choose 1-25 records to show, any forum (1 at a time though). Display allows you to go to first or last post (links), also keys for some posts. You can enter your own id# to look at "I'm in there" posts. 'Time ago' displayed (s secs, m mins h hours etc etc ).

http://dw.diafol.org/daniupdate.php

dwu2

Edited by diafol

Votes + Comments
Awesome :)
Cool! :)
0

You can use the following API call to dynamically generate a nested list of forums instead of hard coding it in:

Good to know (I just copied the source from main page - that's cheating!)

I tried typing my USERID in and it didn't do anything specific to me??

No it just highlights any threads you've added to with an asterisk: like so -

Screenshot_61

Notice the asterisks (you've relied to the first 4, but not the 5th.)

1

Oh, I see.

What you can do for members instead is fetch their latest X posts and display the threads they are from:

http://www.daniweb.com/api/members/1/posts

(Just an idea)

REALLY happy to see people playing with the API though. I've spent a lot of time on it this past week!!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.