All URIs are relative to https://open-api.divar.ir
| Method | HTTP request | Description |
|---|---|---|
| FinderGetPost | Get /v1/open-platform/finder/post/{token} | دریافت آگهی دیوار |
| FinderGetUser | Post /v1/open-platform/users | دریافت اطلاعات کاربر |
| FinderGetUser2 | Get /v1/open-platform/users | دریافت اطلاعات کاربر |
| FinderGetUserBusinesses | Get /v1/open-platform/user/businesses | دریافت کسبوکارهای کاربر |
| FinderGetUserIDByPhone | Post /v1/open-platform/get-user-id-by-phone | دریافت شناسه کاربر |
| FinderGetUserPosts | Get /v1/open-platform/finder/user-posts | دریافت آگهیهای کاربر |
| FinderSearchPostV2 | Post /v2/open-platform/finder/post | جستجوی آگهیهای دیوار |
FinderGetPostResponse FinderGetPost(ctx, token).Execute()
دریافت آگهی دیوار
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.FinderAPI.FinderGetPost(context.Background(), token).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FinderAPI.FinderGetPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FinderGetPost`: FinderGetPostResponse
fmt.Fprintf(os.Stdout, "Response from `FinderAPI.FinderGetPost`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| token | string |
Other parameters are passed through a pointer to a apiFinderGetPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FinderUser FinderGetUser(ctx).Body(body).Execute()
دریافت اطلاعات کاربر
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/divar-ir/kenar-sdk-go"
)
func main() {
body := map[string]interface{}{ ... } // map[string]interface{} |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FinderAPI.FinderGetUser(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FinderAPI.FinderGetUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FinderGetUser`: FinderUser
fmt.Fprintf(os.Stdout, "Response from `FinderAPI.FinderGetUser`: %v\n", resp)
}Other parameters are passed through a pointer to a apiFinderGetUserRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| body | map[string]interface{} |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FinderUser FinderGetUser2(ctx).Execute()
دریافت اطلاعات کاربر
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.FinderAPI.FinderGetUser2(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FinderAPI.FinderGetUser2``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FinderGetUser2`: FinderUser
fmt.Fprintf(os.Stdout, "Response from `FinderAPI.FinderGetUser2`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiFinderGetUser2Request struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FinderGetUserBusinessesResponse FinderGetUserBusinesses(ctx).Execute()
دریافت کسبوکارهای کاربر
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.FinderAPI.FinderGetUserBusinesses(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FinderAPI.FinderGetUserBusinesses``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FinderGetUserBusinesses`: FinderGetUserBusinessesResponse
fmt.Fprintf(os.Stdout, "Response from `FinderAPI.FinderGetUserBusinesses`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiFinderGetUserBusinessesRequest struct via the builder pattern
FinderGetUserBusinessesResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FinderGetUserIDByPhoneResponse FinderGetUserIDByPhone(ctx).FinderGetUserIDByPhoneRequest(finderGetUserIDByPhoneRequest).Execute()
دریافت شناسه کاربر
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/divar-ir/kenar-sdk-go"
)
func main() {
finderGetUserIDByPhoneRequest := *openapiclient.NewFinderGetUserIDByPhoneRequest() // FinderGetUserIDByPhoneRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FinderAPI.FinderGetUserIDByPhone(context.Background()).FinderGetUserIDByPhoneRequest(finderGetUserIDByPhoneRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FinderAPI.FinderGetUserIDByPhone``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FinderGetUserIDByPhone`: FinderGetUserIDByPhoneResponse
fmt.Fprintf(os.Stdout, "Response from `FinderAPI.FinderGetUserIDByPhone`: %v\n", resp)
}Other parameters are passed through a pointer to a apiFinderGetUserIDByPhoneRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| finderGetUserIDByPhoneRequest | FinderGetUserIDByPhoneRequest |
FinderGetUserIDByPhoneResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FinderGetUserPostsResponse FinderGetUserPosts(ctx).Execute()
دریافت آگهیهای کاربر
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.FinderAPI.FinderGetUserPosts(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FinderAPI.FinderGetUserPosts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FinderGetUserPosts`: FinderGetUserPostsResponse
fmt.Fprintf(os.Stdout, "Response from `FinderAPI.FinderGetUserPosts`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiFinderGetUserPostsRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FinderSearchPostV2Response FinderSearchPostV2(ctx).FinderSearchPostsV2Request(finderSearchPostsV2Request).Execute()
جستجوی آگهیهای دیوار
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/divar-ir/kenar-sdk-go"
)
func main() {
finderSearchPostsV2Request := *openapiclient.NewFinderSearchPostsV2Request() // FinderSearchPostsV2Request |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FinderAPI.FinderSearchPostV2(context.Background()).FinderSearchPostsV2Request(finderSearchPostsV2Request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FinderAPI.FinderSearchPostV2``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FinderSearchPostV2`: FinderSearchPostV2Response
fmt.Fprintf(os.Stdout, "Response from `FinderAPI.FinderSearchPostV2`: %v\n", resp)
}Other parameters are passed through a pointer to a apiFinderSearchPostV2Request struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| finderSearchPostsV2Request | FinderSearchPostsV2Request |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]