Qollex.Contacts.Integrate
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Qollex.Contacts.Integrate --version 1.0.0
NuGet\Install-Package Qollex.Contacts.Integrate -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Qollex.Contacts.Integrate" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Qollex.Contacts.Integrate" Version="1.0.0" />
<PackageReference Include="Qollex.Contacts.Integrate" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Qollex.Contacts.Integrate --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Qollex.Contacts.Integrate, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Qollex.Contacts.Integrate@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Qollex.Contacts.Integrate&version=1.0.0
#tool nuget:?package=Qollex.Contacts.Integrate&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Qollex.Contacts.Integrate
Qollex.Contacts.Integrate is a lightweight and reusable .NET client library that provides seamless integration with the Qollex Contacts API. It enables developers to perform operations like retrieving, creating, updating, and deleting contacts via a simple, typed service wrapper.
📦 Installation
Install this package via NuGet:
dotnet add package Qollex.Contacts.Integrate
Or via the NuGet Package Manager in Visual Studio.
🔧 Configuration
Register the ContactApiService using HttpClient in your Program.cs or Startup.cs:
builder.Services.AddHttpClient<ContactApiService>(client =>
{
client.BaseAddress = new Uri("https://your-contacts-api-url/");
});
Replace the BaseAddress with the actual URL of your Contacts API.
🚀 Usage Example
public class ContactConsumer
{
private readonly ContactApiService _contactService;
public ContactConsumer(ContactApiService contactService)
{
_contactService = contactService;
}
public async Task<IEnumerable<ContactDto>> GetAll(string customerId)
{
return await _contactService.GetContactsAsync(customerId);
}
public async Task Create(string customerId)
{
var newContact = new CreateContactDto
{
FirstName = "John",
LastName = "Doe",
Email = "john.doe@example.com",
Phone = "+1234567890",
Address = "123 Elm Street",
DateOfBirth = new DateTime(1990, 1, 1),
Notes = "VIP customer",
AppUserId = "appuser-xyz"
};
await _contactService.CreateContactAsync(customerId, newContact);
}
}
📚 Available Methods
🔍 Get Contacts
Task<IEnumerable<ContactDto>> GetContactsAsync(
string customerId,
int page = 1,
int pageSize = 10,
string? search = null,
string? sortBy = null,
string? sortDir = "asc",
string? haveLogin = "yes"
)
🔍 Get by Contact ID
Task<ContactDto?> GetContactByIdAsync(string customerId, string id);
🔍 Get by AppUserId
Task<ContactDto?> GetByAppUserIdAsync(string customerId, string appUserId);
🖼️ Get Profile Picture by Contact ID
Task<string?> GetProfilePictureByIdAsync(string customerId, string id);
🖼️ Get Profile Picture by AppUserId
Task<string?> GetProfilePictureByAppUserIdAsync(string customerId, string appUserId);
➕ Create Contact
Task<ContactDto?> CreateContactAsync(string customerId, CreateContactDto dto);
✏️ Update Contact
Task<bool> UpdateContactAsync(string customerId, string id, UpdateContactDto dto);
🖼️ Update Profile Picture
Task<bool> UpdateProfilePictureAsync(string customerId, string id, string base64Image);
🗑️ Delete Contact
Task<bool> DeleteContactAsync(string customerId, string id);
🔗 Dependencies
.NET 8.0
Contacts.Models library (shared DTO and model classes)
📝 License
This library is licensed under the MIT License.
🏁 Author
Qollex Team
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Contacts.Models (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.