import 'dart:convert';

import '../../webuntisApi.dart';
import 'getSubjectsResponse.dart';

class GetSubjects extends WebuntisApi {
  GetSubjects() : super('getSubjects', null);

  @override
  Future<GetSubjectsResponse> run() async {
    var rawAnswer = await query(this);
    return finalize(GetSubjectsResponse.fromJson(jsonDecode(rawAnswer)));
  }
}
