vForums Support > System Improvements :: Suggestions :: Implemented Suggestions :: > I Can Haz API Plz?

I Can Haz API Plz? - Posted By Paddy (artemis) on 11th Feb 08 at 2:09am
Look at all the big ProBoards sites. Almost all of them have an independently hosted website attached.

I think offering a VForums API would really set VForums apart from its competitors. You've already established yourself as a coder friendly host- heighten that.

~Artemis

Re: I Can Haz API Plz? - Posted By Michael (wrighty) on 11th Feb 08 at 2:14am
There is already a code that allows people to show the login box on their sites..

Perhaps I'll make a code that will show other things off site.. {Unsure}

If Ross lets me...


What sort of things would you like it to have?

Re: I Can Haz API Plz? - Posted By Paddy (artemis) on 11th Feb 08 at 2:19am
Let me check if a person is logged in or not.

Let me extract information about their profile.

Let me pull post information.

An RSS feed for each board, for the forum, and for the members would be nice, too.

~Artemis

Re: I Can Haz API Plz? - Posted By Michael (wrighty) on 11th Feb 08 at 2:22am
well doing some of this will lead to security problems...

RSS feed for each board... To show what? {Smile}

What sort of info are you hoping to extract from profiles?

I'm currently running a code on my forum that extracts usernames, displaynames & usergroups .. (just as a test).

I doubt it'll be that hard to do if you want it, it's just a matter of Ross allowingit.

Chances are that it will be added on as an additional code. {Unsure}

Re: I Can Haz API Plz? - Posted By Marc (cr0w) on 11th Feb 08 at 2:35am
I'm not sure if Ross is still planning on this, but he was working on making XML files that grab information about the forum. He had a test one for PM's a while back, but I'm not sure if anything more was done.

Re: I Can Haz API Plz? - Posted By Paddy (artemis) on 11th Feb 08 at 2:38am
The RSS feed idea is actually unrelated, but I thought of it as typing. Basically, just the thread title and a sampling of the thread content.

The profiles, I'd like to be able to verify a user is logged in by passing a username and password, get a user's rank by passing a username, get user's displayname by passing a username, get a list of links (and subjects) for the [x] latest posts in a board, etc.

Basically, things to help integrate with a CMS. If you guys did that, you'd be a step ahead of everyone else.

And I don't think security problems are that much of an issue- require the main admin password to use the API, and you're pretty much set, unless the server gets compromised, in which case, it's the user's fault and problem, not yours.

I think the bigger issue would be revenue-- you don't get any money, directly, from this. Maybe only allowing use of the API on pages that display your ads?

~Artemis

Re: I Can Haz API Plz? - Posted By Michael (wrighty) on 11th Feb 08 at 2:43am
 
The profiles, I'd like to be able to verify a user is logged in by passing a username and password.

- Expand on this one... {Unsure}

 
get a user's rank by passing a username,

- With my affore mentioned code, this will be possible! {Smile}

 
get user's displayname by passing a username,

- With my affore mentioned code, this will be possible! {Smile}

 
get a list of links (and subjects) for the [x] latest posts in a board, etc.

- Wouldn't be too hard to integrate.



Only way my code would work unfortunately would be for someone to view the page to update the database. Until I works out how to automatically do it! {Unsure}

Re: I Can Haz API Plz? - Posted By Paddy (artemis) on 11th Feb 08 at 2:47am
... Which means it isn't quite a true API, huh? XD

You could do it with cron and lynx, but it'd get your server banned...

As for the username/password verification, the idea would be that I could call check_virtualf_forums.vforums_login('admin', 'mypassword'); and it would either return true or false, depending on whether that's the right login.

~Artemis

Re: I Can Haz API Plz? - Posted By Ross (admin) on 11th Feb 08 at 9:26am
RSS Feeds for boards will be implemented at some point in the future. However I cannot give exact timescales for that right now.

