API စာရွက်စာတမ်း

Family-Tree.Online ကို သင့်အက်ပ်များတွင် ပေါင်းစည်းပါ။ REST API က မျိုးရိုးသစ်ပင်ဒေတာကို ဖန်တီး၊ ဖတ်၊ အပ်ဒိတ်လုပ်ခွင့်ပေးသည်။

စစ်မှန်ကြောင်းအတည်ပြုခြင်း

API သို့ လုံခြုံသောဝင်ရောက်ခွင့်

API သော့များ

API ဝင်ရောက်ရန် အကောင့်ဆက်တင်များမှ API သော့ လိုအပ်သည်။ သော့ကို Authorization ခေါင်းစီးတွင် ပို့ပါ။

Authorization: Bearer YOUR_API_KEY

API သော့ရယူခြင်း

1. အကောင့်သို့ ဝင်ရောက်ပါ
2. «ဆက်တင်များ» → «API» သို့ သွားပါ
3. API သော့အသစ် ဖန်တီးပါ
4. သော့ကို ကူးယူပြီး လုံခြုံစွာ သိမ်းဆည်းပါ

မျိုးရိုးသစ်ပင်များ

GET
/api/v1/trees

အသုံးပြုသူ၏ မျိုးရိုးသစ်ပင်အားလုံး စာရင်းရယူပါ

limit integer ရွေးချယ်နိုင်သည်
offset integer ရွေးချယ်နိုင်သည်
တောင်းဆိုမှု ဥပမာ:
curl -X GET "https://api.familytreeonline.com/api/v1/trees" \ -H "Authorization: Bearer YOUR_API_KEY"
တုံ့ပြန်မှု ဥပမာ:
{ "data": [ { "id": 1, "name": "Ivanov မိသားစု", "description": "အဓိကမျိုးရိုးသစ်ပင်", "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-20T14:45:00Z" } ], "meta": { "total": 1, "limit": 20, "offset": 0 } }
POST
/api/v1/trees

မျိုးရိုးသစ်ပင်အသစ် ဖန်တီးပါ

name string လိုအပ်သည်
description string ရွေးချယ်နိုင်သည်
တောင်းဆိုမှု ဥပမာ:
curl -X POST "https://api.familytreeonline.com/api/v1/trees" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Petrov မိသားစု", "description": "မျိုးရိုးသစ်ပင်အသစ်" }'

မိသားစုဝင်များ

GET
/api/v1/trees/{tree_id}/humans

သစ်ပင်ရှိ မိသားစုဝင်အားလုံး စာရင်းရယူပါ

tree_id integer လိုအပ်သည်
search string ရွေးချယ်နိုင်သည်
တုံ့ပြန်မှု ဥပမာ:
{ "data": [ { "id": 1, "firstname": "Ivan", "secondname": "Ivanov", "birthday": "1980-05-15", "gender": "male", "is_alive": true, "created_at": "2024-01-15T10:30:00Z" } ], "meta": { "total": 1, "limit": 20, "offset": 0 } }
POST
/api/v1/trees/{tree_id}/humans

မိသားစုဝင်အသစ် ထည့်ပါ

firstname string လိုအပ်သည်
secondname string လိုအပ်သည်
birthday date ရွေးချယ်နိုင်သည်
gender string ရွေးချယ်နိုင်သည်

မိသားစုဆက်ဆံရေးများ

POST
/api/v1/humans/{human_id}/relationships

ဆွေမျိုးများအကြား ဆက်ဆံရေး ဖန်တီးပါ

related_human_id integer လိုအပ်သည်
relationship_type string လိုအပ်သည်

SDK နှင့် စာကြည့်တိုက်များ

လူကြိုက်များသော ပရိုဂရမ်းမင်းဘာသာစကားများအတွက် အဆင်သင့်စာကြည့်တိုက်များ

JavaScript/Node.js

JavaScript နှင့် Node.js အတွက် တရားဝင်စာကြည့်တိုက်။ ဘရောက်ဆာများနှင့် ဆာဗာပတ်ဝန်းကျင်များကို ပံ့ပိုးသည်။

ထည့်သွင်းရန်

Python

အညီအမျှမဟုတ်သော တောင်းဆိုမှုပံ့ပိုးမှုရှိသော Python စာကြည့်တိုက်။ Django နှင့် Flask နှင့် လွယ်ကူစွာ ပေါင်းစည်းနိုင်သည်။

ထည့်သွင်းရန်

PHP

Composer ပံ့ပိုးမှုရှိသော PHP စာကြည့်တိုက်။ Laravel နှင့် Symfony နှင့် ကိုက်ညီသည်။

ထည့်သွင်းရန်

တောင်းဆိုမှုကန့်သတ်ချက်များ

တည်ငြိမ်သော API စွမ်းဆောင်ရည်အတွက် ကန့်သတ်ချက်များ

တောင်းဆိုမှုကန့်သတ်ချက်များ

အကောင့်အမျိုးအစား တစ်မိနစ်လျှင် တောင်းဆိုမှုများ တစ်နေ့လျှင် တောင်းဆိုမှုများ
Basic 60 1,000
Premium 300 10,000
Family 1,000 50,000

မေးလေ့ရှိသောမေးခွန်းများ

ပေါင်းစည်းမှု စတင်ရန် အဆင်သင့်ဖြစ်ပြီလား။

API သော့ရယူပြီး Family-Tree.Online ကို သင့်အက်ပ်များတွင် ပေါင်းစည်းခြင်း စတင်ပါ