Lingara Lingara لارښود لارښودونه API کتابتونونه اپلیکیشنونه جوړول ویب اپلیکیشن
ژبه: پښتو

شرایط او رضایت

دا پاڼه له انګلیسي ژبې ژباړل شوې ده. که دواړه سره توپیر ولري، انګلیسي پاڼه سمه ده. انګلیسي پاڼه ولولئ

ستاسو اپلیکیشن د زده کوونکي په اړه یوازې د شرایطو د ټوټو له لارې پوهېږي. هره ټوټه یو کوچنی ریکارډ دی چې ټاکلې ساحې لري. ستاسو مانیفست هغه ټوټې لېست کوي چې غوښتنه یې کوي، زده کوونکی ستاسو د اپلیکیشن د نصبولو پر مهال له هرې یوې سره موافقه کوي، او Lingara یوه ټوټه یوازې تر هغه لېږي چې دواړه شرطونه لا پاتې وي.

ټوټې

ټوټهساحهڅه لري
languagessource_langهغه ژبه چې زده کوونکی ترې زده کړه کوي، د ژبې د ټګ په توګه لکه en.
target_langهغه ژبه چې زده کوي یې.
levelپه هغې کې یې کچه، له 1 تر 9 پورې، که یې کومه ټاکلې وي.
plan_summaryplan_idد هغه د وروستي لوست پلان پېژند، چې یو پلان له بل څخه بېلوي. ستاسو اپلیکیشن نشي کولی پلان پرې راوړي، ځکه چې ستاسو د اپلیکیشن ټوکن ستاسو خپل حساب لولي، نه د زده کوونکي حساب.
titleد پلان تولید شوی سرلیک، تر 120 تورو زیات نه، که یې ولري.
target_langهغه ژبه چې پلان یې ښيي.
set_countپلان څو سیټونه لري، تر 200 زیات نه.
sets_completedله هغو سیټونو څخه زده کوونکي څو بشپړ کړي دي.
review_duedueاوس څو فلش‌کارتونه د بیاکتنې وخت ته رسېدلي، تر 100000 زیات نه.
learnedهغه څو کلمې زده کړې دي، تر 100000 زیات نه.
tutor_topictopicد ښوونکي سره د هغه وروستۍ خبرې د څه په اړه دي، له 1 تر 120 تورو پورې. دا د یوه پلان له سرلیک یا هغه سکرین څخه راځي چې هغه پرې دی، هېڅکله د هغه له خپلو خبرو څخه نه.

هغه څه چې هېڅ ټوټه یې نه لري

هېڅ ټوټه برېښنالیک پته، نوم، د کارن پېژند یا هغه څه نه لري چې زده کوونکي ټایپ کړي وي. ستاسو اپلیکیشن د غوښتنې له subject څخه پوهېږي چې زده کوونکی څوک دی، چې یو ثابت ارزښت دی او د هر اپلیکیشن لپاره توپیر لري. ستاسو د اپلیکیشن ټوکن ستاسو خپل حساب لولي، هېڅکله د زده کوونکي حساب نه، نو ټوټې هغه ټول څه دي چې ستاسو اپلیکیشن یې د هغه په اړه پوهېږي.

رضایت

  • زده کوونکی ستاسو د اپلیکیشن د نصبولو پر مهال له هرې ټوټې سره موافقه کوي. د هغه څه د بدلولو لپاره چې ورسره یې موافقه کړې، ستاسو اپلیکیشن لرې کوي او بیا یې نصبوي.
  • که خپل مانیفست داسې سم کړئ چې لږې ټوټې وغواړي، هغه ټوټې چې مو لرې کړې سمدستي درېږي.
  • که یې داسې سم کړئ چې ډېرې وغواړي، نوې ټوټې هېڅ زده کوونکي ته نه رسېږي تر څو چې بیا یې نصب نه کړي.
  • Lingara په هره غوښتنه کې بیا رضایت چیکوي، او هره هغه ټوټه غورځوي چې زده کوونکي ورسره موافقه نه وي کړې یا ستاسو مانیفست یې نور نه غواړي. هغه ټوټه چې له خپل ریکارډ سره سمون ونه خوري هم غورځول کېږي، هېڅکله ټوله غوښتنه نه.

لاندې بېلګه خپله کرښه له هغو ټوټو جوړوي چې ورکړل شوې دي او هېڅ API نه رابلي.

د کوډ بېلګې ژبه

TypeScript

// The app's own client reads its owner's account, never the learner's. The
// slices are all a render knows about the learner.
function planLine(request: AppRenderRequest): string {
  let line = "";
  for (const slice of request.context) {
    // A slice is present only when the learner agreed to share it.
    if (slice.kind === "languages") line += `${slice.source_lang} → ${slice.target_lang}. `;
    if (slice.kind === "plan_summary") line += `${slice.sets_completed}/${slice.set_count} sets.`;
  }
  return line;
}

