GetBans

Description

Command to get ban data, how other data is related to bans, and some data related to bans.

Attributes

package
modernbill
subpackage
mbapi
version
0.9
author
Mark Garrett

Example Request

	<mbapi>
		<command><!-- string --></command>
		<showXMLHeader><!-- boolean --></showXMLHeader>
		<params>
			<banID><!-- int --></banID>
			<banType><!-- int --></banType>
			<banString><!-- string --></banString>
			<banActive><!-- boolean --></banActive>
			<banCountLessThan><!-- int --></banCountLessThan>
			<banCount><!-- int --></banCount>
			<banCountGreaterThan><!-- int --></banCountGreaterThan>
			<banDateLastUsedLessThan><!-- int --></banDateLastUsedLessThan>
			<banDateLastUsed><!-- int --></banDateLastUsed>
			<banDateLastUsedGreaterThan><!-- int --></banDateLastUsedGreaterThan>
		</params>
	</mbapi>

		

Example Response

	<mbapi>
		<header>
			<remoteSessionID><!-- hex --></remoteSessionID>
			<errorCount><!-- int --></errorCount>
			<errors>
				<error>
					<title><!-- string --></title>
					<message><!-- string --></message>
				</error>
			</errors>
			<numResults><!-- int --></numResults>
			<numAffectedRows><!-- int --></numAffectedRows>
		</header>
		<results>
			<bans>
				<ban>
					<banID><!-- int --></banID>
					<banString><!-- string --></banString>
					<banType><!-- int --></banType>
					<banActive><!-- boolean --></banActive>
					<banCount><!-- int --></banCount>
					<banDateLastUsed><!-- int --></banDateLastUsed>
				</ban>
			</bans>
		</results>
	</mbapi>

		

Request Elements

mbapi
Type
group
Description

MBAPI request document root.

Children
command
Type
string
Description

Required. The string GetBans.

showXMLHeader
Type
boolean
Description

Whether to show an XML header in the results.

params
Type
group
Description

GetBans parameters.

Children
banID
Type
int
Description

Limit data to bans of this ID. This may occur multiple times, or not at all.

banType
Type
int
Description

Limit data to bans of this type.

  • 0: e-mail
  • 1: ip

banString
Type
string
Description

Limit data to bans of this string. At the moment, this can either be an email address, or ip address that has been converted with ip2long()

banActive
Type
boolean
Description

Limit data to bans based on their active state.

banCountLessThan
Type
int
Description

Limit data to bans with a "hit" count less than this amount.

banCount
Type
int
Description

Limit data to bans with a "hit" count equal this amount.

banCountGreaterThan
Type
int
Description

Limit data to bans with a "hit" count greater than this amount.

banDateLastUsedLessThan
Type
int
Description

Limit data to bans with a last "hit" timestamp less than this amount.

banDateLastUsed
Type
int
Description

Limit data to bans with a last "hit" timestamp equal this amount.

banDateLastUsedGreaterThan
Type
int
Description

Limit data to bans with a last "hit" timestamp greater than this amount.

Response Elements

mbapi
Type
group
Description

MBAPI response document root.

Children
header
Type
group
Description

Contains result meta data: data about the result itself.

Children
remoteSessionID
Type
hex
Description

A session ID that may be used for authentication instead of a remote access hash.

errorCount
Type
int
Description

The number of errors that occured.

errors
Type
group
Description

Contains any errors that occured.

Children
error
Type
group
Description

Contains information relating to a single error. Occurs header errorCount times.

Children
title
Type
string
Description

The title of the error.

message
Type
string
Description

The error message.

numResults
Type
int
Description

The number of results that have been returned. For Get commands.

numAffectedRows
Type
int
Description

The number of rows that have been affected. For Set commands.

results
Type
group
Description

Contains any results.

Children
bans
Type
group
Description

Contains all ban results.

Children
ban
Type
group
Description

Contains all results for a single ban. Occurs header numResults times.

Children
banID
Type
int
Description

The ID of the ban.

banString
Type
string
Description

The ban name for the order form. Names need not be unique. Operations are performed on IDs. Names are merely for display.

banType
Type
int
Description

The type of ban.

  • 0: e-mail
  • 1: ip

banActive
Type
boolean
Description

Whether the ban is active. Inactive bans won't show up on order forms, among other obviously appropriate things.

banCount
Type
int
Description

The number of times this ban item has been "hit".

banDateLastUsed
Type
int
Description

The Unix timestamp of when the ban was last "hit".