Skip to content

Instantly share code, notes, and snippets.

View Rizwan-Hasan's full-sized avatar
🌏
Working remotely

Rizwan Hasan Rizwan-Hasan

🌏
Working remotely
View GitHub Profile
{
"nickname": null
}
{
"answer": true
}
{
"students": [
"Rizwan",
"Sakib",
"Natsu"
]
}
{
"student": {
"name": "Rizwan Hasan",
"age": 21,
"sex": "Male"
}
}
{
"age": 20
}
{
"name": "Rizwan Hasan"
}
/*
Used module from https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple/1.1.1
*/
import org.json.simple.JSONArray
import org.json.simple.JSONObject
import org.json.simple.parser.JSONParser
import java.net.URL
import java.nio.charset.Charset
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Total Download</title>
</head>
<body>
<p style="font-size: 500%; text-align: center">Total Downloads:</p>
<p id="download" style="font-size:1000%; text-align: center"></p>
<script type="text/javascript">
/*
Filename: GitApi.java
Used module from https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple/1.1.1
*/
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import requests
def main():
userName: str = 'magpie-robins' # User name of the repository
repoName: str = 'gpa-calculator-android' # Repository name
releaseTag: str = 'latest' # Using tag 'latest' for latest released download count
url: str = "https://api.github.com/repos/{0}/{1}/releases/{2}" # API URL
response = requests.get(url.format(userName, repoName, releaseTag)) # Sending HTTP GET request on API URL
data: dict = response.json() # Converting received data to JSON format
# The JSON file contains huge data about that release.