33
loading...
This website collects cookies to deliver better user experience
public FreshBooksClient(
String clientId, String clientSecret, String redirectUri,
String accessToken, String userAgent, Integer timeout
) {
...
client = new FreshBooksClient(
<client_id>, <client_secret>, <url>, null, null, null);
client = new FreshBooksClient(
<client_id>, null, null, <access_token>, null);
client = new FreshBooksClient(
<client_id>, null, null, <access_token>, null, 30);
private FreshBooksClient(FreshBooksClientBuilder builder) {
...
}
public FreshBooksClientBuilder(
String clientId,
String clientSecret,
String redirectUri
) {
...
}
public FreshBooksClientBuilder(String clientId) {
...
}
public FreshBooksClientBuilder withAccessToken(
String accessToken
) {
...
}
public FreshBooksClientBuilder withReadTimeout(
int timeout
) {
...
}
client = new FreshBooksClient.FreshBooksClientBuilder(
<client_id>, <client_secret>, <url>)
.build();
client = new FreshBooksClient.FreshBooksClientBuilder(
<client_id>)
.withAccessToken(<valid token>)
.build();
client = new FreshBooksClient.FreshBooksClientBuilder(
<client_id>)
.withAccessToken(<valid token>)
.withReadTimeout(30)
.build();
def __init__(
self,
client_id: str,
client_secret: Optional[str] = None,
redirect_uri: Optional[str] = None,
access_token: Optional[str] = None,
refresh_token: Optional[str] = None,
user_agent: Optional[str] = None,
timeout: Optional[int] = DEFAULT_TIMEOUT,
auto_retry: bool = True
):
client = Client(
<client_id>,
client_secret=<client_secret>,
redirect_uri=<url>
)
client = Client(
<client_id>,
access_token=<valid token>
)
client = Client(
<client_id>,
access_token=<valid token>,
timeout=30
)
export interface Options {
retryOptions?: IAxiosRetryConfig
userAgent?: string
}
constructor(clientId: string, token: string, options?: Options) {
const defaultRetry = {
retries: 10,
retryDelay: axiosRetry.exponentialDelay,
retryCondition: APIClient.isNetworkRateLimitOrIdempotentRequestError,
}
const { retryOptions = defaultRetry } = options || {}