create method

Future<NotionResponse> create(
  1. Database database
)

Implementation

Future<NotionResponse> create(Database database) async {
  http.Response res = await http.post(
    Uri.https(host, '/$v/$path'),
    body: jsonEncode(database.toJson()),
    headers: {
      'Authorization': 'Bearer $token',
      'Notion-Version': dateVersion,
      'Content-Type': 'application/json',
    },
  );

  return NotionResponse.fromResponse(res);
}