Skip to main content
Any Framework

Advocu C# - An Advocu client for .NET

Published
Dec 22, 2025
10mo ago
Total Downloads
1.6K
1,627

Install

dotnet add package Advocu --version 0.0.3

No framework information available.

README

Advocu C#

An Advocu client for .NET

đź‘‹ Hello Google Developer Experts!

Reporting your awesome community work shouldn't be a chore. Whether you want to integrate reporting directly into your own .NET applications or prefer a quick command-line tool to submit your activities, we've got you covered. This library provides a friendly C# client for the Advocu Personal API and a powerful CLI tool to streamline your GDE reporting activities.

🚀 Getting Started

Library

Add the client library to your .NET project:

dotnet add package Advocu

CLI Tool

Install the advocu global tool to use it from anywhere:

dotnet tool install --global Advocu

đź’» Using the AdvocuApiClient

The AdvocuApiClient is the heart of the library, designed to make interacting with the Advocu API smooth and type-safe.

Setup using Dependency Injection

In your Program.cs or startup configuration, you can easily register the client with your service collection:

using Advocu;

var builder = Host.CreateApplicationBuilder(args);

// Register the Advocu Client
builder.Services.AddHttpClient<AdvocuApiClient>((provider, client) =>
{
    // You can load these from your configuration
    var accessToken = provider.GetRequiredService<IConfiguration>()["Advocu:AccessToken"];
    client.BaseAddress = new Uri("https://api.advocu.com/personal-api/v1/gde/");
    client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
});

var host = builder.Build();

Example: Reporting a Workshop

Here's how you can create and submit a draft for a workshop you just hosted:

using Advocu;

public async Task ReportWorkshop(AdvocuApiClient client)
{
    var workshopRequest = new CreateWorkshopActivityRequest
    {
        Title = "Gemini CLI Magic",
        Description = "A hands-on workshop demonstrating the power of Gemini CLI for developers.",
        ActivityDate = "2025-11-29",
        EventFormat = AdvocuEventFormat.Virtual,
        Country = AdvocuCountry.Uzbekistan,
        Attendees = 150,
        ActivityUrl = "https://gdg.community.dev/events/...",
        Tags = [AdvocuTag.AiGemini, AdvocuTag.BuildWithAi, AdvocuTag.GoogleCloud]
    };

    try
    {
        var response = await client.PostWorkshopActivityAsync(workshopRequest);
        Console.WriteLine($"🎉 Draft created! ID: {response.Id}, Status: {response.Status}");
    }
    catch (ValidationException ex)
    {
        Console.WriteLine($"Oops! details missing: {ex.Message}");
    }
}

Check out the Advocu.Console and Advocu.WebApp projects in this repository for more complete examples!


🛠️ The advocu CLI

Prefer the terminal? The advocu CLI allows you to draft activities without leaving your command line. Perfect for scripting or quick reports!

Configuration

You can pass your API token and URL via flags (--api-token, -u) or, for convenience, set them as environment variables:

  • ADVOCU_API_TOKEN
  • ADVOCU_URL (default: https://api.advocu.com/personal-api/v1/gde/)

Workshops 🎓

Hosted a workshop? Draft it in seconds:

advocu workshop \
  --title "Deep Dive into .NET 10" \
  --description "Advanced workshop on the new features of .NET 10 and C# 14." \
  --date 2025-12-01 \
  --country "Mauritius" \
  --format InPerson \
  --attendees 50 \
  --tags "DotNet" "CloudAppDevelopment" \
  --url "https://meetup.com/..."

Mentorship 🤝

Helping other developers grow? Log your mentoring sessions easily:

advocu mentoring \
  --title "GDE Mentoring Session" \
  --description "One-on-one session helping a startup founder with Google Cloud architecture." \
  --date 2025-12-05 \
  --format Virtual \
  --attendees 1 \
  --tags "GoogleCloud" "Startup"

Available Commands

  • content - Articles, videos, etc.
  • public - Public speaking.
  • workshop - Workshops.
  • mentoring - Mentoring sessions.
  • feedback - Product feedback.
  • interaction - Interaction with Googlers.
  • stories - Success stories.
  • list - Discover available tags, countries, and types.

Feedback & Support ✨

We'd love to hear from you! If you have ideas, find bugs, or just want to say hi, please open an issue in this repository.

License 📜

This project is licensed under the Apache-2.0 License.


Created by Jochen Kirstätter.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.