1.1.2 • Published 10 months ago

@hcapp01/quiz-data v1.1.2

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago
import { createLearner, getQuizFetcher } from '@hcapp01/quiz-data';
import type { SinoContent } from '@hcapp01/quiz-data';

const {learnerId, token} = await createLearner();
const fetcher = await getQuizFetcher(learnerId, token);
if (fetcher) {
  fetcher.moveToNextPhase();
  const progress = fetcher.toJson();
  console.log('fetcher', progress);
  const unit = fetcher.getUnitStatus();
  const quiz = fetcher.getNextQuiz();

  if (quiz) {
    fetcher.submitQuizResult(quiz.content.text, quiz.quizType, Score.Pass);
    saveQuizFetcher(learnerId, token, fetcher);
  }
}
1.1.2

10 months ago

1.1.1

10 months ago

1.1.0

11 months ago

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago