Skip to content

Latest commit

 

History

History
513 lines (327 loc) · 14.6 KB

File metadata and controls

513 lines (327 loc) · 14.6 KB

\AddonsAPI

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

Method HTTP request Description
AddonsCreateBusinessAddon Post /v1/open-platform/addons/business/{business_token} ایجاد افزونه کسب‌وکار
AddonsCreatePostAddonV2 Post /v2/open-platform/addons/post/{token} ایجاد افزونه آگهی
AddonsCreateUserAddonV2 Post /v2/open-platform/addons/user/{phone} ایجاد افزونه کاربر
AddonsCreateUserAddonV22 Post /v2/open-platform/addons/users/{divar_user_id} ایجاد افزونه کاربر
AddonsDeletePostAddon Delete /v1/open-platform/add-ons/post/{token} حذف افزونه آگهی
AddonsDeletePostAddon2 Delete /v1/open-platform/addons/post/{token} حذف افزونه آگهی
AddonsDeleteUserAddon Delete /v1/open-platform/addons/user/{id} حذف افزونه کاربر

AddonsCreateBusinessAddon

AddonsCreateBusinessAddonResponse AddonsCreateBusinessAddon(ctx, businessToken).AddonsCreateBusinessAddonBody(addonsCreateBusinessAddonBody).Execute()

ایجاد افزونه کسب‌وکار

Example

package main

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

func main() {
	businessToken := "businessToken_example" // string | 
	addonsCreateBusinessAddonBody := *openapiclient.NewAddonsCreateBusinessAddonBody() // AddonsCreateBusinessAddonBody | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

addonsCreateBusinessAddonBody | AddonsCreateBusinessAddonBody | |

Return type

AddonsCreateBusinessAddonResponse

Authorization

APIKey, OAuth

HTTP request headers

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

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

AddonsCreatePostAddonV2

map[string]interface{} AddonsCreatePostAddonV2(ctx, token).AddonsCreatePostAddonV2Body(addonsCreatePostAddonV2Body).Execute()

ایجاد افزونه آگهی

Example

package main

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

func main() {
	token := "token_example" // string | 
	addonsCreatePostAddonV2Body := *openapiclient.NewAddonsCreatePostAddonV2Body() // AddonsCreatePostAddonV2Body | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AddonsAPI.AddonsCreatePostAddonV2(context.Background(), token).AddonsCreatePostAddonV2Body(addonsCreatePostAddonV2Body).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AddonsAPI.AddonsCreatePostAddonV2``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AddonsCreatePostAddonV2`: map[string]interface{}
	fmt.Fprintf(os.Stdout, "Response from `AddonsAPI.AddonsCreatePostAddonV2`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

addonsCreatePostAddonV2Body | AddonsCreatePostAddonV2Body | |

Return type

map[string]interface{}

Authorization

APIKey, OAuth

HTTP request headers

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

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

AddonsCreateUserAddonV2

AddonsCreateUserAddonResponseV2 AddonsCreateUserAddonV2(ctx, phone).AddonsCreateUserAddonV2Body(addonsCreateUserAddonV2Body).Execute()

ایجاد افزونه کاربر

Example

package main

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

func main() {
	phone := "phone_example" // string | 
	addonsCreateUserAddonV2Body := *openapiclient.NewAddonsCreateUserAddonV2Body() // AddonsCreateUserAddonV2Body | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

addonsCreateUserAddonV2Body | AddonsCreateUserAddonV2Body | |

Return type

AddonsCreateUserAddonResponseV2

Authorization

APIKey, OAuth

HTTP request headers

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

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

AddonsCreateUserAddonV22

AddonsCreateUserAddonResponseV2 AddonsCreateUserAddonV22(ctx, divarUserId).AddonsCreateUserAddonV2Body(addonsCreateUserAddonV2Body).Execute()

ایجاد افزونه کاربر

Example

package main

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

func main() {
	divarUserId := "divarUserId_example" // string | 
	addonsCreateUserAddonV2Body := *openapiclient.NewAddonsCreateUserAddonV2Body() // AddonsCreateUserAddonV2Body | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

addonsCreateUserAddonV2Body | AddonsCreateUserAddonV2Body | |

Return type

AddonsCreateUserAddonResponseV2

Authorization

APIKey, OAuth

HTTP request headers

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

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

AddonsDeletePostAddon

map[string]interface{} AddonsDeletePostAddon(ctx, token).Execute()

حذف افزونه آگهی

Example

package main

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

func main() {
	token := "token_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AddonsAPI.AddonsDeletePostAddon(context.Background(), token).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AddonsAPI.AddonsDeletePostAddon``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AddonsDeletePostAddon`: map[string]interface{}
	fmt.Fprintf(os.Stdout, "Response from `AddonsAPI.AddonsDeletePostAddon`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

map[string]interface{}

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]

AddonsDeletePostAddon2

map[string]interface{} AddonsDeletePostAddon2(ctx, token).Execute()

حذف افزونه آگهی

Example

package main

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

func main() {
	token := "token_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AddonsAPI.AddonsDeletePostAddon2(context.Background(), token).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AddonsAPI.AddonsDeletePostAddon2``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AddonsDeletePostAddon2`: map[string]interface{}
	fmt.Fprintf(os.Stdout, "Response from `AddonsAPI.AddonsDeletePostAddon2`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

map[string]interface{}

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]

AddonsDeleteUserAddon

map[string]interface{} AddonsDeleteUserAddon(ctx, id).Execute()

حذف افزونه کاربر

Example

package main

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

func main() {
	id := "id_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AddonsAPI.AddonsDeleteUserAddon(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AddonsAPI.AddonsDeleteUserAddon``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AddonsDeleteUserAddon`: map[string]interface{}
	fmt.Fprintf(os.Stdout, "Response from `AddonsAPI.AddonsDeleteUserAddon`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

map[string]interface{}

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]