Plugin Directory


Ignore:
Timestamp:
10/15/2026 07:29:29 PM (3 days ago)
Author:
roxyapi
Message:

Update to version 1.21.0 from GitHub

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roxyapi/trunk/src/Generated/Forms/GetCurrentDashaForm.php

    r3747703 r3749195  
    1919
    2020        public static function spec(): array {
     21                $labels = \RoxyAPI\Generated\FormLabels::for_language( \RoxyAPI\Support\Language::from_locale( determine_locale() ) );
    2122                return array(
    2223                        'operation_id' => 'getCurrentDasha',
    2324                        'title'        => __( 'Current Mahadasha', 'roxyapi' ),
    2425                        'submit_label' => __( 'Get reading', 'roxyapi' ),
    25                         'fold_optional' => true,
     26                        'locations'    => array( array( 'anchor' => 'latitude', 'section' => '', 'id' => '', 'fields' => array( 'latitude' => 'latitude', 'longitude' => 'longitude', 'timezone' => 'timezone' ) ) ),
    2627                        'sections'     => array(
    2728
    … …  
    3031                                array(
    3132                                        'name' => 'date',
    32                                         'label' => __( 'Date', 'roxyapi' ),
     33                                        'label' => $labels['fields']['date'] ?? 'Date',
    3334                                        'required' => true,
    34                                         'help' => __( 'Birth date in YYYY-MM-DD format', 'roxyapi' ),
    3535                                        'type' => 'date',
     36                                        'fold' => false,
    3637                                ),
    3738                                array(
    3839                                        'name' => 'time',
    39                                         'label' => __( 'Time', 'roxyapi' ),
     40                                        'label' => $labels['fields']['time'] ?? 'Time',
    4041                                        'required' => true,
    41                                         'help' => __( 'Birth time in 24-hour HH:MM:SS format', 'roxyapi' ),
    4242                                        'type' => 'time',
     43                                        'fold' => false,
    4344                                ),
    4445                                array(
    4546                                        'name' => 'latitude',
    46                                         'label' => __( 'Latitude', 'roxyapi' ),
     47                                        'label' => $labels['fields']['latitude'] ?? 'Latitude',
    4748                                        'required' => true,
    48                                         'help' => __( 'Birth location latitude in decimal degrees', 'roxyapi' ),
    4949                                        'type' => 'number',
    5050                                        'min' => -90,
    5151                                        'max' => 90,
    5252                                        'step' => 'any',
     53                                        'fold' => false,
    5354                                ),
    5455                                array(
    5556                                        'name' => 'longitude',
    56                                         'label' => __( 'Longitude', 'roxyapi' ),
     57                                        'label' => $labels['fields']['longitude'] ?? 'Longitude',
    5758                                        'required' => true,
    58                                         'help' => __( 'Birth location longitude in decimal degrees', 'roxyapi' ),
    5959                                        'type' => 'number',
    6060                                        'min' => -180,
    6161                                        'max' => 180,
    6262                                        'step' => 'any',
     63                                        'fold' => false,
    6364                                ),
    6465                                array(
    6566                                        'name' => 'timezone',
    66                                         'label' => __( 'Timezone', 'roxyapi' ),
     67                                        'label' => $labels['fields']['timezone'] ?? 'Timezone',
    6768                                        'required' => false,
    6869                                        'help' => __( 'Select the timezone of the location.', 'roxyapi' ),
    6970                                        'type' => 'timezone',
     71                                        'min' => -14,
     72                                        'max' => 14,
     73                                        'default' => 5.5,
     74                                        'fold' => false,
    7075                                ),
    7176                                array(
    7277                                        'name' => 'ayanamsa',
    73                                         'label' => __( 'Ayanamsa', 'roxyapi' ),
     78                                        'label' => $labels['fields']['ayanamsa'] ?? 'Ayanamsa',
    7479                                        'required' => false,
    75                                         'help' => __( 'Ayanamsa system used to place the birth Moon in its nakshatra, which sets every dasha start and end date', 'roxyapi' ),
    7680                                        'type' => 'enum',
    7781                                        'enum' => array( 'kp-newcomb', 'kp-old', 'lahiri', 'raman', 'custom' ),
     82                                        'default' => 'lahiri',
     83                                        'enum_labels' => array( $labels['enums']['ayanamsa.kp-newcomb'] ?? 'Kp newcomb', $labels['enums']['ayanamsa.kp-old'] ?? 'Kp old', $labels['enums']['ayanamsa.lahiri'] ?? 'Lahiri', $labels['enums']['ayanamsa.raman'] ?? 'Raman', $labels['enums']['ayanamsa.custom'] ?? 'Custom' ),
     84                                        'fold' => true,
    7885                                ),
    7986                                array(
    8087                                        'name' => 'ayanamsaValue',
    81                                         'label' => __( 'Ayanamsa value', 'roxyapi' ),
     88                                        'label' => $labels['fields']['ayanamsaValue'] ?? 'Custom ayanamsa value',
    8289                                        'required' => false,
    83                                         'help' => __( 'Custom ayanamsa value in degrees', 'roxyapi' ),
    8490                                        'type' => 'number',
    8591                                        'step' => 'any',
     92                                        'fold' => true,
    8693                                ),
    8794                                array(
    8895                                        'name' => 'significators',
    89                                         'label' => __( 'Significators', 'roxyapi' ),
     96                                        'label' => $labels['fields']['significators'] ?? 'Include KP significators',
    9097                                        'required' => false,
    91                                         'help' => __( 'Set true to attach the KP significators of each period lord: its star lord, sub lord, occupied house, the houses it signifies at levels L1 to L4, and a strength grade', 'roxyapi' ),
    9298                                        'type' => 'text',
     99                                        'default' => false,
     100                                        'fold' => true,
    93101                                ),
    94102                                array(
    95103                                        'name' => 'nodeType',
    96                                         'label' => __( 'Node type', 'roxyapi' ),
     104                                        'label' => $labels['fields']['nodeType'] ?? 'Lunar node type',
    97105                                        'required' => false,
    98                                         'help' => __( 'Lunar node type for Rahu and Ketu, used ONLY when "significators" is true', 'roxyapi' ),
    99106                                        'type' => 'enum',
    100107                                        'enum' => array( 'mean', 'true' ),
     108                                        'default' => 'mean',
     109                                        'enum_labels' => array( $labels['enums']['nodeType.mean'] ?? 'Mean', $labels['enums']['nodeType.true'] ?? 'True' ),
     110                                        'fold' => true,
    101111                                ),
    102112                                array(
    103113                                        'name' => 'datetime',
    104                                         'label' => __( 'Datetime', 'roxyapi' ),
     114                                        'label' => $labels['fields']['datetime'] ?? 'Date and time',
    105115                                        'required' => false,
    106                                         'help' => __( 'ISO 8601 datetime (YYYY-MM-DDTHH:MM:SS) to read the running periods at, for a reading prepared for a future day, a backtest, or a chart cast for a past moment', 'roxyapi' ),
    107116                                        'type' => 'time',
     117                                        'fold' => true,
     118                                ),
     119                                array(
     120                                        'name' => 'focus',
     121                                        'label' => $labels['fields']['focus'] ?? 'Focus',
     122                                        'required' => false,
     123                                        'type' => 'enum',
     124                                        'enum' => array( 'general', 'finance' ),
     125                                        'default' => 'general',
     126                                        'enum_labels' => array( $labels['enums']['focus.general'] ?? 'General', $labels['enums']['focus.finance'] ?? 'Finance' ),
     127                                        'fold' => true,
    108128                                ),
    109129                        ),
    … …  
    116136         */
    117137        public static function call( array $body ) {
    118                 return \RoxyAPI\Generated\Client::getCurrentDasha( $body );
     138                return \RoxyAPI\Generated\Client::getCurrentDasha( array_diff_key( $body, array_flip( array( 'focus' ) ) ), array_intersect_key( $body, array_flip( array( 'focus' ) ) ) );
    119139        }
    120140}
Note: See TracChangeset for help on using the changeset viewer.