#8 Buddy-List

Challenge topics and posts from previous years, for the memories :)
5 posts Page 1 of 1
Contributors
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4389
Joined: Tue Aug 04, 2009 1:47 am

#8 Buddy-List
CodenStuff
Welcome to challenge #8

Buddy-List

Today's challenge is going to be the first of a multi part challenge involving the use of the Codenstuff API.

The challenge for today is to create something that lets a user login/connect to the API and display their friends list. The API outputs information in both Json and XML format so it can be used with all types of languages and this challenge is not restricted to any single platform so you are free to choose how you want to make this challenge, a desktop app or web application/widget.

For details on how to use the API please see this section: viewforum.php?f=226
...and specifically this topic gives details on how to get information: viewtopic.php?f=226&t=10259

You can see your unique API key (which you will need to connect to the API) in the top-right corner of that forum section as shown here:

Image

For those of you who are new to Json/XML to give you an idea of what the data looks like this is what my friend list looks like in Json format:
Code: Select all
[{"id":"871","name":"comathi","avatar":".\/download\/file.php?avatar=871_1323826793.png"},{"id":"1965","name":"Filip","avatar":"https:\/\/dl.dropbox.com\/u\/40082347\/e.png"},{"id":"56","name":"hungryhounduk","avatar":".\/download\/file.php?avatar=56_1303713835.gif"},{"id":"616","name":"Scottie1972","avatar":".\/download\/file.php?avatar=616_1355449724.jpg"}]
This is what it looks like in XML format:
Code: Select all
<cnstweets>
<id>871</id>
<name>comathi</name>
<avatar>./download/file.php?avatar=871_1323826793.png</avatar>
<id>1965</id>
<name>Filip</name>
<avatar>https://dl.dropbox.com/u/40082347/e.png</avatar>
<id>56</id>
<name>hungryhounduk</name>
<avatar>./download/file.php?avatar=56_1303713835.gif</avatar>
<id>616</id>
<name>Scottie1972</name>
<avatar>./download/file.php?avatar=616_1355449724.jpg</avatar>
</cnstweets>
The topic I mentioned above contains a VB.Net example of how to use the API in Json format so you can use that as a starting point if you wish. The example uses the dummy API so you will need to change that to use the Live API and add some type of login form then get the friends list and display it in some form.

This is how you would get a users friends list from the API url:
api/LiveAPIJsonXML.php?mode=Mates&usern ... =ABCD12345
To get it in XML:
api/LiveAPIJsonXML.php?mode=Mates&usern ... output=xml
To create a login you would use the "SelfProfile" option of the API as this outputs your account information, if you call this and get a fail message then login is incorrect but if you receive json or xml data then login is successful and you can also use the returned data to get the users color, email, post count etc.

For login:
api/LiveAPIJsonXML.php?mode=SelfProfile ... ABCD123456
You need to have friends on your list otherwise you wont get any data. If you don't have any members added as friends on your account yet then visit their profile page and click "add friend".

Requirements for this challenge:
You can use any programming language and platform to create this.
A usable entry must be submitted. If its a desktop app please upload the file, if a web app please provide link to use it.
User must be able to login and display a list of their friends.
The friends list must not simply be displayed in raw json or xml format. You have to extract the information from the data and display it in some form. A list of usernames or avatars are acceptable.


Post the entry when finished and please keep the files as you will need them for the next part of this challenge later this month.

Good luck cooll;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: #8 Buddy-List
comathi
Nothing major:
Image
Image


This file is hosted off-site.
User avatar
Skillful
Skillful Coders
Skillful Coders
Posts: 969
Joined: Tue Nov 16, 2010 10:07 am

Re: #8 Buddy-List
Skillful
My entry just in the nick of time :)
MMDC 8 - Buddy List.zip
You do not have the required permissions to view the files attached to this post.
Instead of LOL use this -
LSIBMHBIWFETALOL

Which means -
Laughing silently in between my head because it wasn't funny enough to actually laugh out loud!
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

Re: #8 Buddy-List
Filip
My entry, pretty simple though, like #comathi's:

Entry
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

Re: #8 Buddy-List
Shim
Filip wrote:
My entry, pretty simple though, like #comathi's:

Entry
looks nice

Image

better if you hide the login text box and button when showing the buddies
Find my programs on Softpedia
5 posts Page 1 of 1
Return to “Mad March Challenge Archive”