For the other parts, they are something I had thought about (which is why there's the login box from the FAQ, although that is only JS based). If these things like X most recent posts in a board/profile info were implemented, then would you be wanting that to be accessed via JS or through a PHP request? I'm happy to code a system which will allow either. But as touched upon, there would need to be limitations so that the user would still have to visit the forum itself.

Re: I Can Haz API Plz? - Posted By Paddy (artemis) on 11th Feb 08 at 11:00pm
I would find them more useful as a PHP interface, but I'm sure that there are those who would rather a JavaScript one. As long as it has some documentation to it, I'd be happy with either. ^_^

~Artemis

Re: I Can Haz API Plz? - Posted By Ross (admin) on 11th Feb 08 at 11:02pm
I'll see what can be done {Smile}

Re: I Can Haz API Plz? - Posted By Paddy (artemis) on 11th Feb 08 at 11:05pm


~Artemis

Re: I Can Haz API Plz? - Posted By Ross (admin) on 12th Feb 08 at 1:22am
Based on how I got on with this tonight, a basic beta version of a recent posts API shouldn't take too long to implement. Profile data may take a little longer though but will still be possible. I'm still not entirely sure on how to limit server usage so that will require a little more thought.

One idea I did have though (and this is just as a thought and by no means will be implemented) was to give each forum a set number of requests they could make per month. If the forum were to exceed this number then credits could be applied to increase it. Just wondering on everyones thoughts about this?

Re: I Can Haz API Plz? - Posted By Marc (cr0w) on 12th Feb 08 at 1:50am
 
Based on how I got on with this tonight, a basic beta version of a recent posts API shouldn't take too long to implement. Profile data may take a little longer though but will still be possible. I'm still not entirely sure on how to limit server usage so that will require a little more thought.

One idea I did have though (and this is just as a thought and by no means will be implemented) was to give each forum a set number of requests they could make per month. If the forum were to exceed this number then credits could be applied to increase it. Just wondering on everyones thoughts about this?


Smart, I'm fine with that. {Smile}

Re: I Can Haz API Plz? - Posted By Michael (wrighty) on 12th Feb 08 at 1:52am
 
Based on how I got on with this tonight, a basic beta version of a recent posts API shouldn't take too long to implement. Profile data may take a little longer though but will still be possible. I'm still not entirely sure on how to limit server usage so that will require a little more thought.

One idea I did have though (and this is just as a thought and by no means will be implemented) was to give each forum a set number of requests they could make per month. If the forum were to exceed this number then credits could be applied to increase it. Just wondering on everyones thoughts about this?


Love the idea! ^_^

Re: I Can Haz API Plz? - Posted By Paddy (artemis) on 12th Feb 08 at 3:26am
I would be more inclined to require the page utilizing an API feature (or the entire website itself) to display the ads of vForums' AdSense - which would, I believe, be the same as logging in to the forum. xD

Just my two cents.

~Artemis

Re: I Can Haz API Plz? - Posted By Marc (cr0w) on 12th Feb 08 at 3:50am
 
I would be more inclined to require the page utilizing an API feature (or the entire website itself) to display the ads of vForums' AdSense - which would, I believe, be the same as logging in to the forum. xD

Just my two cents.

~Artemis


I believe something like this is against the AdSense ToS. {Unsure}

Re: I Can Haz API Plz? - Posted By Paddy (artemis) on 12th Feb 08 at 4:02am
 
 
I would be more inclined to require the page utilizing an API feature (or the entire website itself) to display the ads of vForums' AdSense - which would, I believe, be the same as logging in to the forum. xD

Just my two cents.

~Artemis


I believe something like this is against the AdSense ToS. {Unsure}


Nope, AdSense TOS states that you may put your banner on other sites, with permission.

There are actually (generally review/writing) sites that allow users to supply their AdSense key, and have that person's ads display on their page after they get a certain amount of hits, etc.

~Artemis

Re: I Can Haz API Plz? - Posted By Ross (admin) on 12th Feb 08 at 10:19am
I suppose both options could be implemented, either showing ads or using a paid ad free option. As you say, it'd be the same as if you were to view the forum.

Re: I Can Haz API Plz? - Posted By Paddy (artemis) on 12th Feb 08 at 2:17pm
*dances*

Yay!

~Artemis