This project provides a http client for dotnet to interact with the Figma REST API.
Install the Nuget package from nuget.org or github.com
dotnet add package FigmaDotNetYou have to add a config to your application:
{
"Values": {
"FigmaHttpClient": {
"ApiToken": "###",
"RetryAmount": 5, // optional
"TimeoutMinutes": 5 // optional
}
}
}Check https://help.figma.com/hc/en-us/articles/8085703771159-Manage-personal-access-tokens how to get a personal access token in Figma.
The API token can also be applied via the constructor of the FigmaHttpClient, as well as the retryAmount:
var figmaHttpClient = new FigmaHttpClient(logger, configuration, apiKey: "###", retryAmount: 5);;- Not all endpoints are implemented yet.
- Only .Net 9 is supported.
- Missing documentation.
- Rate limit customization in config.
- Added endpoints for Dev Resources.
- Added
ServiceCollectionExtensionsto extract http client and made it configurable. - The configuration key
FIGMA_API_TOKENhas changed toFigmaHttpClient:ApiToken. - New configuration key
FigmaHttpClient:TimeoutMinuteswas added to configure http service timeout. Default is 5 minutes.
- Extend
FileResponsewithBranchesandDocumentproperties.
- Removed property
InternalNamefromFigmaComponent. - Removed property
InternalNamefromWebhookLibraryUpdatePayload.