Rust

// The app's own client reads its owner's account, never the learner's. The
// slices are all a render knows about the learner.
/// The learner's target language and, when they shared their plan, its
/// `(sets_completed, set_count)`.
fn shared_plan(request: &AppRenderRequest) -> (String, Option<(u32, u32)>) {
    let (mut target_lang, mut progress) = (String::from("zh"), None);
    for slice in &request.context {
        match slice {
            ContextSlice::Languages(languages) => target_lang = languages.target_lang.clone(),
            ContextSlice::PlanSummary(summary) => progress = Some((summary.sets_completed, summary.set_count)),
            _ => {}
        }
    }
    (target_lang, progress)
}

Go

// The app's own client reads its owner's account, never the learner's.
// The slices are all a render knows about the learner.
//
// Each slice is present only when the learner agreed to share it.
card := lingaraapps.NewCard().Heading("Your plan", 1)
for _, slice := range req.Context {
	switch s := slice.(type) {
	case lingaraapps.ContextSliceLanguages:
		card.Text(fmt.Sprintf("Learning %s from %s", s.TargetLang, s.SourceLang))
	case lingaraapps.ContextSlicePlanSummary:
		card.Text(fmt.Sprintf("%d of %d sets done", s.SetsCompleted, s.SetCount))
	}
}

Java

import com.getlingara.apps.Card;
import com.getlingara.apps.Reply;
import com.getlingara.apps.model.AppRenderRequest;
import com.getlingara.apps.model.ContextSlice;
import com.getlingara.apps.model.ContextSliceLanguages;
import com.getlingara.apps.model.ContextSlicePlanSummary;

// The app's own client reads its owner's account, never the learner's. The slices are all a
// render knows about the learner.
static Reply render(AppRenderRequest request) {
  Card.Builder card = Card.card();
  // A slice is present only when the learner agreed to share it; the context is read-only.
  for (ContextSlice slice : request.getContext()) {
    if (slice instanceof ContextSliceLanguages languages) {
      card.heading("Learning " + languages.targetLang(), 1);
    } else if (slice instanceof ContextSlicePlanSummary summary) {
      card.text(summary.setsCompleted() + " of " + summary.setCount() + " sets done");
    }
  }
  return card.heading("Today", 2).build();
}

Kotlin

import com.getlingara.apps.kotlin.Reply
import com.getlingara.apps.kotlin.card
import com.getlingara.apps.kotlin.model.AppRenderRequest
import com.getlingara.apps.kotlin.model.ContextSliceLanguages
import com.getlingara.apps.kotlin.model.ContextSlicePlanSummary

// The app's own client reads its owner's account, never the learner's. The slices are all a
// render knows about the learner.
fun renderWithContext(request: AppRenderRequest): Reply {
    // A slice is present only when the learner agreed to share it; the context is read-only.
    val languages = request.context.filterIsInstance<ContextSliceLanguages>().firstOrNull()
    val summary = request.context.filterIsInstance<ContextSlicePlanSummary>().firstOrNull()
    return card {
        heading("Learning ${languages?.targetLang ?: "today"}", 1)
        if (summary != null) {
            text("${summary.setsCompleted} of ${summary.setCount} sets done")
        }
    }
}

Ruby

# The app's own client reads its owner's account, never the learner's. The
# slices are all a render knows about the learner.
#
# A slice is present only when the learner agreed to share it.
request.context.filter_map do |slice|
  case slice
  in Lingara::Apps::ContextSliceLanguages(source_lang:, target_lang:)
    "#{source_lang} → #{target_lang}."
  in Lingara::Apps::ContextSlicePlanSummary(sets_completed:, set_count:)
    "#{sets_completed}/#{set_count} sets."
  else nil
  end
end.join(" ")

PHP

use Lingara\Apps\Generated\ContextSliceLanguages;
use Lingara\Apps\Generated\ContextSlicePlanSummary;

function planLine(AppRenderRequest $request): string
{
    // The app's own client reads its owner's account, never the learner's. The
    // slices are all a render knows about the learner.
    $line = '';
    // A slice is present only when the learner agreed to share it.
    foreach ($request->getContext() as $slice) {
        if ($slice instanceof ContextSliceLanguages) {
            $line .= "{$slice->sourceLang} → {$slice->targetLang}. ";
        } elseif ($slice instanceof ContextSlicePlanSummary) {
            $line .= "{$slice->setsCompleted}/{$slice->setCount} sets.";
        }
    }
    return $line;
}

دا هم وګورئ