No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
PHP 8.1 and later.
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/divar-ir/kenar-sdk-php.git"
}
],
"require": {
"divar-ir/kenar-sdk-php": "*@dev"
}
}Then run composer install
Download the files and include autoload.php:
<?php
require_once('/path/to/KenarApiClient/vendor/autoload.php');Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: APIKey
$config = Divar\KenarApiClient\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Divar\KenarApiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new Divar\KenarApiClient\Api\AddonsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$business_token = 'business_token_example'; // string
$addons_create_business_addon_body = new \Divar\KenarApiClient\Model\AddonsCreateBusinessAddonBody(); // \Divar\KenarApiClient\Model\AddonsCreateBusinessAddonBody
try {
$result = $apiInstance->addonsCreateBusinessAddon($business_token, $addons_create_business_addon_body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AddonsApi->addonsCreateBusinessAddon: ', $e->getMessage(), PHP_EOL;
}All URIs are relative to https://open-api.divar.ir
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AddonsApi | addonsCreateBusinessAddon | POST /v1/open-platform/addons/business/{business_token} | افزودن افزونه جدید به آگهیهای کسبوکار |
| AddonsApi | addonsCreatePostAddonV2 | POST /v2/open-platform/addons/post/{token} | افزودن افزونه جدید به آگهی |
| AddonsApi | addonsCreateUserAddonV2 | POST /v2/open-platform/addons/user/{phone} | افزودن افزونه جدید به کاربر |
| AddonsApi | addonsCreateUserAddonV22 | POST /v2/open-platform/addons/users/{divar_user_id} | افزودن افزونه جدید به کاربر |
| AddonsApi | addonsDeletePostAddon | DELETE /v1/open-platform/add-ons/post/{token} | حذف افزونه از آگهی |
| AddonsApi | addonsDeletePostAddon2 | DELETE /v1/open-platform/addons/post/{token} | حذف افزونه از آگهی |
| AddonsApi | addonsDeleteUserAddon | DELETE /v1/open-platform/addons/user/{id} | حذف افزونه کاربر |
| AddonsApi | addonsGetUserAddons | GET /v1/open-platform/addons/user/{phone} | دریافت تمام افزونههای کاربر |
| AddonsApi | addonsGetUserAddons2 | GET /v2/open-platform/addons/users/{divar_user_id} | دریافت تمام افزونههای کاربر |
| AssetsApi | assetsGetBodyStatuses | GET /v1/open-platform/assets/body-status | دریافت گزینههای وضعیت بدنه موجود در دستهبندیهای خودرو دیوار |
| AssetsApi | assetsGetBrandModels | GET /v1/open-platform/assets/brand-model/{category} | دریافت مدلهای برند در دستهبندی دیوار |
| AssetsApi | assetsGetCategories | GET /v1/open-platform/assets/category | دریافت دستهبندیهای دیوار |
| AssetsApi | assetsGetCities | GET /v1/open-platform/assets/city | دریافت شهرهای دیوار |
| AssetsApi | assetsGetColors | GET /v1/open-platform/assets/color/{category} | دریافت رنگها در دستهبندی دیوار |
| AssetsApi | assetsGetDistricts | GET /v1/open-platform/assets/district | دریافت مناطق دیوار |
| AssetsApi | assetsGetDistricts2 | GET /v1/open-platform/assets/district/{city_slug} | دریافت مناطق دیوار |
| AssetsApi | assetsGetInternalStorages | GET /v1/open-platform/assets/internal-storage | دریافت گزینههای حافظه داخلی موجود در دستهبندیهای موبایل/تبلت/لپتاپ دیوار |
| AssetsApi | assetsGetOAuthScopes | GET /v1/open-platform/assets/oauth-scope | دریافت دامنههای OAuth کنار دیوار |
| AssetsApi | assetsGetPermissions | GET /v1/open-platform/assets/permission | دریافت مجوزهای کنار دیوار |
| AssetsApi | assetsGetRamMemories | GET /v1/open-platform/assets/ram-memory | دریافت گزینههای حافظه رم موجود در دستهبندیهای موبایل/تبلت/لپتاپ دیوار |
| AssetsApi | assetsGetServiceTypes | GET /v1/open-platform/assets/service-type | دریافت انواع سرویس موجود در کنار دیوار |
| ChatAPIApi | chatAPIChatBotSendMessage | POST /v1/open-platform/chat/bot/conversations/{conversation_id}/messages | ارسال پیام به مکالمه ChatBot |
| ChatAPIApi | chatAPIChatBotSendMessage2 | POST /v1/open-platform/chat/bot/users/{user_id}/messages | ارسال پیام به مکالمه ChatBot |
| ChatAPIApi | chatAPIChatBotSendMessage3 | POST /experimental/open-platform/chatbot-conversations/{conversation_id}/messages | ارسال پیام به مکالمه ChatBot |
| ChatAPIApi | chatAPIChatBotSendMessage4 | POST /experimental/open-platform/chat/bot/users/{user_id}/messages | ارسال پیام به مکالمه ChatBot |
| ChatAPIApi | chatAPIChatBotSendMessage5 | POST /experimental/open-platform/chat/bot/conversations/{conversation_id}/messages | ارسال پیام به مکالمه ChatBot |
| ChatAPIApi | chatAPIConversationSendMessage | POST /v2/open-platform/conversations/{conversation_id}/messages | ارسال پیام به مکالمه |
| ChatAPIApi | chatAPIGenerateUploadToken | POST /experimental/open-platform/chat/upload | تولید توکن آپلود |
| ChatAPIApi | chatAPIGetConversation | GET /v1/open-platform/chat/conversations/{conversation_id} | دریافت مکالمه با شناسه آن |
| EventsApi | eventsRegisterEventSubscription | POST /v1/open-platform/events/subscriptions | اشتراک در رویداد |
| FinderApi | finderGetPost | GET /v1/open-platform/finder/post/{token} | دریافت آگهی دیوار |
| FinderApi | finderGetUser | POST /v1/open-platform/users | دریافت اطلاعات کاربر |
| FinderApi | finderGetUser2 | GET /v1/open-platform/users | دریافت اطلاعات کاربر |
| FinderApi | finderGetUserPosts | GET /v1/open-platform/finder/user-posts | دریافت آگهیهای کاربر |
| FinderApi | finderSearchPostV2 | POST /v2/open-platform/finder/post | جستجو آگهیهای دیوار با فیلترهایی |
| LimitedApi | paymentGetBalance | GET /experimental/open-platform/balance | |
| LimitedApi | paymentGetPostPricing | GET /v1/open-platform/post/{post_token}/pricing | دریافت هزینه سرویس |
| LimitedApi | paymentGetTransaction | GET /experimental/open-platform/transactions/{id} | |
| LimitedApi | paymentListTransactions | GET /experimental/open-platform/transactions | |
| LimitedApi | paymentReorderPost | POST /experimental/open-platform/post/{post_token}/reorder | |
| PaymentTicketApi | paymentTicketValidate | POST /v1/open-platform/payment-ticket/validate | اعتبارسنجی بلیط پرداخت |
| PostApi | postEditPost | PUT /v1/open-platform/post/{post_token} | ویرایش آگهی |
| PostApi | postGetImageUploadURL | GET /v1/open-platform/post/image-upload-url | دریافت URL آپلود تصویر |
| PostApi | postGetPostStats | GET /experimental/open-platform/posts/{post_token}/stats | دریافت آمارهای آگهی |
| SemanticApi | semanticCreatePostSemantic | POST /experimental/open-platform/semantic/post/{token} | ایجاد اطلاعات معنایی آگهی |
| SemanticApi | semanticCreateUserSemantic | POST /v1/open-platform/semantic/user/{phone} | ایجاد اطلاعات معنایی کاربر |
| SemanticApi | semanticCreateUserSemantic2 | POST /v1/open-platform/semantic/users/{divar_user_id} | ایجاد اطلاعات معنایی کاربر |
| SemanticApi | semanticDeleteUserSemantic | DELETE /v1/open-platform/semantic/user/{phone} | حذف اطلاعات معنایی کاربر |
| SemanticApi | semanticDeleteUserSemantic2 | DELETE /v1/open-platform/semantic/users/{divar_user_id} | حذف اطلاعات معنایی کاربر |
- AddonSecondaryLinkagePosition
- AddonSemanticCarVerificationStage
- AddonSemanticIdentityVerificationResult
- AddonSemanticIdentityVerificationStage
- AddonSemanticInspectionResult
- AddonSemanticNewFaceVerificationResult
- AddonSemanticOwnershipResult
- AddonSemanticPostVerificationResult
- AddonsAction
- AddonsAddonLinkage
- AddonsAddonMetaData
- AddonsAddonSecondaryLinkage
- AddonsAddonSecondaryLinks
- AddonsAddonSelector
- AddonsAddonSemantic
- AddonsAddonSemanticPaymentMethod
- AddonsAddonSemanticStatus
- AddonsBusinessAddon
- AddonsButtonBar
- AddonsCreateBusinessAddonBody
- AddonsCreateBusinessAddonResponse
- AddonsCreatePostAddonRequest
- AddonsCreatePostAddonV2Body
- AddonsCreateUserAddonResponseV2
- AddonsCreateUserAddonV2Body
- AddonsDescriptionRow
- AddonsEvaluationRow
- AddonsEvaluationRowSection
- AddonsEventRow
- AddonsGetBusinessAddonsResponse
- AddonsGetDynamicAction
- AddonsGetPostAddonsResponse
- AddonsGetUserAddonsResponse
- AddonsGetUserPostAddonsResponse
- AddonsGroupInfoRow
- AddonsGroupInfoRowGroupInfoItem
- AddonsImageCarouselRow
- AddonsOpenPostManagePage
- AddonsOpenPostPage
- AddonsOpenServerLink
- AddonsPostAddon
- AddonsScoreRow
- AddonsSelectorRow
- AddonsStatus
- AddonsSubtitleRow
- AddonsTitleRow
- AddonsUserAddon
- AddonsUserAddonFilters
- AddonsWidget
- AddonsWidgetColor
- AppsApp
- AppsAppStatus
- AppsAppStatusStatus
- AppsServiceTag
- AppsServiceType
- AssetsEnumOption
- AssetsGetBodyStatusesResponse
- AssetsGetBrandModelsResponse
- AssetsGetCategoriesResponse
- AssetsGetCitiesResponse
- AssetsGetColorsResponse
- AssetsGetDistrictsResponse
- AssetsGetInternalStoragesResponse
- AssetsGetOAuthScopesResponse
- AssetsGetOAuthScopesResponseAppOauthScope
- AssetsGetOAuthScopesResponseLifeCycleState
- AssetsGetPermissionsResponse
- AssetsGetPermissionsResponseLifeCycleState
- AssetsGetPermissionsResponsePermission
- AssetsGetRamMemoriesResponse
- AssetsGetServiceTypesResponse
- AuthorizationAPICallerInfo
- AuthorizationOAuthScope
- ChatAPIChatBotSendMessageBody
- ChatAPIConversationSendMessageBody
- ChatapiChatBotSendMessageResponse
- ChatapiChatButton
- ChatapiChatButtonGrid
- ChatapiChatButtonRow
- ChatapiConversation
- ChatapiConversationSendMessageResponse
- ChatapiConversationType
- ChatapiGenerateUploadTokenResponse
- ChatapiGetConversationResponse
- ChatapiMessage
- ChatapiMessageSenderSide
- ChatapiMessageSenderType
- ChatapiMessageType
- DivarIconsIconName
- EventsRegisterEventSubscriptionRequest
- EventsRegisterEventSubscriptionRequestEventType
- FinderGetAllDevelopmentPostsResponse
- FinderGetPostResponse
- FinderGetUserPostsResponse
- FinderGetUserPostsResponsePost
- FinderPostExtState
- FinderSearchPostItem
- FinderSearchPostV2Response
- FinderSearchPostsV2Request
- FinderSearchQuery
- FinderSearchQueryNumberRange
- FinderUser
- GetPostPricingResponseReorder
- GetPostResponseBusinessData
- GetPostStatsResponseDailyStats
- GetPostStatsResponsePostStats
- GetServiceTypesResponseServiceTypeData
- GooglerpcStatus
- ImageCarouselRowImageItem
- ManagementDevelopmentPost
- ManagementPreset
- MessageFileData
- MessageImageData
- MessageLocationData
- MessageSender
- MessageVideoData
- MessageVoiceData
- OAuthScopeScope
- PaymentGetBalanceResponse
- PaymentGetPostPricingResponse
- PaymentGetTransactionResponse
- PaymentListTransactionsResponse
- PaymentReorderPostBody
- PaymentReorderPostResponse
- PaymentTicketGenerateResponse
- PaymentTicketValidateRequest
- PaymentTicketValidateResponse
- PaymentTransaction
- PaymentTransactionState
- PaymentTransactionType
- PostEditPostBody
- PostGetImageUploadURLResponse
- PostGetPostStatsResponse
- PremiumPanelBusinessDataSubBusinessType
- ProtobufAny
- SearchPostItemPrice
- SearchPostItemRealEstateFields
- SearchPostItemVehiclesFields
- SemanticCreatePostSemanticBody
- SemanticCreateUserSemanticBody
- SemanticCreateUserSemanticResponse
- SemanticPostSemanticDeleted
- SemanticUserSemanticDeleted
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header
- Type:
OAuth - Flow:
accessCode - Authorization URL:
oauth.divar.ir/oauth2/auth - Scopes:
- BUSINESS_ADDON_CREATE.{resource_id}: BUSINESS_ADDON_CREATE.{resource_id}
- CHAT_BOT_USER_MESSAGE_SEND: CHAT_BOT_USER_MESSAGE_SEND
- CHAT_CONVERSATION_READ.{resource_id}: CHAT_CONVERSATION_READ.{resource_id}
- CHAT_MESSAGE_SEND.{resource_id}: CHAT_MESSAGE_SEND.{resource_id}
- CHAT_POST_CONVERSATIONS_MESSAGE_SEND.{resource_id}: CHAT_POST_CONVERSATIONS_MESSAGE_SEND.{resource_id}
- CHAT_POST_CONVERSATIONS_READ.{resource_id}: CHAT_POST_CONVERSATIONS_READ.{resource_id}
- CHAT_SUPPLIER_ALL_CONVERSATIONS_MESSAGE_SEND: CHAT_SUPPLIER_ALL_CONVERSATIONS_MESSAGE_SEND
- CHAT_SUPPLIER_ALL_CONVERSATIONS_READ: CHAT_SUPPLIER_ALL_CONVERSATIONS_READ
- CONVERSATION_SEND_MESSAGE.{resource_id}: CONVERSATION_SEND_MESSAGE.{resource_id}
- MANAGEMENT_APPS_READ.{resource_id}: MANAGEMENT_APPS_READ.{resource_id}
- MANAGEMENT_APPS_WRITE.{resource_id}: MANAGEMENT_APPS_WRITE.{resource_id}
- NOTIFICATION_ACCESS_REVOCATION: NOTIFICATION_ACCESS_REVOCATION
- PAYMENT_ALL_POSTS_PRICING_READ: PAYMENT_ALL_POSTS_PRICING_READ
- PAYMENT_ALL_POSTS_REORDER: PAYMENT_ALL_POSTS_REORDER
- POST_ADDON_CREATE.{resource_id}: POST_ADDON_CREATE.{resource_id}
- POST_EDIT.{resource_id}: POST_EDIT.{resource_id}
- POST_ONGOING_IMAGES_GET.{resource_id}: POST_ONGOING_IMAGES_GET.{resource_id}
- POST_SEMANTIC_CREATE.{resource_id}: POST_SEMANTIC_CREATE.{resource_id}
- USER_ADDON_CREATE: USER_ADDON_CREATE
- USER_ID: USER_ID
- USER_PHONE: USER_PHONE
- USER_POSTS_ADDON_CREATE: USER_POSTS_ADDON_CREATE
- USER_POSTS_GET: USER_POSTS_GET
- USER_VERIFICATION_CREATE: USER_VERIFICATION_CREATE
- offline_access: offline_access
- openid: openid
To run the tests, use:
composer install
vendor/bin/phpunitThis PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.0- Generator version:
7.13.0
- Generator version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen