Skip to content

Commit 779f78c

Browse files
hogan-yuanclaude
andcommitted
refactor: rename macrodata -> macroeconomic in all interfaces and types
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent ebb624b commit 779f78c

20 files changed

Lines changed: 153 additions & 153 deletions

java/javasrc/src/main/java/com/longbridge/SdkNative.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,11 @@ public static native void fundamentalContextGetFinancialReportSnapshot(long cont
451451
Object opts,
452452
AsyncCallback callback);
453453

454-
public static native void fundamentalContextMacrodataIndicators(long context,
454+
public static native void fundamentalContextMacroeconomicIndicators(long context,
455455
Object country, Object offset, Object limit,
456456
AsyncCallback callback);
457457

458-
public static native void fundamentalContextMacrodata(long context,
458+
public static native void fundamentalContextMacroeconomic(long context,
459459
Object indicatorCode, Object startTime, Object endTime, Object offset, Object limit,
460460
AsyncCallback callback);
461461

java/javasrc/src/main/java/com/longbridge/fundamental/FundamentalContext.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,19 +339,19 @@ public CompletableFuture<ValuationComparisonResponse> getValuationComparison(Val
339339
* List macroeconomic indicators.
340340
* country: ISO country code string (e.g. "US", "CN", "EU"); pass null for all countries.
341341
*/
342-
public CompletableFuture<MacrodataIndicatorListResponse> getMacrodataIndicators(String country, Integer offset, Integer limit) throws OpenApiException {
342+
public CompletableFuture<MacroeconomicIndicatorListResponse> getMacroeconomicIndicators(String country, Integer offset, Integer limit) throws OpenApiException {
343343
return AsyncCallback.executeTask((callback) -> {
344-
SdkNative.fundamentalContextMacrodataIndicators(raw, country, offset, limit, callback);
344+
SdkNative.fundamentalContextMacroeconomicIndicators(raw, country, offset, limit, callback);
345345
});
346346
}
347347

348348
/**
349349
* Get historical data for a macroeconomic indicator.
350350
* startDate and endDate are date strings in "YYYY-MM-DD" format.
351351
*/
352-
public CompletableFuture<MacrodataResponse> getMacrodata(String indicatorCode, String startDate, String endDate, Integer offset, Integer limit) throws OpenApiException {
352+
public CompletableFuture<MacroeconomicResponse> getMacroeconomic(String indicatorCode, String startDate, String endDate, Integer offset, Integer limit) throws OpenApiException {
353353
return AsyncCallback.executeTask((callback) -> {
354-
SdkNative.fundamentalContextMacrodata(raw, indicatorCode, startDate, endDate, offset, limit, callback);
354+
SdkNative.fundamentalContextMacroeconomic(raw, indicatorCode, startDate, endDate, offset, limit, callback);
355355
});
356356
}
357357
}

java/javasrc/src/main/java/com/longbridge/fundamental/MacrodataIndicatorListResponse.java

Lines changed: 0 additions & 8 deletions
This file was deleted.

java/javasrc/src/main/java/com/longbridge/fundamental/MacrodataResponse.java

Lines changed: 0 additions & 9 deletions
This file was deleted.

java/javasrc/src/main/java/com/longbridge/fundamental/Macrodata.java renamed to java/javasrc/src/main/java/com/longbridge/fundamental/Macroeconomic.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.longbridge.fundamental;
22

33
/** One historical data point for a macroeconomic indicator. */
4-
public class Macrodata {
4+
public class Macroeconomic {
55
/** Statistical period (e.g. 2024-Q1, 2024-03). */
66
public String period;
77
public String releaseAt;

java/javasrc/src/main/java/com/longbridge/fundamental/MacrodataIndicator.java renamed to java/javasrc/src/main/java/com/longbridge/fundamental/MacroeconomicIndicator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.longbridge.fundamental;
22

33
/** Metadata for one macroeconomic indicator. */
4-
public class MacrodataIndicator {
4+
public class MacroeconomicIndicator {
55
/** External vendor code (input to getEconomicIndicator). */
66
public String indicatorCode;
77
public String sourceOrg;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.longbridge.fundamental;
2+
3+
/** Response for {@link FundamentalContext#getMacroeconomicIndicators}. */
4+
public class MacroeconomicIndicatorListResponse {
5+
public MacroeconomicIndicator[] data;
6+
/** Total number of indicators matching the query. */
7+
public int count;
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.longbridge.fundamental;
2+
3+
/** Response for {@link FundamentalContext#getMacroeconomic}. */
4+
public class MacroeconomicResponse {
5+
public MacroeconomicIndicator info;
6+
public Macroeconomic[] data;
7+
/** Total number of historical data points. */
8+
public int count;
9+
}

java/src/fundamental_context.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ pub unsafe extern "system" fn Java_com_longbridge_SdkNative_fundamentalContextVa
264264
}
265265

266266
#[unsafe(no_mangle)]
267-
pub unsafe extern "system" fn Java_com_longbridge_SdkNative_fundamentalContextMacrodataIndicators(
267+
pub unsafe extern "system" fn Java_com_longbridge_SdkNative_fundamentalContextMacroeconomicIndicators(
268268
mut env: JNIEnv,
269269
_class: JClass,
270270
context: i64,
@@ -277,7 +277,7 @@ pub unsafe extern "system" fn Java_com_longbridge_SdkNative_fundamentalContextMa
277277
let context = &*(context as *const ContextObj);
278278
let country: Option<String> = FromJValue::from_jvalue(env, country.into())?;
279279
let country = country.and_then(|s| {
280-
use longbridge::fundamental::MacrodataCountry::*;
280+
use longbridge::fundamental::MacroeconomicCountry::*;
281281
match s.as_str() {
282282
"HK" | "Hong Kong SAR China" => Some(HongKong),
283283
"CN" | "China (Mainland)" => Some(China),
@@ -293,15 +293,15 @@ pub unsafe extern "system" fn Java_com_longbridge_SdkNative_fundamentalContextMa
293293
async_util::execute(env, callback, async move {
294294
Ok(context
295295
.ctx
296-
.macrodata_indicators(country, offset, limit)
296+
.macroeconomic_indicators(country, offset, limit)
297297
.await?)
298298
})?;
299299
Ok(())
300300
})
301301
}
302302

303303
#[unsafe(no_mangle)]
304-
pub unsafe extern "system" fn Java_com_longbridge_SdkNative_fundamentalContextMacrodata(
304+
pub unsafe extern "system" fn Java_com_longbridge_SdkNative_fundamentalContextMacroeconomic(
305305
mut env: JNIEnv,
306306
_class: JClass,
307307
context: i64,
@@ -322,7 +322,7 @@ pub unsafe extern "system" fn Java_com_longbridge_SdkNative_fundamentalContextMa
322322
async_util::execute(env, callback, async move {
323323
Ok(context
324324
.ctx
325-
.macrodata(indicator_code, start_date, end_date, offset, limit)
325+
.macroeconomic(indicator_code, start_date, end_date, offset, limit)
326326
.await?)
327327
})?;
328328
Ok(())

java/src/types/classes.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2705,8 +2705,8 @@ impl_java_class!(
27052705
);
27062706

27072707
impl_java_class!(
2708-
"com/longbridge/fundamental/MacrodataIndicator",
2709-
longbridge::fundamental::MacrodataIndicator,
2708+
"com/longbridge/fundamental/MacroeconomicIndicator",
2709+
longbridge::fundamental::MacroeconomicIndicator,
27102710
[
27112711
indicator_code,
27122712
source_org,
@@ -2738,8 +2738,8 @@ impl_java_class!(
27382738
);
27392739

27402740
impl_java_class!(
2741-
"com/longbridge/fundamental/MacrodataIndicatorListResponse",
2742-
longbridge::fundamental::MacrodataIndicatorListResponse,
2741+
"com/longbridge/fundamental/MacroeconomicIndicatorListResponse",
2742+
longbridge::fundamental::MacroeconomicIndicatorListResponse,
27432743
[
27442744
#[java(objarray)]
27452745
data,
@@ -2748,8 +2748,8 @@ impl_java_class!(
27482748
);
27492749

27502750
impl_java_class!(
2751-
"com/longbridge/fundamental/MacrodataResponse",
2752-
longbridge::fundamental::MacrodataResponse,
2751+
"com/longbridge/fundamental/MacroeconomicResponse",
2752+
longbridge::fundamental::MacroeconomicResponse,
27532753
[
27542754
info,
27552755
#[java(objarray)]

0 commit comments

Comments
 (0)