SDK


ASP.NET Ad-Listing solution included a built-in SDK for building complex queries by writing one or two lines of code. It can boost your development by customizing solutions several times faster.

This page will cover the use of Ad-Listings SDK for querying listings utilizing basic level parameters

Basic Example

Loading For Sale Ad-Listings

var list = await ClassifiedBLL.LoadItems(context, new ClassifiedEntity()
{
   ad_type = AD_Types.Sale, // For Sale listings
   ispublic = true, // Only public and open listings
   iscache = true, // Toggle on | off cache for listings
   isfeatured = FeaturedTypes.All, // featured filter
   order = "ad.created_at desc", // order by clause
   pagesize = 15 // page size
});

List of all available query parameters

 

Parameter Default Value Description
excludedid 0 Exclude specific ad-listing.
id 0 Fetch specific id content
nofilter false Skip further query matching in case of id > 0
skip_domain_filter false if true will skip domain matching
term "" broad search query matching
isarchive EnabledTypes.Disabled set loading archived (deleted) Ad-Listings
listing_type 0 Load specific listing Ad-Listings
userid 0 Load specific user or agent Ad-Listings
agencyid 0 Load specific agency Ad-Listings
isfeatured FeaturedTypes.All Load Ad-Listings of specific featured type, if FeaturedTypes.All_Except_Basic is set, it will load all Ad-Listings except free listings
isfeatured FeaturedTypes.All Load Ad-Listings of specific featured type
item_type Item_Type.All Load Ad-Listings of specific Item Type e.g Used or New
rent_pay_type RentPayType.All Load Ad-Listings of specific pay type e.g Yearly or Monthly if ad type is For-Rent
max_price 0 Set max price as filter
min_price 0 Set min price as filter
ispublic true Load Ad-Listings that are available for public
isenabled true Load enabled Ad-Listings if ispublic is false
isapproved true Load approved Ad-Listings if ispublic is false
ad_status AD_Status.Open Load Ad-Listings filter by Ad_Status e.g Open, Closed, Expired etc if ispublic is false
locationid 0 Load specific location Ad-Listings
ad_type AD_Types.All Load specific ad_type (e.g For Sale, For Rent, Wanted, Exchange etc) listings
culture "" Load specific culture ad-listings e.g en, fr-Fr etc
wanted_for Wanted_For.All Filter Wanted listings further with Wanted For e.g For Sale, For Rent
city "" Load specific city ad-listings
state "" Load specific state ad-listings
country "" Load specific country ad-listings
categoryid 0 Load specific category ad listings by using categoryid as filter option
categoryname "" Load specific category ad listings by using categoryname as filter option
category_ids short[0] Load ad listings filter by one or more category ids
loadfavorites false Load favorited ad listings for specific user, if true you must provide userid
loadabusereports false Load ad-listings marked with abuse reports, if enabled you have to pass some more filters shown below
abuse_entity.contentid 0 Load ad-listings marked with flag reports, match with content id of Ad-Listing. Must enabled loadabusereports to work
abuse_entity.status AbuseReportBLL.Status Load ad-listings filter with abuse report status e.g Not Reviewed Ad-Listings. Must enabled loadabusereports to work
abuse_entity.userid "" Load ad-listings filter with user id who submit flag reports. Must enabled loadabusereports to work
loadAnalytics false It can be used with analytic report generation. If enabled that will integrate ad-listings with analytic to generate reports e.g load view stats for Ad-Listings group by country
mapwithDynamicAttr false If enabled this will trigger mapping with dynamic Ad-Listing Attributes. It's useful when you search Ad-Listings based on dynamic attributes
map_terms List of mapping_object if mapwithDynamicAttr enabled, you can pass dynamic attribute list via mapping_object for searching & filtering
expiry_options ExpiryOptions.All Filter ad listings based on expiry options e.g Expired, ExpireToday, Expire_in_5Days, Expire_in_10Days etc
featured_expiry_options ExpiryOptions.All Filter ad listings based on featured expiry options e.g Expired, ExpireToday, Expire_in_5Days, Expire_in_10Days etc
datefilter DateFilter.AllTime Filter ad listings based on date submitted e.g Today, This Week, This Month etc
reporttype DefaultReportTypes.None Filter ad listings based on report types e.g Today, Week, LastWeek etc
loadall false Load all records by skiping pagination
pagenumber 1 Load specific page records
pagesize 18 Load specific number of records per page.
order "" Order by clause
List of topics under "SDK"
Topic
AD Listings
Agencies
Agents
Blogs
Dynamic Attributes
Locations
Contents
Domains
Gamification
Orders
Partners
Others