SERVER EXPORTS

EbuyAuction Structure
{
  "id": 1,
  "seller": 5,
  "category": "car",
  "title": "Sports Car",
  "description": "Fast and reliable.",
  "images": ["[https://example.com/car.jpg](https://example.com/car.jpg)"],
  "phoneNumber": "555-0123",
  "price": 50000,
  "hideNumber": false,
  "createdAt": 1678900000
}

Fetch Auctions

Fetches a list of auctions based on various filters like search query, category, sorting order, and pagination limits.

local result = exports["17mov_Phone"]:Ebuy_FetchAuctions(search, category, sort, cursor, limit, userId)

Returns:

  • table: { success: boolean, auctions: EbuyAuction[] }

Argument
Type
Optional
Explanation

search

string

โœ…

Search query to filter auctions by title.

category

"all" | "item" | "car"

โœ…

Fetching auctions only from this category

sort

"priceAsc" | "priceDesc"| "newest"

โœ…

Sorting auctions by this param

cursor

number

โœ…

Number of items to skip (pagination). Requires limit.

limit

number

โœ…

Maximum number of auctions to return.

userId

number

โœ…

Filter auctions created by a specific user ID.

Add Auction

Creates a new auction listing in the Ebuy marketplace.

local result = exports["17mov_Phone"]:Ebuy_AddAuction(title, description, images, phoneNumber, price, seller, category, hideNumber)

Returns:

  • table: { success: boolean, id?: number }

Argument
Type
Optional
Explanation

title

string

โŒ

The title of the auction.

description

string

โŒ

Detailed description of the item/vehicle.

images

string[]

โŒ

Array of image URLs.

phoneNumber

string

โœ…

Contact phone number for the seller.

price

number

โŒ

Price of the item.

seller

number

โœ…

User ID of the seller. Defaults to 0 (System).

category

"item" | "car"

โŒ

Auction category

hideNumber

boolean

โŒ

Whether to hide the seller's phone number.

Delete Auction

Removes an existing auction listing from the marketplace.

local result = exports["17mov_Phone"]:Ebuy_DeleteAuction(id)

Returns:

  • table: { success: boolean }

Argument
Type
Optional
Explanation

id

number

โŒ

The ID of the auction to delete.

Last updated