Difference between revisions of "API"

From Mibbit Wiki
Jump to: navigation, search
(Using the API: example added)
m (Using the API)
Line 25: Line 25:
  
 
For example:
 
For example:
<span>There are <script src="http://api.mibbit.com/293847...928374.js"></script> people chatting</span> , see also [http://irc.mibbit.com/public/api-demo.htm api-demo]
+
<span>There are <script src="http://api.mibbit.com/293847...928374.js"></script> people chatting</span> , see also the example: [http://irc.mibbit.com/pub/api-demo.htm api-demo]
  
  
Line 40: Line 40:
  
 
{{notice|These are all updated every 20 minutes, so should give you a reasonable idea of how many mibbitians are chatting.}}
 
{{notice|These are all updated every 20 minutes, so should give you a reasonable idea of how many mibbitians are chatting.}}
 
You can see an example on http://irc.mibbit.com/pub/api-demo.htm
 
  
 
== Request a Feature ==
 
== Request a Feature ==

Revision as of 11:42, 13 April 2009

How many people are using my widget?

If you run a site, and are using the widget, you might want to show elsewhere on your site how many people are using it. Well now you can do that easily.

First thing you need, is the settingsID. This is in the widget URL you are using.

For example: widget.mibbit.com/?settings=8e1a347b68236d6b49c4e3f763abf46d&channel=%23mibbit

The section in bold is your settingsID

Just replace (settingsID) with your particular ID.

Using the API

The link below outputs just the number of mibbitians using your widget. You could use this from PHP,Python,etc and get it to output in the page.

http://api.mibbit.com/(settingsID)


This one outputs a snippet of javascript which will write to the document the current number. So you can include this in your HTML, without any backend changes needed.

http://api.mibbit.com/(settingsID).js

For example: There are <script src="http://api.mibbit.com/293847...928374.js"></script> people chatting , see also the example: api-demo


You might prefer to use this link, it’s likely that later on this one will contain more useful info as well.

http://api.mibbit.com/(settingsID).json


There are also a couple of graphs updated at

http://api.mibbit.com/graphs/(settingsID)_week_mini.png

http://api.mibbit.com/graphs/(settingsID)_month_mini.png

These are all updated every 20 minutes, so should give you a reasonable idea of how many mibbitians are chatting.

Request a Feature

New API features are in the works, and this page will be updated when they are available.

For any feature requests for the new API, ask at #help on irc.mibbit.net or add them to the WishList