Plugin Directory

Changeset 2469342


Ignore:
Timestamp:
02/05/2021 08:29:01 AM (5 years ago)
Author:
janorkar
Message:

Tagging Version 2.2

Location:
ebecas/tags/2.2
Files:
2 edited
6 copied

Legend:

Unmodified
Added
Removed
  • ebecas/tags/2.2/trunk/admin/Eit_Ebecas_Settings.php

    r2467512 r2469342  
    181181        public function eit_ebecas_field_callback( $arguments ) {
    182182            $value = get_option( $arguments['uid'] ); // Get the current value, if there is one
    183             // if ( ! $value ) {                   // If no value exists
    184             //  // $value = $arguments['default']; // Set to our default
    185             // }
    186183
    187184            switch ( $arguments['type'] ) {
  • ebecas/tags/2.2/trunk/eit-ebecas.php

    r2467608 r2469342  
    55Plugin URI: https://ebecas.com.au/wordpress-plugin
    66Description: 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.01
     7Version: 2.2
    88Requires at least: 5.3
    99Requires PHP: 7.0
     
    3535define( 'EIT_EBECAS_PLUGIN', __FILE__ );
    3636
    37 define( 'EIT_EBECAS_VERSION', '2.01' );
     37define( 'EIT_EBECAS_VERSION', '2.2' );
    3838
    3939define( 'EIT_EBECAS_REQUIRED_WP_VERSION', '5.3' );
     
    6363define( 'EIT_EBECAS_URL_EBECAS', 'https://ebecas.com.au/' );
    6464
    65 define( 'EIT_EBECAS_URL_EBECAS_API_BASE_URL', 'https://ebecas.equatorit.net/eBECAS.Portal' );
     65define( 'EIT_EBECAS_URL_EBECAS_API_BASE_URL', 'https://ebecas.equatorit.net/ebecas.app/api' );
    6666
    6767// eBecas API endpoints are called here
  • ebecas/tags/2.2/trunk/includes/Eit_Ebecas_Api.php

    r2467512 r2469342  
    1616        public $user_name = null;
    1717        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
    1925
    2026        const PRODUCT_TYPE_COURSE = 'COURSE';
     
    4551            $this->college_code = get_option( EIT_EBECAS_OPTION_PREFIX . 'college_code' );
    4652            $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' ), '/' );
    4854        }
    4955
     
    9399
    94100        public function get_locations() {
    95             $endpoint      = $this->base_url . '/' . $this->api_version . '/location';
     101            $endpoint = $this->base_url . '/' . self::ENDPOINT_LOCATION;
    96102            $response_body = $this->remote_request( $endpoint );
    97103
     
    104110
    105111        public function get_lookup($type) {
    106             $endpoint      = $this->base_url . '/' . $this->api_version . '/lookup/' . $type ;
     112            $endpoint = $this->base_url . '/' . self::ENDPOINT_LOOKUP . '/' . $type;
    107113            $response_body = $this->remote_request( $endpoint );
    108114
     
    115121
    116122        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;
    118124
    119125            if ( $type ) {
     
    135141
    136142        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;
    138144
    139145            if ( $faculty ) {
     
    159165
    160166        public function create_offer( $offer_data ) {
    161             $endpoint = $this->base_url . '/' . $this->api_version . '/offer';
     167            $endpoint = $this->base_url . '/' . self::ENDPOINT_OFFER;
    162168            $response_body =  $this->remote_request( $endpoint, 'POST', $offer_data );
    163169
  • ebecas/tags/2.2/trunk/readme.txt

    r2467608 r2469342  
    55Requires at least: 5.3
    66Tested up to: 5.6
    7 Stable tag: 2.01
     7Stable tag: 2.2
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    114114== Changelog ==
    115115
    116 = 2.01 =
     116= 2.2 =
     117* Changed default API base URL
     118* Added constants for API endpoints
     119
     120= 2.1 =
    117121* Bug fixed - Load resources (css/js) correctly
    118122
Note: See TracChangeset for help on using the changeset viewer.