Skip to content

Commit 01972fc

Browse files
feat(api): manual updates
1 parent fc781b5 commit 01972fc

File tree

6 files changed

+17
-70
lines changed

6 files changed

+17
-70
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 21
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser%2Fcas-parser-d9763d006969b49a1473851069fdfa429eb13133b64103a62963bb70ddb22305.yml
33
openapi_spec_hash: 6aee689b7a759b12c85c088c15e29bc0
4-
config_hash: 4ab3e1ee76a463e0ed214541260ee12e
4+
config_hash: 5509bb7a961ae2e79114b24c381606d4

README.md

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<!-- x-release-please-end -->
99

10-
The Cas Parser Java SDK provides convenient access to the [Cas Parser REST API](https://docs.casparser.in) from applications written in Java.
10+
The Cas Parser Java SDK provides convenient access to the [Cas Parser REST API](https://casparser.in/docs) from applications written in Java.
1111

1212
It is generated with [Stainless](https://www.stainless.com/).
1313

@@ -22,7 +22,7 @@ Use the Cas Parser MCP Server to enable AI assistants to interact with this API,
2222
2323
<!-- x-release-please-start-version -->
2424

25-
The REST API documentation can be found on [docs.casparser.in](https://docs.casparser.in). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.cas_parser.api/cas-parser-java/0.4.0).
25+
The REST API documentation can be found on [casparser.in](https://casparser.in/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.cas_parser.api/cas-parser-java/0.4.0).
2626

2727
<!-- x-release-please-end -->
2828

@@ -107,10 +107,10 @@ CasParserClient client = CasParserOkHttpClient.builder()
107107

108108
See this table for the available options:
109109

110-
| Setter | System property | Environment variable | Required | Default value |
111-
| --------- | ------------------- | --------------------- | -------- | --------------------------------------------- |
112-
| `apiKey` | `casparser.apiKey` | `CAS_PARSER_API_KEY` | true | - |
113-
| `baseUrl` | `casparser.baseUrl` | `CAS_PARSER_BASE_URL` | true | `"https://portfolio-parser.api.casparser.in"` |
110+
| Setter | System property | Environment variable | Required | Default value |
111+
| --------- | ------------------- | --------------------- | -------- | ---------------------------- |
112+
| `apiKey` | `casparser.apiKey` | `CAS_PARSER_API_KEY` | true | - |
113+
| `baseUrl` | `casparser.baseUrl` | `CAS_PARSER_BASE_URL` | true | `"https://api.casparser.in"` |
114114

115115
System properties take precedence over environment variables.
116116

@@ -382,21 +382,6 @@ CasParserClient client = CasParserOkHttpClient.builder()
382382
.build();
383383
```
384384

385-
### Environments
386-
387-
The SDK sends requests to the production by default. To send requests to a different environment, configure the client like so:
388-
389-
```java
390-
import com.cas_parser.api.client.CasParserClient;
391-
import com.cas_parser.api.client.okhttp.CasParserOkHttpClient;
392-
393-
CasParserClient client = CasParserOkHttpClient.builder()
394-
.fromEnv()
395-
// Other options include `environment2`
396-
.environment1()
397-
.build();
398-
```
399-
400385
### Custom HTTP client
401386

402387
The SDK consists of three artifacts:

buildSrc/src/main/kotlin/cas-parser.publish.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ configure<PublishingExtension> {
1111
pom {
1212
name.set("CAS Parser - Track Portfolios from CDSL, NSDL, CAMS, KFintech")
1313
description.set("API for parsing and analyzing CAS (Consolidated Account Statement) PDF files\nfrom NSDL, CDSL, and CAMS/KFintech, with a unified response format")
14-
url.set("https://docs.casparser.in")
14+
url.set("https://casparser.in/docs")
1515

1616
licenses {
1717
license {

cas-parser-java-client-okhttp/src/main/kotlin/com/cas_parser/api/client/okhttp/CasParserOkHttpClient.kt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -207,23 +207,13 @@ class CasParserOkHttpClient private constructor() {
207207
/**
208208
* The base URL to use for every request.
209209
*
210-
* Defaults to the production environment: `https://portfolio-parser.api.casparser.in`.
211-
*
212-
* The following other environments, with dedicated builder methods, are available:
213-
* - environment_1: `https://client-apis.casparser.in`
214-
* - environment_2: `http://localhost:5000`
210+
* Defaults to the production environment: `https://api.casparser.in`.
215211
*/
216212
fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) }
217213

218214
/** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */
219215
fun baseUrl(baseUrl: Optional<String>) = baseUrl(baseUrl.getOrNull())
220216

221-
/** Sets [baseUrl] to `https://client-apis.casparser.in`. */
222-
fun environment1() = apply { clientOptions.environment1() }
223-
224-
/** Sets [baseUrl] to `http://localhost:5000`. */
225-
fun environment2() = apply { clientOptions.environment2() }
226-
227217
/**
228218
* Whether to call `validate` on every response before returning it.
229219
*

cas-parser-java-client-okhttp/src/main/kotlin/com/cas_parser/api/client/okhttp/CasParserOkHttpClientAsync.kt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -207,23 +207,13 @@ class CasParserOkHttpClientAsync private constructor() {
207207
/**
208208
* The base URL to use for every request.
209209
*
210-
* Defaults to the production environment: `https://portfolio-parser.api.casparser.in`.
211-
*
212-
* The following other environments, with dedicated builder methods, are available:
213-
* - environment_1: `https://client-apis.casparser.in`
214-
* - environment_2: `http://localhost:5000`
210+
* Defaults to the production environment: `https://api.casparser.in`.
215211
*/
216212
fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) }
217213

218214
/** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */
219215
fun baseUrl(baseUrl: Optional<String>) = baseUrl(baseUrl.getOrNull())
220216

221-
/** Sets [baseUrl] to `https://client-apis.casparser.in`. */
222-
fun environment1() = apply { clientOptions.environment1() }
223-
224-
/** Sets [baseUrl] to `http://localhost:5000`. */
225-
fun environment2() = apply { clientOptions.environment2() }
226-
227217
/**
228218
* Whether to call `validate` on every response before returning it.
229219
*

cas-parser-java-core/src/main/kotlin/com/cas_parser/api/core/ClientOptions.kt

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -106,23 +106,15 @@ private constructor(
106106
/**
107107
* The base URL to use for every request.
108108
*
109-
* Defaults to the production environment: `https://portfolio-parser.api.casparser.in`.
110-
*
111-
* The following other environments, with dedicated builder methods, are available:
112-
* - environment_1: `https://client-apis.casparser.in`
113-
* - environment_2: `http://localhost:5000`
109+
* Defaults to the production environment: `https://api.casparser.in`.
114110
*/
115111
fun baseUrl(): String = baseUrl ?: PRODUCTION_URL
116112

117113
fun toBuilder() = Builder().from(this)
118114

119115
companion object {
120116

121-
const val PRODUCTION_URL = "https://portfolio-parser.api.casparser.in"
122-
123-
const val ENVIRONMENT_1_URL = "https://client-apis.casparser.in"
124-
125-
const val ENVIRONMENT_2_URL = "http://localhost:5000"
117+
const val PRODUCTION_URL = "https://api.casparser.in"
126118

127119
/**
128120
* Returns a mutable builder for constructing an instance of [ClientOptions].
@@ -228,23 +220,13 @@ private constructor(
228220
/**
229221
* The base URL to use for every request.
230222
*
231-
* Defaults to the production environment: `https://portfolio-parser.api.casparser.in`.
232-
*
233-
* The following other environments, with dedicated builder methods, are available:
234-
* - environment_1: `https://client-apis.casparser.in`
235-
* - environment_2: `http://localhost:5000`
223+
* Defaults to the production environment: `https://api.casparser.in`.
236224
*/
237225
fun baseUrl(baseUrl: String?) = apply { this.baseUrl = baseUrl }
238226

239227
/** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */
240228
fun baseUrl(baseUrl: Optional<String>) = baseUrl(baseUrl.getOrNull())
241229

242-
/** Sets [baseUrl] to `https://client-apis.casparser.in`. */
243-
fun environment1() = baseUrl(ENVIRONMENT_1_URL)
244-
245-
/** Sets [baseUrl] to `http://localhost:5000`. */
246-
fun environment2() = baseUrl(ENVIRONMENT_2_URL)
247-
248230
/**
249231
* Whether to call `validate` on every response before returning it.
250232
*
@@ -379,10 +361,10 @@ private constructor(
379361
*
380362
* See this table for the available options:
381363
*
382-
* |Setter |System property |Environment variable |Required|Default value |
383-
* |---------|-------------------|---------------------|--------|---------------------------------------------|
384-
* |`apiKey` |`casparser.apiKey` |`CAS_PARSER_API_KEY` |true |- |
385-
* |`baseUrl`|`casparser.baseUrl`|`CAS_PARSER_BASE_URL`|true |`"https://portfolio-parser.api.casparser.in"`|
364+
* |Setter |System property |Environment variable |Required|Default value |
365+
* |---------|-------------------|---------------------|--------|----------------------------|
366+
* |`apiKey` |`casparser.apiKey` |`CAS_PARSER_API_KEY` |true |- |
367+
* |`baseUrl`|`casparser.baseUrl`|`CAS_PARSER_BASE_URL`|true |`"https://api.casparser.in"`|
386368
*
387369
* System properties take precedence over environment variables.
388370
*/

0 commit comments

Comments
 (0)