WoW:API GetNumLFGResults: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(part of a API redesign proposal, please don't change the layout for the next few days)
 
m (Move page script moved page API GetNumLFGResults to API GetNumLFGResults without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{wowapi}}__NOTOC__
<noinclude>{{wowapi}} {{removedapi|3.3}} __NOTOC__</noinclude>Returns the number of results for a preceding LFG query<noinclude>
Returns a list of available refresh rates
  count = GetNumLFGResults()
  refreshrate1, refreshrate2, refreshrate3, ... = GetRefreshRates([resolution])


===Takes===
===Takes===
: Number resolution (optional)
:{{User:Zelgadis/var_decl|Nothing| | }}
:: Index of the resolution you want to get the refresh rates for. Must be an index returned by [[API_GetScreenResolutions|GetScreenResolutions()]].
:: Passing <tt>nil</tt> defaults this argument to 1, the lowest resolution available.


===Returns===
===Returns===
: Number refreshrateN
:{{User:Zelgadis/var_decl|Number|count| }}
:: Value of the Nth refresh rate
:: Contains the number of results


===Example===
===Events===
<dl><dd>
:{{User:Zelgadis/event_decl|Needs|UPDATE_LFG}}
local refreshrates = {GetRefreshRates()}
for i,entry in refreshrates do
  DEFAULT_CHAT_FRAME:AddMessage(format('Refresh rate %u: %s Hz', i, entry))
end


Output:
===Details===
Refresh rate 1: 60 Hz
:Use [[API_GetLFGResults|GetLFGResults(index)]] to retrieve each result.
Refresh rate 2: 75 Hz
 
Refresh rate 3: 85 Hz
{{User:Zelgadis/LFG_notice}}
Refresh rate 4: 100 Hz
</noinclude>
</dl></dd>

Latest revision as of 04:46, 15 August 2023

WoW API < GetNumLFGResults

Returns the number of results for a preceding LFG query

count = GetNumLFGResults()

Takes[edit]

User:Zelgadis/var decl

Returns[edit]

User:Zelgadis/var decl
Contains the number of results

Events[edit]

User:Zelgadis/event decl

Details[edit]

Use GetLFGResults(index) to retrieve each result.

User:Zelgadis/LFG notice