Changeset 2469342
- Timestamp:
- 02/05/2021 08:29:01 AM (5 years ago)
- Location:
- ebecas/tags/2.2
- Files:
-
- 2 edited
- 6 copied
-
. (copied) (copied from ebecas)
-
tags (copied) (copied from ebecas/tags)
-
trunk (copied) (copied from ebecas/trunk)
-
trunk/admin/Eit_Ebecas_Settings.php (modified) (1 diff)
-
trunk/eit-ebecas.php (copied) (copied from ebecas/trunk/eit-ebecas.php) (3 diffs)
-
trunk/includes (copied) (copied from ebecas/trunk/includes)
-
trunk/includes/Eit_Ebecas_Api.php (modified) (7 diffs)
-
trunk/readme.txt (copied) (copied from ebecas/trunk/readme.txt) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ebecas/tags/2.2/trunk/admin/Eit_Ebecas_Settings.php
r2467512 r2469342 181 181 public function eit_ebecas_field_callback( $arguments ) { 182 182 $value = get_option( $arguments['uid'] ); // Get the current value, if there is one 183 // if ( ! $value ) { // If no value exists184 // // $value = $arguments['default']; // Set to our default185 // }186 183 187 184 switch ( $arguments['type'] ) { -
ebecas/tags/2.2/trunk/eit-ebecas.php
r2467608 r2469342 5 5 Plugin URI: https://ebecas.com.au/wordpress-plugin 6 6 Description: Using this plugin students can submit online application directly from school/college website. Submitted application with student details along with course and other products will be recorded in eBecas for further processing. 7 Version: 2. 017 Version: 2.2 8 8 Requires at least: 5.3 9 9 Requires PHP: 7.0 … … 35 35 define( 'EIT_EBECAS_PLUGIN', __FILE__ ); 36 36 37 define( 'EIT_EBECAS_VERSION', '2. 01' );37 define( 'EIT_EBECAS_VERSION', '2.2' ); 38 38 39 39 define( 'EIT_EBECAS_REQUIRED_WP_VERSION', '5.3' ); … … 63 63 define( 'EIT_EBECAS_URL_EBECAS', 'https://ebecas.com.au/' ); 64 64 65 define( 'EIT_EBECAS_URL_EBECAS_API_BASE_URL', 'https://ebecas.equatorit.net/e BECAS.Portal' );65 define( 'EIT_EBECAS_URL_EBECAS_API_BASE_URL', 'https://ebecas.equatorit.net/ebecas.app/api' ); 66 66 67 67 // eBecas API endpoints are called here -
ebecas/tags/2.2/trunk/includes/Eit_Ebecas_Api.php
r2467512 r2469342 16 16 public $user_name = null; 17 17 public $base_url = null; 18 public $api_version = 'api'; 18 19 // list of endpoints used 20 const ENDPOINT_LOCATION = 'location'; 21 const ENDPOINT_LOOKUP = 'lookup'; 22 const ENDPOINT_PRODUCT = 'product'; 23 const ENDPOINT_FACULTY = 'faculty'; 24 const ENDPOINT_OFFER = 'offer'; // post 19 25 20 26 const PRODUCT_TYPE_COURSE = 'COURSE'; … … 45 51 $this->college_code = get_option( EIT_EBECAS_OPTION_PREFIX . 'college_code' ); 46 52 $this->user_name = get_option( EIT_EBECAS_OPTION_PREFIX . 'user_name' ); 47 $this->base_url = get_option( EIT_EBECAS_OPTION_PREFIX . 'base_url' );53 $this->base_url = rtrim( get_option( EIT_EBECAS_OPTION_PREFIX . 'base_url' ), '/' ); 48 54 } 49 55 … … 93 99 94 100 public function get_locations() { 95 $endpoint = $this->base_url . '/' . $this->api_version . '/location';101 $endpoint = $this->base_url . '/' . self::ENDPOINT_LOCATION; 96 102 $response_body = $this->remote_request( $endpoint ); 97 103 … … 104 110 105 111 public function get_lookup($type) { 106 $endpoint = $this->base_url . '/' . $this->api_version . '/lookup/' . $type;112 $endpoint = $this->base_url . '/' . self::ENDPOINT_LOOKUP . '/' . $type; 107 113 $response_body = $this->remote_request( $endpoint ); 108 114 … … 115 121 116 122 public function get_products( $type = null, $location = null, $faculty = null ) { 117 $endpoint = $this->base_url . '/' . $this->api_version . '/product';123 $endpoint = $this->base_url . '/' . self::ENDPOINT_PRODUCT; 118 124 119 125 if ( $type ) { … … 135 141 136 142 public function get_faculty( $faculty = null, $type = null, $startDate = null, $endDate = null, $weeks = null ) { 137 $endpoint = $this->base_url . '/' . $this->api_version . '/faculty';143 $endpoint = $this->base_url . '/' . self::ENDPOINT_FACULTY; 138 144 139 145 if ( $faculty ) { … … 159 165 160 166 public function create_offer( $offer_data ) { 161 $endpoint = $this->base_url . '/' . $this->api_version . '/offer';167 $endpoint = $this->base_url . '/' . self::ENDPOINT_OFFER; 162 168 $response_body = $this->remote_request( $endpoint, 'POST', $offer_data ); 163 169 -
ebecas/tags/2.2/trunk/readme.txt
r2467608 r2469342 5 5 Requires at least: 5.3 6 6 Tested up to: 5.6 7 Stable tag: 2. 017 Stable tag: 2.2 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 114 114 == Changelog == 115 115 116 = 2.01 = 116 = 2.2 = 117 * Changed default API base URL 118 * Added constants for API endpoints 119 120 = 2.1 = 117 121 * Bug fixed - Load resources (css/js) correctly 118 122
Note: See TracChangeset
for help on using the changeset viewer.