Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs rebuild on OpenAPI Schema changes & SDK #176

Merged
merged 1 commit into from
Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions docs/_snippets/sdk-java-readme.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@


# PanoraSDK Java SDK 1.0.0
A Java SDK for PanoraSDK.

The Panora API description

- API version: 1.0.0
- SDK version: 1.0.0

## Table of Contents
- [Requirements](#requirements)
- [Installation](#installation)
- [Dependencies](#dependencies)
- [Authentication](#authentication)
- [Bearer Authentication](#bearer-authentication)
- [API Endpoint Services](#api-endpoint-services)
- [API Models](#api-models)
- [Testing](#testing)
- [Configuration](#configuration)
- [Sample Usage](#sample-usage)
- [License](#license)

## Requirements

- Java 8
- Maven

## Installation

If you use Maven, place the following within the <dependencies> tag in your pom.xml file:

```XML
<dependency>
<groupId>dev.panora</groupId>
<artifactId>panora-sdk</artifactId>
<version>0.0.1</version>
</dependency>
```

If you use Gradle, paste the next line inside the dependencies block of your build.gradle file:

```Gradle
implementation group: "dev.panora", name: "PanoraSDK", version: "0.0.1"
```

## Authentication

To see whether an endpoint needs a specific type of authentication check the endpoint's documentation.

### Bearer Authentication
The PanoraSDK API uses bearer tokens as a form of authentication. You can set the bearer token when initializing the SDK through the constructor:
```Java
PanoraSDK sdk = new PanoraSDK("YOUR_BEARER_TOKEN");
```

Or through the `setBearerToken` method:
```Java
PanoraSDK sdk = new PanoraSDK();
sdk.setBearerToken("YOUR_BEARER_TOKEN");
```


## API Endpoint Services

All URIs are relative to https://api-demo.panora.dev.

Click the service name for a full list of the service methods.

| Service |
| :------ |
|[MainService](src/main/java/dev/panora/services/README.md#mainservice)|
|[AuthService](src/main/java/dev/panora/services/README.md#authservice)|
|[ConnectionsService](src/main/java/dev/panora/services/README.md#connectionsservice)|
|[WebhookService](src/main/java/dev/panora/services/README.md#webhookservice)|
|[LinkedUsersService](src/main/java/dev/panora/services/README.md#linkedusersservice)|
|[OrganisationsService](src/main/java/dev/panora/services/README.md#organisationsservice)|
|[ProjectsService](src/main/java/dev/panora/services/README.md#projectsservice)|
|[FieldMappingService](src/main/java/dev/panora/services/README.md#fieldmappingservice)|
|[EventsService](src/main/java/dev/panora/services/README.md#eventsservice)|
|[MagicLinkService](src/main/java/dev/panora/services/README.md#magiclinkservice)|
|[PassthroughService](src/main/java/dev/panora/services/README.md#passthroughservice)|
|[CrmContactService](src/main/java/dev/panora/services/README.md#crmcontactservice)|

## API Models
[A list documenting all API models for this SDK](src/main/java/dev/panora//models/README.md#panorasdk-models).

## Testing

Unit tests aren't available yet. When they are, you'll be able to run them with this command:

```Bash
mvn clean test
```

## Configuration

Your SDK may require some configuration changes.


This API is configured to use a security token for authorization. You should edit `examples/src/main/java/dev/panora/examples/Main.java` and paste your own token in place of `PANORASDK_BEARER_TOKEN`.


## Sample Usage

```Java
package dev.panora.examples;

import dev.panora.exceptions.ApiException;
import dev.panora.PanoraSDK;

public class Main {

public static void main(String[] args) {
PanoraSDK client = new PanoraSDK(System.getenv("PANORASDK_BEARER_TOKEN"));
try {
Object response = client.mainService.appControllerGetHello();
System.out.println(response);
} catch(ApiException e) {
e.printStackTrace();
}
}
}

```

Inside this directory is `examples/src/main/java/dev/panora/examples/Main.java`. It's a simple, "hello, world" level program to demonstate this SDK. Run `install.sh` to prepare the SDK for use.

To see what other functions this SDK is capable of, look inside `src/main/java/dev/panora/http/*Client.java`.

## License

License: MIT. See license in LICENSE.

Loading
Loading