public class OnshapeDesktop extends Object
| Constructor | Description |
|---|---|
OnshapeDesktop(String clientId,
String clientSecret) |
Creates a new instance with given application id.
|
OnshapeDesktop(String clientId,
String clientSecret,
int port) |
Creates a new instance with given application id and port.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
setupClient(BaseClient client) |
Launches browser-based login and sets credentials on the given Onshape
client instance.
|
void |
setupClient(BaseClient client,
OAuthTokenResponse token,
Date tokenReceived) |
Applies previously obtained OAuth token to the given Onshape client
instance.
|
public OnshapeDesktop(String clientId, String clientSecret)
clientId - Client ID of application.clientSecret - Client secret of application.public void setupClient(BaseClient client) throws OnshapeException
client - An Onshape API client instance.OnshapeException - On HTTP, authentication, or serialization,
error.public void setupClient(BaseClient client, OAuthTokenResponse token, Date tokenReceived)
client - An Onshape API client instance.token - An OAuth token previously obtained.tokenReceived - The time at which the token was obtained.Copyright © 2021. All rights reserved.