Skip to content

Latest commit

 

History

History
855 lines (538 loc) · 21.5 KB

File metadata and controls

855 lines (538 loc) · 21.5 KB

\AssetsAPI

All URIs are relative to https://open-api.divar.ir

Method HTTP request Description
AssetsGetBodyStatuses Get /v1/open-platform/assets/body-status لیست گزینه‌های وضعیت بدنه
AssetsGetBrandModels Get /v1/open-platform/assets/brand-model/{category} لیست مدل برندها بر اساس دسته‌بندی
AssetsGetCategories Get /v1/open-platform/assets/category لیست همه دسته‌بندی‌ها
AssetsGetCities Get /v1/open-platform/assets/city لیست همه شهرها
AssetsGetColors Get /v1/open-platform/assets/color/{category} لیست رنگ‌ها بر اساس دسته‌بندی
AssetsGetDistricts Get /v1/open-platform/assets/district لیست محله‌ها
AssetsGetDistricts2 Get /v1/open-platform/assets/district/{city_slug} لیست محله‌ها
AssetsGetInternalStorages Get /v1/open-platform/assets/internal-storage لیست گزینه‌های حافظه داخلی
AssetsGetOAuthScopes Get /v1/open-platform/assets/oauth-scope لیست دامنه‌های OAuth
AssetsGetPermissions Get /v1/open-platform/assets/permission لیست مجوزهای کنار دیوار
AssetsGetRamMemories Get /v1/open-platform/assets/ram-memory لیست گزینه‌های حافظه RAM
AssetsGetServiceTypes Get /v1/open-platform/assets/service-type لیست انواع سرویس
AssetsGetSubmitSchema Get /v1/open-platform/assets/submit-schema/{category_slug} دریافت schema ثبت آگهی

AssetsGetBodyStatuses

AssetsGetBodyStatusesResponse AssetsGetBodyStatuses(ctx).Execute()

لیست گزینه‌های وضعیت بدنه

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/divar-ir/kenar-sdk-go"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AssetsAPI.AssetsGetBodyStatuses(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AssetsAPI.AssetsGetBodyStatuses``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AssetsGetBodyStatuses`: AssetsGetBodyStatusesResponse
	fmt.Fprintf(os.Stdout, "Response from `AssetsAPI.AssetsGetBodyStatuses`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiAssetsGetBodyStatusesRequest struct via the builder pattern

Return type

AssetsGetBodyStatusesResponse

Authorization

APIKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetsGetBrandModels

AssetsGetBrandModelsResponse AssetsGetBrandModels(ctx, category).Execute()

لیست مدل برندها بر اساس دسته‌بندی

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/divar-ir/kenar-sdk-go"
)

