Skip to content

Commit

Permalink
add support for TrackEvent, Experiment, Banners (#5)
Browse files Browse the repository at this point in the history
- new accountId param added to QueryCollection and SendEvent requests
  • Loading branch information
jkaho authored Mar 14, 2022
1 parent 8f203cd commit 75fc617
Show file tree
Hide file tree
Showing 76 changed files with 3,243 additions and 454 deletions.
43 changes: 24 additions & 19 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Com.Sajari.Sdk.sln
README.md
appveyor.yml
docs/ActivePromotion.md
docs/Banner.md
docs/BatchCreateSchemaFieldsRequest.md
docs/BatchCreateSchemaFieldsResponse.md
docs/BatchCreateSchemaFieldsResponseError.md
Expand All @@ -20,7 +21,11 @@ docs/Collection.md
docs/CollectionsApi.md
docs/DeleteRecordRequest.md
docs/Error.md
docs/Event.md
docs/EventsApi.md
docs/ExperimentRequest.md
docs/ExperimentRequestPipeline.md
docs/ExperimentResponse.md
docs/GeneratePipelinesRequest.md
docs/GeneratePipelinesResponse.md
docs/GetDefaultPipelineResponse.md
Expand All @@ -30,6 +35,7 @@ docs/GetRecordRequest.md
docs/ListCollectionsResponse.md
docs/ListPipelinesRequestView.md
docs/ListPipelinesResponse.md
docs/ListPromotionsRequestPromotionView.md
docs/ListPromotionsResponse.md
docs/ListRedirectsResponse.md
docs/ListSchemaFieldsResponse.md
Expand All @@ -45,6 +51,7 @@ docs/PromotionExclusion.md
docs/PromotionFilterBoost.md
docs/PromotionFilterCondition.md
docs/PromotionPin.md
docs/PromotionPinMode.md
docs/PromotionRangeBoost.md
docs/PromotionsApi.md
docs/ProtobufAny.md
Expand Down Expand Up @@ -81,30 +88,20 @@ docs/SendEventRequest.md
docs/SetDefaultPipelineRequest.md
docs/SetDefaultVersionRequest.md
docs/Status.md
docs/TextPosition.md
docs/UpdateRecordRequest.md
docs/UpsertRecordRequest.md
docs/UpsertRecordRequestPipeline.md
docs/UpsertRecordResponse.md
src/Com.Sajari.Sdk.Test/Api/PromotionsApiTests.cs
src/Com.Sajari.Sdk.Test/Api/RedirectsApiTests.cs
src/Com.Sajari.Sdk.Test/Com.Sajari.Sdk.Test.csproj
src/Com.Sajari.Sdk.Test/Model/ActivePromotionTests.cs
src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsRequestTests.cs
src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsResponseErrorTests.cs
src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsResponseRecordTests.cs
src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsResponseTests.cs
src/Com.Sajari.Sdk.Test/Model/ListPromotionsResponseTests.cs
src/Com.Sajari.Sdk.Test/Model/ListRedirectsResponseTests.cs
src/Com.Sajari.Sdk.Test/Model/PromotionCategoryTests.cs
src/Com.Sajari.Sdk.Test/Model/PromotionExclusionTests.cs
src/Com.Sajari.Sdk.Test/Model/PromotionFilterBoostTests.cs
src/Com.Sajari.Sdk.Test/Model/PromotionFilterConditionTests.cs
src/Com.Sajari.Sdk.Test/Model/PromotionPinTests.cs
src/Com.Sajari.Sdk.Test/Model/PromotionRangeBoostTests.cs
src/Com.Sajari.Sdk.Test/Model/PromotionTests.cs
src/Com.Sajari.Sdk.Test/Model/ProtobufFieldMaskTests.cs
src/Com.Sajari.Sdk.Test/Model/RedirectResultTests.cs
src/Com.Sajari.Sdk.Test/Model/RedirectTests.cs
src/Com.Sajari.Sdk.Test/Model/BannerTests.cs
src/Com.Sajari.Sdk.Test/Model/EventTests.cs
src/Com.Sajari.Sdk.Test/Model/ExperimentRequestPipelineTests.cs
src/Com.Sajari.Sdk.Test/Model/ExperimentRequestTests.cs
src/Com.Sajari.Sdk.Test/Model/ExperimentResponseTests.cs
src/Com.Sajari.Sdk.Test/Model/ListPromotionsRequestPromotionViewTests.cs
src/Com.Sajari.Sdk.Test/Model/PromotionPinModeTests.cs
src/Com.Sajari.Sdk.Test/Model/TextPositionTests.cs
src/Com.Sajari.Sdk/Api/CollectionsApi.cs
src/Com.Sajari.Sdk/Api/EventsApi.cs
src/Com.Sajari.Sdk/Api/PipelinesApi.cs
Expand All @@ -131,6 +128,7 @@ src/Com.Sajari.Sdk/Client/RetryConfiguration.cs
src/Com.Sajari.Sdk/Com.Sajari.Sdk.csproj
src/Com.Sajari.Sdk/Model/AbstractOpenAPISchema.cs
src/Com.Sajari.Sdk/Model/ActivePromotion.cs
src/Com.Sajari.Sdk/Model/Banner.cs
src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsRequest.cs
src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsResponse.cs
src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsResponseError.cs
Expand All @@ -147,6 +145,10 @@ src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponseVariables.cs
src/Com.Sajari.Sdk/Model/Collection.cs
src/Com.Sajari.Sdk/Model/DeleteRecordRequest.cs
src/Com.Sajari.Sdk/Model/Error.cs
src/Com.Sajari.Sdk/Model/Event.cs
src/Com.Sajari.Sdk/Model/ExperimentRequest.cs
src/Com.Sajari.Sdk/Model/ExperimentRequestPipeline.cs
src/Com.Sajari.Sdk/Model/ExperimentResponse.cs
src/Com.Sajari.Sdk/Model/GeneratePipelinesRequest.cs
src/Com.Sajari.Sdk/Model/GeneratePipelinesResponse.cs
src/Com.Sajari.Sdk/Model/GetDefaultPipelineResponse.cs
Expand All @@ -156,6 +158,7 @@ src/Com.Sajari.Sdk/Model/GetRecordRequest.cs
src/Com.Sajari.Sdk/Model/ListCollectionsResponse.cs
src/Com.Sajari.Sdk/Model/ListPipelinesRequestView.cs
src/Com.Sajari.Sdk/Model/ListPipelinesResponse.cs
src/Com.Sajari.Sdk/Model/ListPromotionsRequestPromotionView.cs
src/Com.Sajari.Sdk/Model/ListPromotionsResponse.cs
src/Com.Sajari.Sdk/Model/ListRedirectsResponse.cs
src/Com.Sajari.Sdk/Model/ListSchemaFieldsResponse.cs
Expand All @@ -170,6 +173,7 @@ src/Com.Sajari.Sdk/Model/PromotionExclusion.cs
src/Com.Sajari.Sdk/Model/PromotionFilterBoost.cs
src/Com.Sajari.Sdk/Model/PromotionFilterCondition.cs
src/Com.Sajari.Sdk/Model/PromotionPin.cs
src/Com.Sajari.Sdk/Model/PromotionPinMode.cs
src/Com.Sajari.Sdk/Model/PromotionRangeBoost.cs
src/Com.Sajari.Sdk/Model/ProtobufAny.cs
src/Com.Sajari.Sdk/Model/ProtobufFieldMask.cs
Expand Down Expand Up @@ -202,6 +206,7 @@ src/Com.Sajari.Sdk/Model/SendEventRequest.cs
src/Com.Sajari.Sdk/Model/SetDefaultPipelineRequest.cs
src/Com.Sajari.Sdk/Model/SetDefaultVersionRequest.cs
src/Com.Sajari.Sdk/Model/Status.cs
src/Com.Sajari.Sdk/Model/TextPosition.cs
src/Com.Sajari.Sdk/Model/UpdateRecordRequest.cs
src/Com.Sajari.Sdk/Model/UpsertRecordRequest.cs
src/Com.Sajari.Sdk/Model/UpsertRecordRequestPipeline.cs
Expand Down
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.1
5.4.0
10 changes: 5 additions & 5 deletions Com.Sajari.Sdk.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Com.Sajari.Sdk", "src\Com.Sajari.Sdk\Com.Sajari.Sdk.csproj", "{F43DF556-4B80-4335-95A6-C0E8DE8BBDCA}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Com.Sajari.Sdk", "src\Com.Sajari.Sdk\Com.Sajari.Sdk.csproj", "{AB2FC7D6-7D1E-495D-B4ED-C2CC60E8488D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Com.Sajari.Sdk.Test", "src\Com.Sajari.Sdk.Test\Com.Sajari.Sdk.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
Expand All @@ -12,10 +12,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F43DF556-4B80-4335-95A6-C0E8DE8BBDCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F43DF556-4B80-4335-95A6-C0E8DE8BBDCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F43DF556-4B80-4335-95A6-C0E8DE8BBDCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F43DF556-4B80-4335-95A6-C0E8DE8BBDCA}.Release|Any CPU.Build.0 = Release|Any CPU
{AB2FC7D6-7D1E-495D-B4ED-C2CC60E8488D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB2FC7D6-7D1E-495D-B4ED-C2CC60E8488D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB2FC7D6-7D1E-495D-B4ED-C2CC60E8488D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB2FC7D6-7D1E-495D-B4ED-C2CC60E8488D}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Search.io offers a search and discovery service with Neuralsearch®, the world's
This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: v4
- SDK version: 4.3.0
- SDK version: 5.0.0
- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen
For more information, please visit [https://www.search.io/company/contact](https://www.search.io/company/contact)

Expand Down Expand Up @@ -79,7 +79,7 @@ namespace Example
config.Password = "YOUR_PASSWORD";

var apiInstance = new CollectionsApi(config);
var collectionId = collectionId_example; // string | The ID to use for the collection. This must start with an alphanumeric character followed by one or more alphanumeric or `-` characters. Strictly speaking, it must match the regular expression: `^[A-Za-z][A-Za-z0-9\\-]*$`.
var collectionId = "collectionId_example"; // string | The ID to use for the collection. This must start with an alphanumeric character followed by one or more alphanumeric or `-` characters. Strictly speaking, it must match the regular expression: `^[A-Za-z][A-Za-z0-9\\-]*$`.
var collection = new Collection(); // Collection | Details of the collection to create.
try
Expand Down Expand Up @@ -109,10 +109,12 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*CollectionsApi* | [**CreateCollection**](docs/CollectionsApi.md#createcollection) | **POST** /v4/collections | Create collection
*CollectionsApi* | [**DeleteCollection**](docs/CollectionsApi.md#deletecollection) | **DELETE** /v4/collections/{collection_id} | Delete collection
*CollectionsApi* | [**Experiment**](docs/CollectionsApi.md#experiment) | **POST** /v4/collections/{collection_id}:experiment | Experiment
*CollectionsApi* | [**GetCollection**](docs/CollectionsApi.md#getcollection) | **GET** /v4/collections/{collection_id} | Get collection
*CollectionsApi* | [**ListCollections**](docs/CollectionsApi.md#listcollections) | **GET** /v4/collections | List collections
*CollectionsApi* | [**QueryCollection**](docs/CollectionsApi.md#querycollection) | **POST** /v4/collections/{collection_id}:query | Query collection
*CollectionsApi* | [**QueryCollection2**](docs/CollectionsApi.md#querycollection2) | **POST** /v4/collections/{collection_id}:queryCollection | Query collection
*CollectionsApi* | [**TrackEvent**](docs/CollectionsApi.md#trackevent) | **POST** /v4/collections/{collection_id}:trackEvent | Track event
*CollectionsApi* | [**UpdateCollection**](docs/CollectionsApi.md#updatecollection) | **PATCH** /v4/collections/{collection_id} | Update collection
*EventsApi* | [**SendEvent**](docs/EventsApi.md#sendevent) | **POST** /v4/events:send | Send event
*EventsApi* | [**SendEvent2**](docs/EventsApi.md#sendevent2) | **POST** /v4/events:sendEvent | Send event
Expand Down Expand Up @@ -149,6 +151,7 @@ Class | Method | HTTP request | Description
## Documentation for Models

- [Model.ActivePromotion](docs/ActivePromotion.md)
- [Model.Banner](docs/Banner.md)
- [Model.BatchCreateSchemaFieldsRequest](docs/BatchCreateSchemaFieldsRequest.md)
- [Model.BatchCreateSchemaFieldsResponse](docs/BatchCreateSchemaFieldsResponse.md)
- [Model.BatchCreateSchemaFieldsResponseError](docs/BatchCreateSchemaFieldsResponseError.md)
Expand All @@ -165,6 +168,10 @@ Class | Method | HTTP request | Description
- [Model.Collection](docs/Collection.md)
- [Model.DeleteRecordRequest](docs/DeleteRecordRequest.md)
- [Model.Error](docs/Error.md)
- [Model.Event](docs/Event.md)
- [Model.ExperimentRequest](docs/ExperimentRequest.md)
- [Model.ExperimentRequestPipeline](docs/ExperimentRequestPipeline.md)
- [Model.ExperimentResponse](docs/ExperimentResponse.md)
- [Model.GeneratePipelinesRequest](docs/GeneratePipelinesRequest.md)
- [Model.GeneratePipelinesResponse](docs/GeneratePipelinesResponse.md)
- [Model.GetDefaultPipelineResponse](docs/GetDefaultPipelineResponse.md)
Expand All @@ -174,6 +181,7 @@ Class | Method | HTTP request | Description
- [Model.ListCollectionsResponse](docs/ListCollectionsResponse.md)
- [Model.ListPipelinesRequestView](docs/ListPipelinesRequestView.md)
- [Model.ListPipelinesResponse](docs/ListPipelinesResponse.md)
- [Model.ListPromotionsRequestPromotionView](docs/ListPromotionsRequestPromotionView.md)
- [Model.ListPromotionsResponse](docs/ListPromotionsResponse.md)
- [Model.ListRedirectsResponse](docs/ListRedirectsResponse.md)
- [Model.ListSchemaFieldsResponse](docs/ListSchemaFieldsResponse.md)
Expand All @@ -188,6 +196,7 @@ Class | Method | HTTP request | Description
- [Model.PromotionFilterBoost](docs/PromotionFilterBoost.md)
- [Model.PromotionFilterCondition](docs/PromotionFilterCondition.md)
- [Model.PromotionPin](docs/PromotionPin.md)
- [Model.PromotionPinMode](docs/PromotionPinMode.md)
- [Model.PromotionRangeBoost](docs/PromotionRangeBoost.md)
- [Model.ProtobufAny](docs/ProtobufAny.md)
- [Model.ProtobufFieldMask](docs/ProtobufFieldMask.md)
Expand Down Expand Up @@ -220,6 +229,7 @@ Class | Method | HTTP request | Description
- [Model.SetDefaultPipelineRequest](docs/SetDefaultPipelineRequest.md)
- [Model.SetDefaultVersionRequest](docs/SetDefaultVersionRequest.md)
- [Model.Status](docs/Status.md)
- [Model.TextPosition](docs/TextPosition.md)
- [Model.UpdateRecordRequest](docs/UpdateRecordRequest.md)
- [Model.UpsertRecordRequest](docs/UpsertRecordRequest.md)
- [Model.UpsertRecordRequestPipeline](docs/UpsertRecordRequestPipeline.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/ActivePromotion.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Com.Sajari.Sdk.Model.ActivePromotion
ActivePromotion is a promotion that is active for a given search.
A promotion that is active for a given search.

## Properties

Expand Down
20 changes: 20 additions & 0 deletions docs/Banner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Com.Sajari.Sdk.Model.Banner
A synthetic search result that renders as an image. It takes a user to a pre-determined location when clicked.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Description** | **string** | The description of the banner, displayed in sub-head font. | [optional]
**Height** | **int** | The height the banner occupies in grid cells. | [optional]
**Id** | **string** | The ID of the banner, used to identify clicked banners. | [optional]
**ImageUrl** | **string** | The URL of the image used for the banner. | [optional]
**Position** | **int** | The 1-based index indicating where the banner appears in search results. | [optional]
**TargetUrl** | **string** | The URL to redirect the user to when the banner is clicked. | [optional]
**TextColor** | **string** | The color of the text as a hex code with a # prefix, e.g. #FFCC00 or #FC0. | [optional]
**TextPosition** | **TextPosition** | | [optional]
**Title** | **string** | The title of the banner, displayed in header font. | [optional]
**Width** | **int** | The width the banner occupies in grid cells. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

2 changes: 1 addition & 1 deletion docs/Collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AccountId** | **string** | Output only. The ID of the account that owns this collection. | [optional] [readonly]
**AuthorizedQueryDomains** | **List<string>** | The list of authorized query domains for the collection. Client-side / browser requests to the [QueryCollection](/api#operation/QueryCollection) call can be made by any authorized query domain or any of its subdomains. This allows your interface to make search requests without having to provide an API key in the client-side request. | [optional]
**AuthorizedQueryDomains** | **List<string>** | The list of authorized query domains for the collection. Client-side / browser requests to the [QueryCollection](/docs/api#operation/QueryCollection) call can be made by any authorized query domain or any of its subdomains. This allows your interface to make search requests without having to provide an API key in the client-side request. | [optional]
**CreateTime** | **DateTime** | Output only. Time the collection was created. | [optional] [readonly]
**DisplayName** | **string** | The collection's display name. You can change this at any time. |
**Id** | **string** | Output only. The collection's ID. | [optional] [readonly]
Expand Down
Loading

0 comments on commit 75fc617

Please sign in to comment.