{"id":26681158,"url":"https://github.com/sharpapi/sharpapi-dotnet-docs","last_synced_at":"2026-04-25T22:34:08.703Z","repository":{"id":284485304,"uuid":"955098571","full_name":"sharpapi/sharpapi-dotnet-docs","owner":"sharpapi","description":"Automate Workflows with an AI-Powered API","archived":false,"fork":false,"pushed_at":"2025-03-26T05:25:48.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-26T06:26:15.410Z","etag":null,"topics":["dotnet","e-commerce-automation","hrtech-automation","nuget-package","sharpapi","travel-automation","workflow-automation"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/SharpApi.Service","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sharpapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-26T05:25:07.000Z","updated_at":"2025-03-26T06:16:15.000Z","dependencies_parsed_at":"2025-03-26T06:36:39.580Z","dependency_job_id":null,"html_url":"https://github.com/sharpapi/sharpapi-dotnet-docs","commit_stats":null,"previous_names":["sharpapi/sharpapi-dotnet-docs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Fsharpapi-dotnet-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Fsharpapi-dotnet-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Fsharpapi-dotnet-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Fsharpapi-dotnet-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharpapi","download_url":"https://codeload.github.com/sharpapi/sharpapi-dotnet-docs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245605719,"owners_count":20643030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","e-commerce-automation","hrtech-automation","nuget-package","sharpapi","travel-automation","workflow-automation"],"created_at":"2025-03-26T07:14:28.291Z","updated_at":"2026-04-25T22:34:03.679Z","avatar_url":"https://github.com/sharpapi.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"![SharpAPI GitHub cover](https://sharpapi.com/sharpapi-github-php-bg.jpg \"SharpAPI .NET Client\")\n\n# SharpAPI .NET Client SDK Documentation\n\n### 🚀 Automate Workflows with an AI-Powered API\n\nLeverage the SharpAPI service in your .NET applications to streamline tasks in E-Commerce, Marketing, Content Management, HR Tech, Travel, and more.\n\n[![Latest Version on NuGet](https://img.shields.io/nuget/v/SharpApi.Service.svg?style=flat-square)](https://www.nuget.org/packages/SharpApi.Service)\n[![Total Downloads](https://img.shields.io/nuget/dt/SharpApi.Service.svg?style=flat-square)](https://www.nuget.org/packages/SharpApi.Service)\n\nSee more at [SharpAPI.com Website \u0026raquo;](https://sharpapi.com/)\n\n---\n\n## Requirements\n\n- .NET 5.0 (or later) / .NET Core 3.1+\n- A valid SharpAPI API key – register at [SharpAPI.com](https://sharpapi.com/) to obtain one.\n\n---\n\n## ⛲ What Can It Do for You?\n\n* **E-commerce**\n  - Generate engaging product introductions.\n  - Create personalized thank-you emails.\n  - Streamline product categorization.\n  - Analyze product review sentiments.\n\n* **Content \u0026 Marketing Automation**\n  - Translate text for a global audience.\n  - Paraphrase, proofread, and summarize content.\n  - Detect spam and extract contact information.\n  - Generate unique keywords and SEO meta tags.\n\n* **HR Tech**\n  - Parse resumes (CV) from multiple file formats.\n  - Generate detailed job descriptions.\n  - Discover related skills and job positions.\n\n* **Travel, Tourism \u0026 Hospitality**\n  - Analyze travel review sentiments.\n  - Categorize tours, activities, and hospitality products.\n\n---\n\n## Installation\n\nYou can install the package via NuGet. In your project directory, run:\n\n```bash\ndotnet add package SharpApi.Service\n```\n\nAlternatively, install using the NuGet Package Manager in Visual Studio.\n\n---\n\n## Setup \u0026 Configuration\n\n### Dependency Injection\n\nThe SDK provides an extension method to easily register SharpAPI services into your dependency injection container. For example, in an ASP.NET Core application, update your `Program.cs` or `Startup.cs` as follows:\n\n```csharp\nusing SharpApi.Service;\n\n// Assuming you have configuration in appsettings.json under \"SharpApi\"\nbuilder.Services.AddSharpApi(builder.Configuration.GetSection(\"SharpApi\"));\n```\n\n### Configuration Settings\n\nIn your configuration file (e.g. `appsettings.json`), include a SharpAPI section similar to:\n\n```json\n{\n  \"SharpApi\": {\n    \"ApiKey\": \"YOUR_SHARPAPI_API_KEY\",\n    \"BaseAddress\": \"https://sharpapi.com\",\n    \"MaximumDurationOfGettingResultInSeconds\": 180,\n    \"DefaultHttpRetryAfterInSeconds\": 10,\n    \"OverrideHttpRetryAfterWithClientDefault\": false,\n    \"MaximumNumberOfHttpRedirections\": 5,\n    \"ValidResumeFileExtensions\": [ \"pdf\", \"doc\", \"docx\", \"txt\", \"rtf\" ]\n  }\n}\n```\n\n---\n\n## Usage\n\nThe SDK exposes the `ISharpApiService` interface that provides asynchronous methods for calling the SharpAPI endpoints.\n\n### Simple Example\n\nBelow is a basic example demonstrating how to call the `PingAsync` endpoint to check API availability:\n\n```csharp\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Configuration;\nusing SharpApi.Service;\nusing System;\nusing System.Threading;\nusing System.Threading.Tasks;\n\npublic class Program\n{\n    public static async Task Main(string[] args)\n    {\n        // Build configuration and register services\n        var configuration = new ConfigurationBuilder()\n            .AddJsonFile(\"appsettings.json\")\n            .Build();\n\n        var services = new ServiceCollection();\n        services.AddSharpApi(configuration.GetSection(\"SharpApi\"));\n        var serviceProvider = services.BuildServiceProvider();\n\n        // Resolve the SharpAPI service\n        var sharpApiService = serviceProvider.GetRequiredService\u003cISharpApiService\u003e();\n\n        // Example call to the Ping endpoint\n        var pingResponse = await sharpApiService.PingAsync(CancellationToken.None);\n        Console.WriteLine($\"Ping: {pingResponse.Ping}, Timestamp: {pingResponse.Timestamp}\");\n    }\n}\n```\n\n### Using Other API Methods\n\nEach method dispatches a job request that returns a status URL. The SDK internally polls until the job status is `success` (or `failed` if an error occurred). Below are full code samples for all available endpoints:\n\n---\n\n## Code Samples for All API Endpoints\n\n### General Endpoints\n\n#### Ping\n```csharp\nvar pingResponse = await sharpApiService.PingAsync(CancellationToken.None);\nConsole.WriteLine($\"Ping: {pingResponse.Ping}, Timestamp: {pingResponse.Timestamp}\");\n```\n\n#### Quota\n```csharp\nvar quota = await sharpApiService.QuotaAsync(CancellationToken.None);\nConsole.WriteLine($\"Subscription Words Used: {quota.SubscriptionWordsUsed} out of {quota.SubscriptionWordsQuota}\");\n```\n\n---\n\n### HR Endpoints\n\n#### Parse Resume/CV\n```csharp\nvar resume = await sharpApiService.ParseResumeAsync(\"path/to/resume.pdf\", CancellationToken.None);\n// Resume is returned as a structured object with details such as CandidateName, Positions, EducationQualifications, etc.\nConsole.WriteLine($\"Candidate Name: {resume.CandidateName}\");\n```\n\n#### Generate Job Description\n```csharp\nvar jobRequest = new JobDescriptionRequest\n{\n    Name = \"C# Senior Developer\",\n    CompanyName = \"ACME Corp\",\n    MinimumWorkExperience = \"5 years\",\n    MinimumEducation = \"Bachelor's Degree\",\n    RequiredSkills = new[] { \"C#\", \".NET\", \"SQL\" },\n    OptionalSkills = new[] { \"Azure\", \"Microservices\" },\n    Country = \"United States\",\n    Remote = true,\n    VisaSponsored = false,\n    Language = Language.English,\n    VoiceTone = \"Professional\",\n    Context = \"Detailed job role for senior level\"\n};\n\nvar jobDescription = await sharpApiService.JobDescriptionAsync(jobRequest, CancellationToken.None);\nConsole.WriteLine($\"Job Short Description: {jobDescription.JobShortDescription}\");\n```\n\n#### Related Skills\n```csharp\nvar relatedSkills = await sharpApiService.RelatedSkillsAsync(\n    new RelatedSkillsRequest { Content = \"C#\", Language = Language.English, MaxQuantity = 10 },\n    CancellationToken.None\n);\n\nConsole.WriteLine(\"Related Skills:\");\nforeach (var skill in relatedSkills.RelatedSkills)\n{\n    Console.WriteLine($\"Skill: {skill.Name}, Weight: {skill.Weight}\");\n}\n```\n\n#### Related Job Positions\n```csharp\nvar relatedJobs = await sharpApiService.RelatedJobPositionsAsync(\n    new RelatedJobPositionsRequest { Content = \"Senior Developer\", Language = Language.English, MaxQuantity = 10 },\n    CancellationToken.None\n);\n\nConsole.WriteLine(\"Related Job Positions:\");\nforeach (var job in relatedJobs.RelatedJobPositions)\n{\n    Console.WriteLine($\"Job Position: {job.Name}, Weight: {job.Weight}\");\n}\n```\n\n---\n\n### E-commerce Endpoints\n\n#### Product Review Sentiment Analysis\n```csharp\nvar sentimentResult = await sharpApiService.ReviewSentimentAsync(\"The product is excellent, highly recommended!\", CancellationToken.None);\nConsole.WriteLine($\"Sentiment: {sentimentResult.opinion}, Score: {sentimentResult.score}\");\n```\n\n#### Product Categories\n```csharp\nvar categories = await sharpApiService.ProductCategoriesAsync(\n    new ProductCategoriesRequest \n    { \n        Content = \"Smartphone with great camera features\", \n        Language = Language.English, \n        MaxQuantity = 5, \n        VoiceTone = \"Neutral\", \n        Context = \"Electronics\" \n    },\n    CancellationToken.None\n);\n\nConsole.WriteLine(\"Product Categories:\");\nforeach (var category in categories)\n{\n    Console.WriteLine($\"Category: {category.Name}, Weight: {category.Weight}\");\n}\n```\n\n#### Product Introduction\n```csharp\nvar productIntro = await sharpApiService.ProductIntroAsync(\n    new ProductIntroRequest \n    { \n        Content = \"This smartphone features a powerful camera and sleek design.\", \n        Language = Language.English, \n        MaxLength = 300, \n        VoiceTone = \"Energetic\" \n    },\n    CancellationToken.None\n);\nConsole.WriteLine(\"Product Introduction: \" + productIntro.ProductIntro);\n```\n\n#### Thank You Email Generation\n```csharp\nvar thankYouEmail = await sharpApiService.ThankYouEmailAsync(\n    new ThankYouEmailRequest \n    { \n        Content = \"Thank you for your purchase!\", \n        Language = Language.English, \n        VoiceTone = \"Friendly\", \n        Context = \"Include a discount offer for next purchase\" \n    },\n    CancellationToken.None\n);\nConsole.WriteLine(\"Thank You Email: \" + thankYouEmail.email);\n```\n\n---\n\n### Content \u0026 Marketing Automation Endpoints\n\n#### Detect Phone Numbers\n```csharp\nvar phoneNumbers = await sharpApiService.DetectPhoneNumbersAsync(\"Call us at 1800-394-7486 or +1-800-555-1234\", CancellationToken.None);\nforeach (var phone in phoneNumbers)\n{\n    Console.WriteLine($\"Detected: {phone.DetectedNumber}, Parsed: {phone.ParsedNumber}\");\n}\n```\n\n#### Detect Emails\n```csharp\nvar emails = await sharpApiService.DetectEmailsAsync(\"Contact us at info@example.com or support@example.org\", CancellationToken.None);\nConsole.WriteLine(\"Detected Emails:\");\nforeach (var email in emails)\n{\n    Console.WriteLine(email);\n}\n```\n\n#### Detect Spam\n```csharp\nvar spamResult = await sharpApiService.DetectSpamAsync(\"This is a free money offer!\", CancellationToken.None);\nConsole.WriteLine($\"Spam Passed: {spamResult.Pass}, Score: {spamResult.Score}, Reason: {spamResult.Reason}\");\n```\n\n#### Summarize Content\n```csharp\nvar summary = await sharpApiService.SummarizeAsync(\n    new SummarizeRequest \n    { \n        Content = \"Long text content that needs summarizing goes here...\", \n        Language = Language.English, \n        VoiceTone = \"Neutral\", \n        MaxLength = 150 \n    },\n    CancellationToken.None\n);\nConsole.WriteLine(\"Summary: \" + summary.Summary);\n```\n\n#### Generate Keywords/Tags\n```csharp\nvar keywords = await sharpApiService.GenerateKeywordsAsync(\n    new GenerateKeywordsRequest \n    { \n        Content = \"Innovative and groundbreaking smartphone with advanced features.\", \n        Language = Language.English, \n        MaxQuantity = 5, \n        VoiceTone = \"Informative\" \n    },\n    CancellationToken.None\n);\nConsole.WriteLine(\"Keywords: \" + string.Join(\", \", keywords));\n```\n\n#### Translate Text\n```csharp\nvar translation = await sharpApiService.TranslateAsync(\n    new TranslateRequest \n    { \n        Content = \"Hello, how are you?\", \n        Language = Language.French, \n        VoiceTone = \"Neutral\", \n        Context = \"Greeting\" \n    },\n    CancellationToken.None\n);\nConsole.WriteLine($\"Translated Content: {translation.Content}, From: {translation.FromLanguage.Value}, To: {translation.ToLanguage.Value}\");\n```\n\n#### Paraphrase Content\n```csharp\nvar paraphrase = await sharpApiService.ParaphrazeAsync(\n    new ParaphraseRequest \n    { \n        Content = \"Original content that needs to be rephrased.\", \n        MaxLength = 250, \n        Language = Language.English, \n        VoiceTone = \"Formal\", \n        Context = \"Use synonyms where applicable\" \n    },\n    CancellationToken.None\n);\nConsole.WriteLine(\"Paraphrased Text: \" + paraphrase.Paraphrase);\n```\n\n#### Proofread Text\n```csharp\nvar proofreadResult = await sharpApiService.ProofReadAsync(\"This are a sample text with error.\", CancellationToken.None);\nConsole.WriteLine(\"Proofread Text: \" + proofreadResult.Proofread);\n```\n\n---\n\n### SEO Endpoints\n\n#### Generate SEO Meta Tags\n```csharp\nvar seoTags = await sharpApiService.GenerateSeoTagsAsync(\n    new GenerateSeoTagsRequest \n    { \n        Content = \"Content for generating SEO meta tags\", \n        VoiceTone = \"Professional\" \n    },\n    CancellationToken.None\n);\nConsole.WriteLine(\"SEO Title: \" + seoTags.MetaTags.Title);\n```\n\n---\n\n### Travel, Tourism \u0026 Hospitality Endpoints\n\n#### Travel Review Sentiment Analysis\n```csharp\nvar travelSentiment = await sharpApiService.TravelReviewSentimentAsync(\"I loved the service and the ambiance was perfect.\", CancellationToken.None);\nConsole.WriteLine($\"Travel Sentiment: {travelSentiment.Opinion}, Score: {travelSentiment.Score}\");\n```\n\n#### Tours \u0026 Activities Product Categories\n```csharp\nvar taCategories = await sharpApiService.ToursAndActivitiesProductCategoriesAsync(\n    new ToursAndActivitiesProductCategoriesRequest \n    { \n        Content = \"Adventure tour in the mountains\", \n        City = \"Denver\", \n        Country = \"USA\", \n        Language = Language.English, \n        MaxQuantity = 3, \n        VoiceTone = \"Exciting\", \n        Context = \"Outdoor adventures\" \n    },\n    CancellationToken.None\n);\nConsole.WriteLine(\"Tours \u0026 Activities Categories:\");\nforeach (var category in taCategories)\n{\n    Console.WriteLine($\"Category: {category.Name}, Weight: {category.Weight}\");\n}\n```\n\n#### Hospitality Product Categories\n```csharp\nvar hospitalityCategories = await sharpApiService.HospitalityProductCategoriesAsync(\n    new HospitalityProductCategoriesRequest \n    { \n        Content = \"Luxury hotel with spa and gourmet dining\", \n        City = \"Paris\", \n        Country = \"France\", \n        Language = Language.English, \n        MaxQuantity = 3, \n        VoiceTone = \"Elegant\", \n        Context = \"Luxury hospitality\" \n    },\n    CancellationToken.None\n);\nConsole.WriteLine(\"Hospitality Categories:\");\nforeach (var category in hospitalityCategories)\n{\n    Console.WriteLine($\"Category: {category.Name}, Weight: {category.Weight}\");\n}\n```\n\n---\n\n## Error Handling\n\nThe SDK uses standard .NET exceptions (such as `HttpRequestException` and custom `SharpApiException`) to report errors. Make sure to catch these exceptions to handle API timeouts, validation errors, or unexpected response statuses gracefully.\n\n---\n\n## API Documentation\n\nFor detailed information on API endpoints, request parameters, and response formats, please refer to the official [API Documentation](https://sharpapi.com/documentation).\n\n---\n\n## Contributing\n\nContributions are welcome! If you encounter issues or have suggestions for improvements, please open an issue or submit a pull request on [GitHub](https://github.com/sharpapi/SharpApi.Service).\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n---\n\nHappy coding with SharpAPI .NET Client SDK!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpapi%2Fsharpapi-dotnet-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharpapi%2Fsharpapi-dotnet-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpapi%2Fsharpapi-dotnet-docs/lists"}