Member Avatar for diafol

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

Ive actually got something small working as a desktop client :) Posting in a bit...

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.

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

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

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??

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.

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)

Member Avatar for diafol

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.

commented: Nice job :) +0

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.

Member Avatar for diafol

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.

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.

Member Avatar for diafol

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

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

commented: 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.

Member Avatar for diafol

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

Member Avatar for diafol

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.

RSS feeds and API calls are cached hourly.

Member Avatar for LastMitch

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.

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

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.

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.

commented: You work too much, do you ever sleep? :D +0

Fixed. It was a URL routing error. Oopsies.

Member Avatar for diafol

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

commented: Cool! :) +0
commented: Awesome :) +0
Member Avatar for diafol

Now I can peruse and moderate without losing out on new posts (old style frame):

<!DOCTYPE HTML>
<html>
<frameset cols="*,340">
  <frame src="http://www.daniweb.com">
  <frame src="http://www.dw.diafol.org/daniupdate.php">
</frameset>
</html>

That's horrible! ALthough thinking about a chrome extension, but that's a way off.

Screenshot_51

Member Avatar for diafol

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

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!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.