mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-22 15:25:19 +00:00
Commit from GitHub Actions (Publish APIs & Clients)
This commit is contained in:
@@ -34,7 +34,9 @@ func (t *QuranService) Summary(request *SummaryRequest) (*SummaryResponse, error
|
|||||||
return rsp, t.client.Call("quran", "Summary", request, rsp)
|
return rsp, t.client.Call("quran", "Summary", request, rsp)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lookup the verses (ayahs) for a chapter
|
// Lookup the verses (ayahs) for a chapter including
|
||||||
|
// translation, interpretation and breakdown by individual
|
||||||
|
// words.
|
||||||
func (t *QuranService) Verses(request *VersesRequest) (*VersesResponse, error) {
|
func (t *QuranService) Verses(request *VersesRequest) (*VersesResponse, error) {
|
||||||
rsp := &VersesResponse{}
|
rsp := &VersesResponse{}
|
||||||
return rsp, t.client.Call("quran", "Verses", request, rsp)
|
return rsp, t.client.Call("quran", "Verses", request, rsp)
|
||||||
@@ -147,7 +149,7 @@ type Verse struct {
|
|||||||
// The unique id of the verse in the whole book
|
// The unique id of the verse in the whole book
|
||||||
Id int32 `json:"id"`
|
Id int32 `json:"id"`
|
||||||
// The interpretations of the verse
|
// The interpretations of the verse
|
||||||
Interpretations []Translation `json:"interpretations"`
|
Interpretations []Interpretation `json:"interpretations"`
|
||||||
// The key of this verse (chapter:verse) e.g 1:1
|
// The key of this verse (chapter:verse) e.g 1:1
|
||||||
Key string `json:"key"`
|
Key string `json:"key"`
|
||||||
// The verse number in this chapter
|
// The verse number in this chapter
|
||||||
@@ -159,7 +161,7 @@ type Verse struct {
|
|||||||
// The basic translation of the verse
|
// The basic translation of the verse
|
||||||
TranslatedText string `json:"translatedText"`
|
TranslatedText string `json:"translatedText"`
|
||||||
// The alternative translations for the verse
|
// The alternative translations for the verse
|
||||||
Translations []Translation `json:"translations"`
|
Translations []Interpretation `json:"translations"`
|
||||||
// The phonetic transliteration from arabic
|
// The phonetic transliteration from arabic
|
||||||
Transliteration string `json:"transliteration"`
|
Transliteration string `json:"transliteration"`
|
||||||
// The individual words within the verse (Ayah)
|
// The individual words within the verse (Ayah)
|
||||||
|
|||||||
@@ -57,5 +57,5 @@
|
|||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"version": "1.0.509"
|
"version": "1.0.510"
|
||||||
}
|
}
|
||||||
@@ -30,7 +30,9 @@ export class QuranService {
|
|||||||
request
|
request
|
||||||
) as Promise<SummaryResponse>;
|
) as Promise<SummaryResponse>;
|
||||||
}
|
}
|
||||||
// Lookup the verses (ayahs) for a chapter
|
// Lookup the verses (ayahs) for a chapter including
|
||||||
|
// translation, interpretation and breakdown by individual
|
||||||
|
// words.
|
||||||
verses(request: VersesRequest): Promise<VersesResponse> {
|
verses(request: VersesRequest): Promise<VersesResponse> {
|
||||||
return this.client.call(
|
return this.client.call(
|
||||||
"quran",
|
"quran",
|
||||||
@@ -85,7 +87,7 @@ export interface Result {
|
|||||||
// The associated arabic text
|
// The associated arabic text
|
||||||
text?: string;
|
text?: string;
|
||||||
// The related translations to the text
|
// The related translations to the text
|
||||||
translations?: Translation[];
|
translations?: Interpretation[];
|
||||||
// The unique verse id across the Quran
|
// The unique verse id across the Quran
|
||||||
verseId?: number;
|
verseId?: number;
|
||||||
// The verse key e.g 1:1
|
// The verse key e.g 1:1
|
||||||
@@ -147,7 +149,7 @@ export interface Verse {
|
|||||||
// The unique id of the verse in the whole book
|
// The unique id of the verse in the whole book
|
||||||
id?: number;
|
id?: number;
|
||||||
// The interpretations of the verse
|
// The interpretations of the verse
|
||||||
interpretations?: Translation[];
|
interpretations?: Interpretation[];
|
||||||
// The key of this verse (chapter:verse) e.g 1:1
|
// The key of this verse (chapter:verse) e.g 1:1
|
||||||
key?: string;
|
key?: string;
|
||||||
// The verse number in this chapter
|
// The verse number in this chapter
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Lookup the verses (ayahs) for a chapter
|
// Lookup the verses (ayahs) for a chapter including
|
||||||
|
// translation, interpretation and breakdown by individual
|
||||||
|
// words.
|
||||||
func GetVersesOfAchapter() {
|
func GetVersesOfAchapter() {
|
||||||
quranService := quran.NewQuranService(os.Getenv("MICRO_API_TOKEN"))
|
quranService := quran.NewQuranService(os.Getenv("MICRO_API_TOKEN"))
|
||||||
rsp, err := quranService.Verses(&quran.VersesRequest{
|
rsp, err := quranService.Verses(&quran.VersesRequest{
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import * as quran from "m3o/quran";
|
import * as quran from "m3o/quran";
|
||||||
|
|
||||||
// Lookup the verses (ayahs) for a chapter
|
// Lookup the verses (ayahs) for a chapter including
|
||||||
|
// translation, interpretation and breakdown by individual
|
||||||
|
// words.
|
||||||
async function GetVersesOfAchapter() {
|
async function GetVersesOfAchapter() {
|
||||||
let quranService = new quran.QuranService(process.env.MICRO_API_TOKEN);
|
let quranService = new quran.QuranService(process.env.MICRO_API_TOKEN);
|
||||||
let rsp = await quranService.verses({
|
let rsp = await quranService.verses({
|
||||||
|
|||||||
Reference in New Issue
Block a user