@technoeren/tdk-api
Advanced tools
Comparing version 0.0.8 to 0.0.9
{ | ||
"name": "@technoeren/tdk-api", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"main": "app.js", | ||
@@ -5,0 +5,0 @@ "author": "technoeren13 <erenbaltaci7878@gmail.com>", |
109
README.md
@@ -15,2 +15,111 @@ # tdk-api | ||
yarn add @technoeren/tdk-api | ||
``` | ||
## Başlama | ||
Paketi tanımlayarak başlıyoruz: | ||
```js | ||
const TDKAPI = require('@technoeren/tdk-api') | ||
const tdkapi = new TDKAPI(); | ||
``` | ||
## Kelime Arama | ||
```js | ||
tdkapi.getWord("esenlik").then(response => { | ||
console.log(response) | ||
}) | ||
``` | ||
Çıktı: | ||
``` | ||
{ | ||
anlamlar: [ | ||
{ | ||
anlam: 'Esen olma durumu, sağlık, afiyet, sıhhat, selamet, hastalık karşıtı', | ||
ornek: 'Kendini böyle sağa sola dağıttıkça tadına varılmaz bir mutluluk, esenlik duyuyordu' | ||
} | ||
], | ||
atasozu_deyim: null | ||
} | ||
``` | ||
## Kelimenin Olup Olmadığını Kontrol Etme | ||
```js | ||
tdkapi.checkWord("esenlik").then(response => { | ||
console.log(response) | ||
}) | ||
``` | ||
Çıktı: | ||
```js | ||
true | ||
``` | ||
```js | ||
tdkapi.checkWord("asdasdasdasd").then(response => { | ||
console.log(response) | ||
}) | ||
``` | ||
Çıktı: | ||
```js | ||
false | ||
``` | ||
## Kelimeden Atasözü Yada Deyim Arama | ||
```js | ||
tdkapi.getProVerbs("keyif").then(response => { | ||
console.log(response) | ||
}) | ||
``` | ||
Çıktı: | ||
``` | ||
{ | ||
proverbs: [ | ||
{ | ||
soz: "keyif benim, köy Mehmet Ağa'nın", | ||
tur: 'Atasözü', | ||
anlam: 'hiçbir şeyi tasa etmiyorum, işlerim yolunda.' | ||
}, | ||
{ | ||
soz: 'keyif çatmak', | ||
tur: 'Deyim', | ||
anlam: "keyfetmek:<i> 'Türkü söylüyorsun, keyif çatıyorsun.' -</i>P. Safa." | ||
}, | ||
{ | ||
soz: 'keyif sormak', | ||
tur: 'Deyim', | ||
anlam: "1) birine 'iyi misiniz, nasılsınız' sorularını yönelterek sağlığı hakkında bilgi almak; 2) saygı göstermek." | ||
}, | ||
{ | ||
soz: 'keyif sürmek', | ||
tur: 'Deyim', | ||
anlam: 'sıkıntısız, rahat yaşamak.' | ||
}, | ||
{ | ||
soz: 'keyif vermek', | ||
tur: 'Deyim', | ||
anlam: "neşe vermek, sarhoş etmek:<i> 'Bize hakaret eden, bize utangaçlık yükleyen bu zincir şarkıları, düşmanın kulağına keyif verecektir.' -</i>R. E. Ünaydın." | ||
} | ||
] | ||
} | ||
``` |
import axios from "axios"; | ||
import { InvalidWord, ValueNotFound } from "./helpers/errors"; | ||
export class TDKAPI { | ||
export default class TDKAPI { | ||
constructor() {} | ||
@@ -6,0 +6,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { TDKAPI } from "./app"; | ||
import TDKAPI from "./app"; | ||
@@ -6,3 +6,3 @@ const api = new TDKAPI(); | ||
async function run() { | ||
await api.getWord("esenlik").then((a) => { | ||
await api.getProVerbs("keyif").then((a) => { | ||
console.log(a); | ||
@@ -9,0 +9,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5865
124