func main() {
	category := "category_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AssetsAPI.AssetsGetBrandModels(context.Background(), category).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AssetsAPI.AssetsGetBrandModels``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AssetsGetBrandModels`: AssetsGetBrandModelsResponse
	fmt.Fprintf(os.Stdout, "Response from `AssetsAPI.AssetsGetBrandModels`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
category string

Other Parameters

Other parameters are passed through a pointer to a apiAssetsGetBrandModelsRequest struct via the builder pattern

Name Type Description Notes

Return type

AssetsGetBrandModelsResponse

Authorization

APIKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetsGetCategories

AssetsGetCategoriesResponse AssetsGetCategories(ctx).Execute()

لیست همه دسته‌بندی‌ها

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/divar-ir/kenar-sdk-go"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AssetsAPI.AssetsGetCategories(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AssetsAPI.AssetsGetCategories``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AssetsGetCategories`: AssetsGetCategoriesResponse
	fmt.Fprintf(os.Stdout, "Response from `AssetsAPI.AssetsGetCategories`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiAssetsGetCategoriesRequest struct via the builder pattern

Return type

AssetsGetCategoriesResponse

Authorization

APIKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetsGetCities

AssetsGetCitiesResponse AssetsGetCities(ctx).Execute()

لیست همه شهرها

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/divar-ir/kenar-sdk-go"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AssetsAPI.AssetsGetCities(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AssetsAPI.AssetsGetCities``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AssetsGetCities`: AssetsGetCitiesResponse
	fmt.Fprintf(os.Stdout, "Response from `AssetsAPI.AssetsGetCities`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiAssetsGetCitiesRequest struct via the builder pattern

Return type

AssetsGetCitiesResponse

Authorization

APIKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetsGetColors

AssetsGetColorsResponse AssetsGetColors(ctx, category).Execute()

لیست رنگ‌ها بر اساس دسته‌بندی

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/divar-ir/kenar-sdk-go"
)

func main() {
	category := "category_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AssetsAPI.AssetsGetColors(context.Background(), category).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AssetsAPI.AssetsGetColors``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AssetsGetColors`: AssetsGetColorsResponse
	fmt.Fprintf(os.Stdout, "Response from `AssetsAPI.AssetsGetColors`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
category string

Other Parameters

Other parameters are passed through a pointer to a apiAssetsGetColorsRequest struct via the builder pattern

Name Type Description Notes

Return type

AssetsGetColorsResponse

Authorization

APIKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetsGetDistricts

AssetsGetDistrictsResponse AssetsGetDistricts(ctx).CitySlug(citySlug).Execute()

لیست محله‌ها

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/divar-ir/kenar-sdk-go"
)

func main() {
	citySlug := "citySlug_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AssetsAPI.AssetsGetDistricts(context.Background()).CitySlug(citySlug).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AssetsAPI.AssetsGetDistricts``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AssetsGetDistricts`: AssetsGetDistrictsResponse
	fmt.Fprintf(os.Stdout, "Response from `AssetsAPI.AssetsGetDistricts`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiAssetsGetDistrictsRequest struct via the builder pattern

Name Type Description Notes
citySlug string

Return type

AssetsGetDistrictsResponse

Authorization

APIKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetsGetDistricts2

AssetsGetDistrictsResponse AssetsGetDistricts2(ctx, citySlug).Execute()

لیست محله‌ها

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/divar-ir/kenar-sdk-go"
)

func main() {
	citySlug := "citySlug_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AssetsAPI.AssetsGetDistricts2(context.Background(), citySlug).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AssetsAPI.AssetsGetDistricts2``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AssetsGetDistricts2`: AssetsGetDistrictsResponse
	fmt.Fprintf(os.Stdout, "Response from `AssetsAPI.AssetsGetDistricts2`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
citySlug string

Other Parameters

Other parameters are passed through a pointer to a apiAssetsGetDistricts2Request struct via the builder pattern

Name Type Description Notes

Return type

AssetsGetDistrictsResponse

Authorization

APIKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetsGetInternalStorages

AssetsGetInternalStoragesResponse AssetsGetInternalStorages(ctx).Execute()

لیست گزینه‌های حافظه داخلی

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/divar-ir/kenar-sdk-go"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AssetsAPI.AssetsGetInternalStorages(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AssetsAPI.AssetsGetInternalStorages``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AssetsGetInternalStorages`: AssetsGetInternalStoragesResponse
	fmt.Fprintf(os.Stdout, "Response from `AssetsAPI.AssetsGetInternalStorages`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiAssetsGetInternalStoragesRequest struct via the builder pattern

Return type

AssetsGetInternalStoragesResponse

Authorization

APIKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetsGetOAuthScopes

AssetsGetOAuthScopesResponse AssetsGetOAuthScopes(ctx).Execute()

لیست دامنه‌های OAuth

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/divar-ir/kenar-sdk-go"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AssetsAPI.AssetsGetOAuthScopes(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AssetsAPI.AssetsGetOAuthScopes``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AssetsGetOAuthScopes`: AssetsGetOAuthScopesResponse
	fmt.Fprintf(os.Stdout, "Response from `AssetsAPI.AssetsGetOAuthScopes`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiAssetsGetOAuthScopesRequest struct via the builder pattern

Return type

AssetsGetOAuthScopesResponse

Authorization

APIKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetsGetPermissions

AssetsGetPermissionsResponse AssetsGetPermissions(ctx).Execute()

لیست مجوزهای کنار دیوار

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/divar-ir/kenar-sdk-go"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AssetsAPI.AssetsGetPermissions(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AssetsAPI.AssetsGetPermissions``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AssetsGetPermissions`: AssetsGetPermissionsResponse
	fmt.Fprintf(os.Stdout, "Response from `AssetsAPI.AssetsGetPermissions`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiAssetsGetPermissionsRequest struct via the builder pattern

Return type

AssetsGetPermissionsResponse

Authorization

APIKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetsGetRamMemories

AssetsGetRamMemoriesResponse AssetsGetRamMemories(ctx).Execute()

لیست گزینه‌های حافظه RAM

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/divar-ir/kenar-sdk-go"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AssetsAPI.AssetsGetRamMemories(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AssetsAPI.AssetsGetRamMemories``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AssetsGetRamMemories`: AssetsGetRamMemoriesResponse
	fmt.Fprintf(os.Stdout, "Response from `AssetsAPI.AssetsGetRamMemories`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiAssetsGetRamMemoriesRequest struct via the builder pattern

Return type

AssetsGetRamMemoriesResponse

Authorization

APIKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetsGetServiceTypes

AssetsGetServiceTypesResponse AssetsGetServiceTypes(ctx).Execute()

لیست انواع سرویس

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/divar-ir/kenar-sdk-go"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AssetsAPI.AssetsGetServiceTypes(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AssetsAPI.AssetsGetServiceTypes``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AssetsGetServiceTypes`: AssetsGetServiceTypesResponse
	fmt.Fprintf(os.Stdout, "Response from `AssetsAPI.AssetsGetServiceTypes`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiAssetsGetServiceTypesRequest struct via the builder pattern

Return type

AssetsGetServiceTypesResponse

Authorization

APIKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AssetsGetSubmitSchema

AssetsGetSubmitSchemaResponse AssetsGetSubmitSchema(ctx, categorySlug).Execute()

دریافت schema ثبت آگهی

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/divar-ir/kenar-sdk-go"
)

func main() {
	categorySlug := "categorySlug_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AssetsAPI.AssetsGetSubmitSchema(context.Background(), categorySlug).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AssetsAPI.AssetsGetSubmitSchema``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AssetsGetSubmitSchema`: AssetsGetSubmitSchemaResponse
	fmt.Fprintf(os.Stdout, "Response from `AssetsAPI.AssetsGetSubmitSchema`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
categorySlug string

Other Parameters

Other parameters are passed through a pointer to a apiAssetsGetSubmitSchemaRequest struct via the builder pattern

Name Type Description Notes

Return type

AssetsGetSubmitSchemaResponse

Authorization

APIKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]