How to hide my api key from api-football? - javascript

I am building a small football app. For this, I am using custom widgets from api-football.com and used my api-key to fetch the data. Fortunately, it works and I get the standings table. Now, I want to hide my api-key which is directly used in the html file.
Code
View
I tried for several days, watched many tutorials, even used netlify serverless functions. But I couldn't hide the api key.

Related

PowerApps SharePoint Online - call JavaScript code

I have a custom form for a new item in SharePoint list. I added a javascript code (JSOM) to create a folder and SPGroup with the info given in the form. This is working in classic view, but when I change to the 'new experience' view a PowerApp form is shown to enter new item. So, how I can do the same functionality for SharePoint online using PowerApps? do I have to use Azure functions? or would be better to create a SharePoint Add-ins?. I was reading some info and looks like PowerApps does not allow to add a link to the js file.
After some days of research and testing I ended up with some useful links to create functions on Azure with CSOM and call them from Flow using HTTP Actions. I think this is the way how to create workflows in SharePoint Online, since Flow has limited actions to work with SharePoint Groups, permissions, Libraries.
azure-functions-csom
azure-function-flow
You can also create a custom API for your Azure function and use that API directly in powerapps (through adding a data source). Azure provides features to generate swagger definition and exporting the generated file to powerapps/flow.

Read Google App Script Files from another script

I am looking to create a little Google App Script to parse another GAS file to pull out the functions and any jsdoc type comments, and then display it.
Like if you navigate to a script you can get the revision history etc, but I wanted to be able to pass in a Drive folder containing multiple script files and develop a front end to display each's content.
I know about the Google Drive REST API with exportLinks do download as JSON.
I wondered if there was a simpler way to do it from another GAS file, or would I need to URLFetch of some description to do it over the RestAPI?
I have tried searching for similar things but they always lead back to the DriveAPI.
Any help with a starting place, or what GAS Objects I should start looking at?
Thank you
You have to use the REST based Drive API, there is really no other alternative. However, you don't need to use URLFetch to access it. Google Apps Script has what's known as Advance Google Services a collection of interfaces that grant native access to many REST based APIS including the Drive API.
You can check out the Drive specific documentation here. Its somewhat sparse, so you'll often have to fall back on the REST based documentation as well as rely on autocomplete inside the script editor to make sense of things.

App script to insert Google Form data into Cloud SQL table (Google Developer's Console)

I am very new to Java and scripts in general, but I am trying to create an app that takes the data from a sites.google website form and places the data into a table within Cloud SQL.
I have successfully created 3 tables (linked with foreign keys) in a database within a Cloud SQL instance on Google's developer console.
The entries in the form correspond to the different headers in the database table, so the data should drop into the appropriate column.
I have tried many of the quickstart and other tutorials within the developer's console documentation links and on the web, but none of them really help me with what I am trying to accomplish..
I have been playing around with code in scripts.google, but haven't really gotten anywhere. Because I am unfamiliar with scripts, I don't know whether I should be using JavaScripts, PHP, python. I've seen tutorials using eclipse and maven but have not been successful/found them helpful.
Hoping someone can steer me in the right direction..
Any feedback or examples I can refer to would be greatly appreciated!

Google Maps API with a Django Website

I am building a small website and am using the Django framework for my development. Parts of the site also includes using Google Maps APIs (V3), which includes using MySQL to add and save marker information as shown within the official Google documentation here: https://developers.google.com/maps/articles/phpsqlinfo_v3
I have the basic maps working fine with being able to add a marker when it is clicked, but am having difficulties to get it to work since trying to implement the MySQL into it - the map does not load within the canvas on the page. I have copied the code exactly from the link above just to see if i could get it working basic but no joy.
Before I go posting up snippets of code here and there, I'm just wondering if maybe there might be a problem in the MySQL working within the Django development - I have a MySQL database synced with Django and have it running.
If there is any other way around getting markers and information to save to a map, like the example above, it would be great but I cant find anything anywhere.
I also looked at this guide but with similar results:
http://www.sanwebe.com/2013/10/google-map-v3-editing-saving-marker-in-database

How can I get a client location using the Google Map (Geocoding) Javascript API using pure javascript?

There are plenty of examples all over the internet, including stakoverflow, of getting location information. But every single one that I find uses HTML to include the library (<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=true"></script>) and display the information. I need to get the client location from a script, not a web page. I just need to get the location information - I don't need to display it. No HTNML - just javascript.
I've tried several of the examples found on this site, but they all use the navigator.geolocation or google.maps classes, neither of which are recognized by Google Scripting. I've tried to include a resource, but maps nor navigator or any of the required APIs are in the list. I've even attempted to find a RESTful way to use the API and get a JSON response; found nothing even close.
The example used in several places is this one on developers.google.com, including several appearances in stackoverflow like this one.
I suppose it could be a very "newbie" issue, but I'm flummoxed!

Categories