Quantcast
Download
(22 Kb)
Download
Updated: 12-13-18 11:04 PM
Pictures
File Info
Compatibility:
Tides of Vengeance (8.1)
Battle for Azeroth (8.0.1)
Updated:12-13-18 11:04 PM
Created:11-12-18 11:14 PM
Downloads:33
Favorites:2
MD5:
8.1

MooInspect-1.0  Updated less than 3 days ago!

Version: 3
by: jlam [More]

Overview

MooInspect-1.0 is a library that provides an API for asynchronous inspection of unit specialization, talents, and equipment.

The native API for asynchronous inspection uses NotifyInspect for an inspection request and waiting for the INSPECT_READY event to indicate the inspection data is available. However the server will drop all inspection requests originating from the account if too many requests are initiated in too short a period of time.

MooInspect-1.0 limits the frequency of calls to NotifyInspect and keeps a queue of pending inspection requests to send to the server while out of combat. When the inspection data from a request becomes available, the message [MooInspect_InspectReady]([project]inspectready[/project]) is fired.

API Methods

QueueInspect

Queues an inspection request for a GUID.

Code:
lib:QueueInspect(guid)
Arguments:
  • guid - string: GUID
CancelInspect

Cancels any pending inspection request for a GUID.

Code:
lib:CancelInspect(guid)
Arguments:
  • guid - string: GUID
GetInspectAge

Returns the number of seconds since the inspection data for a GUID was received from the server. If no inspection data has ever been received, then this returns nil.

Code:
age = lib:GetInspectAge(guid)
Arguments:
  • guid - string: GUID
Returns:
  • age - number or nil: seconds since the data was received
RegisterCallback

Registers a function to handle the specified callback.

Code:
lib.RegisterCallback(handler, callback, method, arg)
Arguments:
  • handler - table/string: your addon object or another table containing a function at handler[method], or a string identifying your addon
  • callback - string: the name of the callback to be registered
  • method - string/function/nil: a key into the handler table, or a function to be called, or nil if handler is a table and a function exists at handler[callback]
  • arg - a value to be passed as the first argument to the callback function specified by method
Notes:
  • If handler is a table, method is a string, and handler[method] is a function, then that function will be called with handler as its first argument, followed by the callback name and the callback-specific arguments.
  • If handler is a table, method is nil, and handler[callback] is a function, then that function will be called with handler as its first argument, followed by the callback name and the callback-specific arguments.
  • If handler is a string and method is a function, then that function will be called with the callback name as its first argument, followed by the callback-specific arguments.
  • If arg is non-nil, then it will be passed to the specified function. If handler is a table, then arg will be passed as the second argument, pushing the callback name to the third position. Otherwise, arg will be passed as the first argument.
UnregisterCallback

Unregisters a specified callback.

Code:
lib.UnregisterCallback(handler, callback)
Arguments:
  • handler - table/string: your addon object or a string identifying your addon
  • callback - string: the name of the callback to be unregistered
Callbacks

MooInspect-1.0 provides the following callbacks to notify interested addons.

MooInspect_InspectReady

Fires when the inspection data for a GUID is available for talent and equipment queries.

Arguments:
  • guid - string: GUID
License

MooInspect-1.0 is released under the 2-clause BSD license.

Feedback

MooInspect-1.0
3 (2018-12-14)
Full Changelog Previous releases
  • Bump minor version to 3 for release.
  • Bump TOC interface for BfA 8.1.
Optional Files (0)


Archived Files (2)
File Name
Version
Size
Author
Date
2
21kB
jlam
11-25-18 08:11 PM
1
21kB
jlam
11-12-18 11:14 PM


There have been no comments posted to this file.
Be the first to add one.



Category Jump: