Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 General Discussions
  #1  
Old 08-28-2014, 02:08 PM
ibeauty ibeauty is offline
 
Join Date: Jul 2010
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vBulletin 5 API Tutorial

I think that everybody here had experienced the vBulletin 5 documentation or rather its lack. I don't know if it wouldn't be cheaper to use another forum engine. Anyway I'd like to try to write some tutorial documentation on vB5 API since developers can't make even single page about this. (But they have time to answer on same question on their board over and over again).

I will gather all knowledge from this thread and publish it as an article for all of you. So if anybody knows anything about vB5 API please write it here.

I'll start.
================================================== =============
I think good place to start is here:
HTML Code:
http://www.vbulletin.com/vbcms/content.php/334-mobile-api
So far I had figure out that you can access you vB api under URL like:

HTML Code:
http://yoursite.com/api.php
or
HTML Code:
http://yoursite.com/forum/api.php
It depends if you have your forum in subfolder or direct under domains. I'll use the latter configuration.

You can call any function from /core/vb/api folder like this:

HTML Code:
http://yoursite.com/forum/api.php?api_m=classname.methodname
This is also first difference from vB4 API. In vB4 you called functions like this: classname_methodname

First thing to do is to call init function. With minimum set of parameters it looks like this:

HTML Code:
http://yoursite.com/forum/api.php?api_m=api.init&clientname=iBeauty&clientversion=0.1&platformname=iB&platformversion=0.7&uniqueid=12345
I don't know what exactly doe parameters mean. But without them you won't init api.
I don't know either why do I have generate API key in admincp.

So far I have some JSON answer. I'll write about further progress
Reply With Quote
  #2  
Old 08-29-2014, 03:02 AM
Dead Eddie's Avatar
Dead Eddie Dead Eddie is offline
 
Join Date: Apr 2004
Location: at Home...
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
I don't know what exactly doe parameters mean. But without them you won't init api.
After the class/method identifier, it's basically just metadata about your application.

Quote:
I don't know either why do I have generate API key in admincp.
Further calls to the API require an "api_sig" parameter, which is an MD5'd hash of the URL parameters, your client's public token, your client's ID, your client's secret token, and the API key. So, it's there for security.
Reply With Quote
  #3  
Old 02-20-2015, 02:16 PM
ibeauty ibeauty is offline
 
Join Date: Jul 2010
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After a long long time and some stuff done I have commited this tutorial about vBulletin API:

http://onemanstudio.pl/tutorial/vbul...-api-tutorial/

It is not covering whole subject of API and how to do certain things. But it is a good example how to start with vB5 API. All of this is thrown over the internet, so I gathered it in one place.

Later I will add to it PHP Class that interacts with vB5 API, and maybe some more tutorials how do some things with API.
Reply With Quote
2 благодарности(ей) от:
Brandon Sheley, mangoz
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:48 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06227 seconds
  • Memory Usage 2,182KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (2)post_thanks_box_bit
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete