Skip to content

Commit

Permalink
API and UI-Web READMEs (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasamonrc authored Sep 3, 2024
1 parent 0b7f9d5 commit 4e26df2
Show file tree
Hide file tree
Showing 15 changed files with 559 additions and 12 deletions.
59 changes: 59 additions & 0 deletions api-csharp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Trinsic API C# Library

[![Version](https://img.shields.io/nuget/v/Trinsic.Api)](https://www.nuget.org/packages/WorkOS.net)
[![Build Status](https://github.com/trinsic-id/sdk/actions/workflows/api-csharp-release.yml/badge.svg)](https://github.com/trinsic-id/sdk/actions?query=branch%main)

The Trinsic API C# library provides convenient access to the Trinsic API from
applications written in C#.

## Documentation

See the [Trinsic docs](https://connect.docs.trinsic.id/docs/) for more detailed information on how to start integrating with our identity acceptance network.

## Installation

There are two main options to install the Trinsic API library.

### Via the NuGet Package Manager

```sh
nuget install Trinsic.Api
```

### Via the .NET Core Command Line Tools

```sh
dotnet add package Trinsic.Api
```

## Usage

The package needs to be configured with your app's access token, which is
available in the [Trinsic Dashboard](https://dashboard.trinsic.id).

```cs
var configuration = new Configuration { AccessToken = "your-access-token" };

var attachments = new AttachmentsApi(configuration);
var network = new NetworkApi(configuration);
var sessions = new SessionsApi(configuration);
```

You can find a full C# example in the [samples](https://github.com/trinsic-id/sdk/tree/main/api-csharp/samples) folder.

## SDK Versioning

Trinsic follows a Semantic Versioning (SemVer) process where all releases will have a version X.Y.Z (like 1.0.0) pattern wherein Z would be a bug fix (e.g., 1.0.1), Y would be a minor release (1.1.0) and X would be a major release (2.0.0). We permit any breaking changes to only be released in major versions and strongly recommend reading changelogs before making any major version upgrades.

## Support

New features and bug fixes are released on the latest major version of the `sdk-csharp-api` package. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.

Any issues, inquiries, and feature requests can be sent to [[email protected]](mailto:[email protected]), or feel free to open a GitHub issue [here](https://github.com/trinsic-id/sdk/issues).

## More Information

- [API Reference](https://connect.docs.trinsic.id/reference)
- [Developer Guide](https://github.com/stripe/stripe-node/wiki/Passing-Options)
- [Our Blog](https://trinsic.id/blog/)
- [Schedule a demo](https://trinsic.id/contact/)
35 changes: 33 additions & 2 deletions api-csharp/build-sdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,44 @@ $additionalProperties = @{
}
& "$PSScriptRoot/../helpers/generate-client.ps1" -language "csharp" -outputFolder "$PSScriptRoot/sdk" -additionalProperties $additionalProperties


# Modify package to include a README.md
$csprojPath = "$PSScriptRoot/sdk/src/Trinsic.Api/Trinsic.Api.csproj"

# Load the XML content of the .csproj file
[xml]$xml = Get-Content $csprojPath

# Create the PackageReadmeFile element
$packageReadmeFileElement = $xml.CreateElement("PackageReadmeFile")
$packageReadmeFileElement.InnerText = "README.md"

# Append the PackageReadmeFile element to the first PropertyGroup
$xml.Project.PropertyGroup.AppendChild($packageReadmeFileElement) | Out-Null

# Create the new ItemGroup element with the README.md inclusion
$itemGroupElement = $xml.CreateElement("ItemGroup")
$noneElement = $xml.CreateElement("None")
$noneElement.SetAttribute("Include", "README.md")
$noneElement.SetAttribute("Pack", "true")
$noneElement.SetAttribute("PackagePath", "")
$itemGroupElement.AppendChild($noneElement) | Out-Null

# Append the new ItemGroup to the Project element
$xml.Project.AppendChild($itemGroupElement) | Out-Null

# Save the modified .csproj file
$xml.Save($csprojPath)

Write-Host "The .csproj file has been successfully modified. Copying now the README.md file to the sdk folder."
Copy-Item "$PSScriptRoot/README.md" "$PSScriptRoot/sdk/src/Trinsic.Api/"

try {
Push-Location "$PSScriptRoot/sdk"
& dotnet restore

dotnet restore
& dotnet build --configuration Release --no-restore
& dotnet pack --configuration Release --no-build --no-restore --include-source --include-symbols -p:SymbolPackageFormat=snupkg --output "$PSScriptRoot/sdk/publish"
}
finally {
Pop-Location
}

58 changes: 58 additions & 0 deletions api-go/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Trinsic API Go Library

[![Go Reference](https://pkg.go.dev/badge/github.com/trinsic-id/sdk-go-api)](https://pkg.go.dev/github.com/trinsic-id/sdk-go-api)
[![Build Status](https://github.com/trinsic-id/sdk/actions/workflows/api-go-release.yml/badge.svg)](https://github.com/trinsic-id/sdk/actions?query=branch%main)

The Trinsic API Go library provides convenient access to the Trinsic API from
applications written in Go.

## Documentation

See the [Trinsic docs](https://connect.docs.trinsic.id/docs/) for more detailed information on how to start integrating with our identity acceptance network.

## Installation

Install the package with:

```sh
go get github.com/trinsic-id/sdk-go-api
```

## Usage

The package needs to be configured with your app's access token, which is
available in the [Trinsic Dashboard](https://dashboard.trinsic.id).

```go
import "github.com/trinsic-id/sdk-go-api"

func main() {
config := trinsic_api.NewConfiguration()
config.AddDefaultHeader("Authorization", "Bearer "+"your-access-token")

api := trinsic_api.NewAPIClient(config)

attachments := api.AttachmentsAPI;
network := api.NetworkAPI;
sessions := api.SessionsAPI;
}
```

You can find a full Go example in the [samples](https://github.com/trinsic-id/sdk/tree/main/api-go/samples) folder.

## SDK Versioning

Trinsic follows a Semantic Versioning (SemVer) process where all releases will have a version X.Y.Z (like 1.0.0) pattern wherein Z would be a bug fix (e.g., 1.0.1), Y would be a minor release (1.1.0) and X would be a major release (2.0.0). We permit any breaking changes to only be released in major versions and strongly recommend reading changelogs before making any major version upgrades.

## Support

New features and bug fixes are released on the latest major version of the `sdk-go-api` package. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.

Any issues, inquiries, and feature requests can be sent to [[email protected]](mailto:[email protected]), or feel free to open a GitHub issue [here](https://github.com/trinsic-id/sdk/issues).

## More Information

- [API Reference](https://connect.docs.trinsic.id/reference)
- [Developer Guide](https://github.com/stripe/stripe-node/wiki/Passing-Options)
- [Our Blog](https://trinsic.id/blog/)
- [Schedule a demo](https://trinsic.id/contact/)
3 changes: 3 additions & 0 deletions api-go/build-sdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ $additionalProperties = @{
& "$PSScriptRoot/../helpers/generate-client.ps1" -language "go" -outputFolder "$PSScriptRoot/sdk-build" -additionalProperties $additionalProperties
try {
Push-Location "$PSScriptRoot/sdk-build"

Copy-Item "$PSScriptRoot/README.md" "$PSScriptRoot/sdk-build/"

$goModFile = "go.mod"
$goModFileContent = Get-Content -Path $goModFile
$goModFileContent = $goModFileContent -replace "/GIT_USER_ID/GIT_REPO_ID", "/trinsic-id/sdk-go-api"
Expand Down
84 changes: 84 additions & 0 deletions api-java/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Trinsic API Java Library

![Version](https://img.shields.io/jitpack/version/com.github.trinsic-id/sdk-java-api)
[![Build Status](https://github.com/trinsic-id/sdk/actions/workflows/api-java-release.yml/badge.svg)](https://github.com/trinsic-id/sdk/actions?query=branch%main)

The Trinsic API Java library provides convenient access to the Trinsic API from
applications written in Java.

## Documentation

See the [Trinsic docs](https://connect.docs.trinsic.id/docs/) for more detailed information on how to start integrating with our identity acceptance network.

## Installation

If you are using maven add the following yout `pom.xml` file:

```xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.github.trinsic-id</groupId>
<artifactId>sdk-java-api</artifactId>
<version>Tag</version>
</dependency>
</dependencies>
```

If you are using gradle:

```
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.trinsic-id:sdk-java-api:Tag'
}
```

## Usage

The package needs to be configured with your app's access token, which is
available in the [Trinsic Dashboard](https://dashboard.trinsic.id).

```java
var apiClient = new ApiClient();

apiClient.setRequestInterceptor(interceptor -> {
interceptor.setHeader("Authorization", "Bearer " + "your-access-token");
});

var attachments = new AttachmentsApi(apiClient);
var network = new NetworkApi(apiClient);
var sessions = new SessionsApi(apiClient);
```

You can find a full Java example in the [samples](https://github.com/trinsic-id/sdk/tree/main/api-java/samples) folder.

## SDK Versioning

Trinsic follows a Semantic Versioning (SemVer) process where all releases will have a version X.Y.Z (like 1.0.0) pattern wherein Z would be a bug fix (e.g., 1.0.1), Y would be a minor release (1.1.0) and X would be a major release (2.0.0). We permit any breaking changes to only be released in major versions and strongly recommend reading changelogs before making any major version upgrades.

## Support

New features and bug fixes are released on the latest major version of the `sdk-java-api` package. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.

Any issues, inquiries, and feature requests can be sent to [[email protected]](mailto:[email protected]), or feel free to open a GitHub issue [here](https://github.com/trinsic-id/sdk/issues).

## More Information

- [API Reference](https://connect.docs.trinsic.id/reference)
- [Developer Guide](https://github.com/stripe/stripe-node/wiki/Passing-Options)
- [Our Blog](https://trinsic.id/blog/)
- [Schedule a demo](https://trinsic.id/contact/)
2 changes: 2 additions & 0 deletions api-java/build-sdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ $additionalProperties = @{
try {
Push-Location "$PSScriptRoot/sdk-build"

Copy-Item "$PSScriptRoot/README.md" "$PSScriptRoot/sdk-build/"

# Remove the auto-generated github action; our PAT doesn't let us push it and we don't need it
Remove-Item -Path ".github/workflows/maven.yml" -Force

Expand Down
57 changes: 57 additions & 0 deletions api-php/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Trinsic API PHP Library

![Version](https://img.shields.io/packagist/v/trinsic/api)
[![Build Status](https://github.com/trinsic-id/sdk/actions/workflows/api-php-release.yml/badge.svg)](https://github.com/trinsic-id/sdk/actions?query=branch%main)

The Trinsic API PHP library provides convenient access to the Trinsic API from
applications written in PHP.

## Documentation

See the [Trinsic docs](https://connect.docs.trinsic.id/docs/) for more detailed information on how to start integrating with our identity acceptance network.

## Installation

Install the package with:

```sh
composer require trinsic/api
```

## Usage

The package needs to be configured with your app's access token, which is
available in the [Trinsic Dashboard](https://dashboard.trinsic.id).

```php
use Trinsic\Api\Api\AttachmentsApi as AttachmentsApi;
use Trinsic\Api\Api\NetworkApi as NetworkApi;
use Trinsic\Api\Api\SessionsApi as SessionsApi;
use Trinsic\Api\Configuration as Configuration;

$config = new Configuration();
$config->setAccessToken("your-access-token");

$attachments = new AttachmentsApi(null, $config);
$network = new NetworkApi(null, $config);
$sessions = new SessionsApi(null, $config);
```

You can find a full PHP example in the [samples](https://github.com/trinsic-id/sdk/tree/main/api-php/samples) folder.

## SDK Versioning

Trinsic follows a Semantic Versioning (SemVer) process where all releases will have a version X.Y.Z (like 1.0.0) pattern wherein Z would be a bug fix (e.g., 1.0.1), Y would be a minor release (1.1.0) and X would be a major release (2.0.0). We permit any breaking changes to only be released in major versions and strongly recommend reading changelogs before making any major version upgrades.

## Support

New features and bug fixes are released on the latest major version of the `trinsic/api` package. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.

Any issues, inquiries, and feature requests can be sent to [[email protected]](mailto:[email protected]), or feel free to open a GitHub issue [here](https://github.com/trinsic-id/sdk/issues).

## More Information

- [API Reference](https://connect.docs.trinsic.id/reference)
- [Developer Guide](https://github.com/stripe/stripe-node/wiki/Passing-Options)
- [Our Blog](https://trinsic.id/blog/)
- [Schedule a demo](https://trinsic.id/contact/)
2 changes: 2 additions & 0 deletions api-php/build-sdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ $additionalProperties = @{
composerPackageName = "trinsic/api"
}
& "$PSScriptRoot/../helpers/generate-client.ps1" -language "php" -outputFolder "$PSScriptRoot/sdk-build" -additionalProperties $additionalProperties

Copy-Item "$PSScriptRoot/README.md" "$PSScriptRoot/sdk-build/"
57 changes: 57 additions & 0 deletions api-python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Trinsic API Python Library

![Version](https://img.shields.io/pypi/v/trinsic-api)
[![Build Status](https://github.com/trinsic-id/sdk/actions/workflows/api-python-release.yml/badge.svg)](https://github.com/trinsic-id/sdk/actions?query=branch%main)

The Trinsic API Python library provides convenient access to the Trinsic API from
applications written in Python

## Documentation

See the [Trinsic docs](https://connect.docs.trinsic.id/docs/) for more detailed information on how to start integrating with our identity acceptance network.

## Installation

Install the package with:

```sh
pip install trinsic-api
```

## Usage

The package needs to be configured with your app's access token, which is
available in the [Trinsic Dashboard](https://dashboard.trinsic.id).

```py
from trinsic_api.api_client import ApiClient
from trinsic_api.api.attachments_api import AttachmentsApi
from trinsic_api.api.network_api import NetworkApi
from trinsic_api.api.sessions_api import SessionsApi

auth_token = "Bearer " + "your-access-token"
api_client = ApiClient(configuration=None, header_name="Authorization", header_value=auth_token)

attachments_api = AttachmentsApi(api_client)
network_api = NetworkApi(api_client)
sessions_api = SessionsApi(api_client)
```

You can find a full Python server example in the [samples](https://github.com/trinsic-id/sdk/tree/main/api-python/samples) folder.

## SDK Versioning

Trinsic follows a Semantic Versioning (SemVer) process where all releases will have a version X.Y.Z (like 1.0.0) pattern wherein Z would be a bug fix (e.g., 1.0.1), Y would be a minor release (1.1.0) and X would be a major release (2.0.0). We permit any breaking changes to only be released in major versions and strongly recommend reading changelogs before making any major version upgrades.

## Support

New features and bug fixes are released on the latest major version of the `trinsic-api` package. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.

Any issues, inquiries, and feature requests can be sent to [[email protected]](mailto:[email protected]), or feel free to open a GitHub issue [here](https://github.com/trinsic-id/sdk/issues).

## More Information

- [API Reference](https://connect.docs.trinsic.id/reference)
- [Developer Guide](https://github.com/stripe/stripe-node/wiki/Passing-Options)
- [Our Blog](https://trinsic.id/blog/)
- [Schedule a demo](https://trinsic.id/contact/)
Loading

0 comments on commit 4e26df2

Please sign in to comment.