List Surah
Ganti YOUR_APIKEY dengan apikey kalian, apikey bisa kalian dapatkan dengan gratis di https://api.darkcoder.xyz
-
Shell (
curl)
curl --request GET \ url 'https://api.darkcoder.xyz/dc/islami/list-surah?apikey=YOUR_APIKEY' -
Nodejs (
axios)
var axios = requires('axios') var options = { method: "GET", url: "https://api.darkcoder.xyz/dc/islami/list-surah", params: { apikey: YOUR_APIKEY } } axios.request(options) .then(result => { console.log(result) }) .catch(error => { console.log(error) }) -
Ruby (
net:http)
require 'uri' require 'net/http' require 'openssl' url = URI("https://api.darkcoder.xyz/dc/islami/list-surah?apikey=YOUR_APIKEY") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body -
Python (
request)
import requests url = "https://api.darkcoder.xyz/dc/islami/list-surah" querystring = {"apikey": "YOUR_APIKEY"} response = requests.request("GET", url, headers=headers, params=querystring) print(response.text) -
GO (
new request)
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.darkcoder.xyz/dc/islami/list-surah?apikey=YOUR_APIKEY" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } -
Java (
ok http)
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.darkcoder.xyz/dc/islami/list-surah?apikey=YOUR_APIKEY") .get() .build(); Response response = client.newCall(request).execute();
.json
{
"status": Number,
"result": {
"1": String,
"2": String,
"3": String,
..............
"114": String
},
"warning": String
}
Surah
Ganti YOUR_APIKEY dengan apikey kalian, apikey bisa kalian dapatkan dengan gratis di https://api.darkcoder.xyz
-
Shell (
curl)
curl --request GET \ url 'https://api.darkcoder.xyz/dc/islami/surah?apikey=YOUR_APIKEY&number=1' -
Nodejs (
axios)
var axios = requires('axios') var options = { method: "GET", url: "https://api.darkcoder.xyz/dc/islami/surah", params: { apikey: "YOUR_APIKEY", number: "1"} } axios.request(options) .then(result => { console.log(result) }) .catch(error => { console.log(error) }) -
Ruby (
net:http)
require 'uri' require 'net/http' require 'openssl' url = URI("https://api.darkcoder.xyz/dc/islami/surah?apikey=YOUR_APIKEY&number=1") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body -
Python (
request)
import requests url = "https://api.darkcoder.xyz/dc/islami/surah" querystring = {"apikey": "YOUR_APIKEY", "number": "1"} response = requests.request("GET", url, headers=headers, params=querystring) print(response.text) -
GO (
new request)
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.darkcoder.xyz/dc/islami/surah?apikey=YOUR_APIKEY&number=1" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } -
Java (
ok http)
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.darkcoder.xyz/dc/islami/surah?apikey=YOUR_APIKEY&number=1") .get() .build(); Response response = client.newCall(request).execute();
.json
{
"name": String,
"name_translations": {
"ar": String,
"en": String,
"id": String
},
"number_of_ayah": Number,
"number_of_surah": Number,
"place": String,
"recitations": [Array],
"type": String,
"verses": [Array],
"tafsir": {
"id": {
"kemenag": {
"name": String,
"source": String,
"text": {
"1": String,
"2": String,
"3": String,
"4": String,
"5": String,
"6": String,
"7": String
}
}
}
}
}
