This is an app developed by Accion Labs for Mangrove and Marine Biodiversity Conservation Foundation of Maharashtra (Mangrove Foundation) (An Autonomous Body under Revenue & Forests Department, Government of Maharashtra)
The app provides an interface for adopting a mangrove. The app can be used directly using the app's URL or can be embedded in a website using the embeddable widget as described below.
To use the app directly, use this URL: https://mangrovedev.github.io/mangrove-certificate/
The app can be embedded in any website by using the following embed code:
<script type="text/javascript" src="https://mangrovedev.github.io/mangrove-certificate/widget.js"></script>
<a class="certificate-registration-widget" href="https://mangrovedev.github.io/mangrove-certificate/">Become a Mangrove Guardian</a>
The repository contains the following files:
File Name | Description |
---|---|
index.html | Main HTML file that is used to generate the app UI |
widget.js | Javascript include file to embed the widget |
code.gs | Google App Script code that needs to be inserted in the Google Spreadsheet |
The entire app is implemented using Google App Script and Google Docs. The following Google Drive folder screenshot provides details of the structure on Google Drive:
![Google Drive Folder Structure](https://mangrovedev.github.io/mangrove-certificate/Google Drive Folder Structure.png)
The following APIs are supported by the App Script:
Method: POST
Parameters:"Full Name","Email Address", "Phone Number", "Country", "State", "City"
Mandatory Parameters:"Full Name", "Email Address"
JSON Response expected:{"result","success"} or {"result":"error","error":"Error Description"}
Method: GET
Parameters: email,oper
email = Email Address as registered in Submit Form API
oper = "generate"
JSON Response expected:
{"data":{"filename":"File Name Generated,"email":"Email Address"},"error":false}
or
{"data":"","error":"Error Description"}
Method: GET
Parameters: email, oper
email = Email Address as registered in Submit Form API
oper = "find"
JSON Response expected:
{"data":{"pdfURL":"URL of PDF file","email":email},"error":false}
or
{"data":"","error":"Error Description"}