Skip to content

RendleLabs/Moostodon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moostodon

This repo contains a demonstration of using CADL to describe the Mastodon API and then using Kiota to generate API clients from the OpenAPI emitted from the CADL compiler.

Getting Started

Everything you need to get started designing APIs in CADL can be found in the CADL documentation. If you are looking to generate API clients from OpenAPI, you can find the documentation for Kiota here.

Running the demo

To regenerate the OpenAPI from the CADL you will need to have the CADL compiler installed. You can find instructions for installing the CADL compiler here.

From the spec directory, run the following command to generate the OpenAPI document:

cadl compile ./main.cadl

To generate the API clients, you will need to have Kiota installed. You can find instructions for installing Kiota here.

From the csharpMastodonConsole folder within the clients folder, run the following command to generate the API client:

kiota generate -l csharp  -o .\sdk -d ..\..\spec\cadl-output\openapi.json -c MastodonClient -n MastodonClientLib --co

Currently there is a minimal set of example calls in the program.cs file. You can run this using:

dotnet restore
dotnet build
dotnet run

[Moose with Canadian flag]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 26.5%
  • Python 26.1%
  • TypeScript 24.6%
  • JavaScript 21.5%
  • PowerShell 1.2%
  • Batchfile 0.1%