-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(csharp): add guides #2695
docs(csharp): add guides #2695
Conversation
✅ Deploy Preview for api-clients-automation ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✗ The generated branch has been deleted.If the PR has been merged, you can check the generated code on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the content is really good !
My only remark is about indentation, I didn't spot everything but it shows up in docusaurus, so it would be nice to have consistent indents
var client = new SearchClient("<YOUR_APP_ID>", "<YOUR_API_KEY>"); | ||
await client.SetSettingsAsync("YOUR_INDEX_NAME", new IndexSettings { | ||
AttributesForFaceting = new List<string> { "actor", "filterOnly(category)", "searchable(publisher)" } | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}); | |
}); |
var client = new SearchClient("<YOUR_APP_ID>", "<YOUR_API_KEY>"); | ||
|
||
client.Search<Hit>(new SearchMethodParams(new List<SearchQuery> | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this indentation is a bit messed up here
</TabItem> | ||
<TabItem value="csharp"> | ||
|
||
```csharp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove the spaces here and at the end pls ?
|
||
<TabItem value="csharp" > | ||
|
||
```csharp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
If you are using the .NET CLI, you can install the package using the following command: | ||
|
||
```bash | ||
dotnet add package Algolia.Search --version [The version you want to install] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usually we have <>
for required parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what you mean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<The version you want to install>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh okay understood
using Algolia.Search.Utils; | ||
|
||
var response = await client.SaveObjectAsync("<YOUR_INDEX_NAME>", | ||
new { firstName = "john", lastname = "doe" }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new { firstName = "john", lastname = "doe" }); | |
new { firstName = "john", lastname = "doe" }); |
|
||
public class Actor : Hit | ||
{ | ||
[DataMember(Name = "name")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It's the way we tell the serializer that we want to serialize the field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I have an issue. Dam.
|
||
<TabItem value="csharp"> | ||
|
||
```csharp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing to add it looks pretty nice!
there seems to be some spacing issue, maybe copy all your examples in the playground and format them, the re-copy them in the doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wonderful!
|
||
<TabItem value="csharp"> | ||
|
||
> Create your own requester by creating a class that implements `IHttpRequester`, and use it by passing it to the client constructor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> Create your own requester by creating a class that implements `IHttpRequester`, and use it by passing it to the client constructor. | |
> Create your own requester by creating a class that implements `IHttpRequester`, and use it by passing it to the client constructor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch !
🧭 What and Why
🎟 JIRA Ticket: DI-1812
Changes included: