Commit 66aa8539 authored by Mahesh Patil's avatar Mahesh Patil
Browse files

[OGD: Added Default Base API URL.]

parent 5e6c0e7f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ and OGD API base url.
This module provides service, using this service any module will able to
access OGD API and get response in JSON format.

* You can get list of OGD API from following URL - https://data.gov.in/ogpl_apis
* You can get list of OGD API from following URL - https://data.gov.in

Example :

+6 −1
Original line number Diff line number Diff line
@@ -45,11 +45,16 @@ class OgdConfigForm extends ConfigFormBase {
      '#required' => TRUE,
      '#default_value' => $config->get('ogd_api_key'),
    ];
    $ogdBaseUrl = $config->get('ogd_base_url');
    if (!isset($ogdBaseUrl)) {
      // Providing Default Value.
      $ogdBaseUrl = "https://api.data.gov.in/resource/";
    }
    $form['ogd']['ogd_base_url'] = [
      '#type' => 'textfield',
      '#title' => $this->t('OGD API Base URL'),
      '#required' => TRUE,
      '#default_value' => $config->get('ogd_base_url'),
      '#default_value' => $ogdBaseUrl,
    ];

    return parent::buildForm($form, $form_state);