Meetup.Api is a modern, asynchronous .NET library for interacting with the Meetup API.
- .NET 10 Support: Built for the latest .NET ecosystem.
- Dependency Injection: Designed with
IMeetupClientandIHttpClientFactoryfor easy integration into modern .NET applications. - Asynchronous: Fully async/await support for all API calls.
- Strongly Typed: Comprehensive models for Meetup API responses (Events, Groups, Venues, etc.).
- No Hardcoded Secrets: Secure design requiring configuration injection.
Install the package via NuGet:
dotnet add package Meetup.ApiIn your Program.cs or Startup.cs, register the Meetup API client:
using Meetup.Api;
var builder = WebApplication.CreateBuilder(args);
// Add MeetupApi to the container
builder.Services.AddMeetupApi(client =>
{
// Optional: Configure the HttpClient here (e.g., headers, timeouts)
// Note: Authentication is typically handled via OAuth tokens passed in headers
});
var app = builder.Build();Inject IMeetupClient into your services or controllers:
public class MyMeetupService
{
private readonly IMeetupClient _meetupClient;
public MyMeetupService(IMeetupClient meetupClient)
{
_meetupClient = meetupClient;
}
public async Task<bool> CheckApiStatusAsync()
{
return await _meetupClient.GetStatusAsync();
}
public async Task<IEnumerable<Event>> GetEventsAsync(string groupUrlName)
{
var events = await _meetupClient.GetEventsAsync(groupUrlName);
return events.Results;
}
}The library provides full flexibility with ExecuteQueryAsync:
var query = @"
query {
self {
id
name
email
}
}";
var result = await _client.ExecuteQueryAsync<dynamic>(query);var events = await _client.GetEventsAsync("CrossDevelopment-Madrid");
foreach (var evt in events.results)
{
Console.WriteLine($"Event: {evt.Name} at {DateTimeOffset.FromUnixTimeMilliseconds(evt.Time)}");
}var isHealthy = await _client.GetStatusAsync();
Console.WriteLine($"API Status: {(isHealthy ? "Healthy" : "Unhealthy")}");var group = await _client.GetGroupAsync("CrossDevelopment-Madrid");
if (group != null)
{
Console.WriteLine($"Group: {group.Name}, Members: {group.Members}");
}var event = await _client.GetEventByIdAsync("event-id-123");
if (event != null)
{
Console.WriteLine($"Event: {event.Name}");
}var user = await _client.GetSelfAsync();
if (user != null)
{
Console.WriteLine($"User: {user.Name} from {user.City}");
}We welcome contributions! Please see CONTRIBUTING.md for details on how to submit pull requests, report issues, and the code of conduct.
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2019-2025 Dachi Gogotchuri
