From b9ee77f8153090e9d47e73ab195540d10720c7b6 Mon Sep 17 00:00:00 2001 From: Adelyn Breelove Date: Thu, 10 Jan 2019 13:12:49 -0700 Subject: AAAAAAAAAAAAAAAAAAAAAAAA --- lib/models/attachment.ml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/models/attachment.ml') diff --git a/lib/models/attachment.ml b/lib/models/attachment.ml index cd04da8..9e72f15 100644 --- a/lib/models/attachment.ml +++ b/lib/models/attachment.ml @@ -1,3 +1,9 @@ -module Make(Http : S.Http) = struct - type t = Attachment_t.t -end \ No newline at end of file +type t = { + id: Snowflake.t; + filename: string; + size: int; + url: string; + proxy_url: string; + height: int [@default -1]; + width: int [@default -1]; +} [@@deriving yojson] \ No newline at end of file -- cgit v1.2.3 From b7f8f0de01c5014703376d7204b62d8e47c9179a Mon Sep 17 00:00:00 2001 From: Adelyn Breelove Date: Thu, 10 Jan 2019 16:15:20 -0700 Subject: Fix some deserializing bits --- lib/models/attachment.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/models/attachment.ml') diff --git a/lib/models/attachment.ml b/lib/models/attachment.ml index 9e72f15..5f17a16 100644 --- a/lib/models/attachment.ml +++ b/lib/models/attachment.ml @@ -6,4 +6,4 @@ type t = { proxy_url: string; height: int [@default -1]; width: int [@default -1]; -} [@@deriving yojson] \ No newline at end of file +} [@@deriving yojson { strict = false}] \ No newline at end of file -- cgit v1.2.3 From c5bfc108ca6a1e7a21492b4318de78a74ed801f9 Mon Sep 17 00:00:00 2001 From: Adelyn Breedlove Date: Sun, 13 Jan 2019 16:51:04 -0700 Subject: Add deriving sexp to models --- lib/models/attachment.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/models/attachment.ml') diff --git a/lib/models/attachment.ml b/lib/models/attachment.ml index 5f17a16..c56b389 100644 --- a/lib/models/attachment.ml +++ b/lib/models/attachment.ml @@ -1,3 +1,5 @@ +open Core + type t = { id: Snowflake.t; filename: string; @@ -6,4 +8,4 @@ type t = { proxy_url: string; height: int [@default -1]; width: int [@default -1]; -} [@@deriving yojson { strict = false}] \ No newline at end of file +} [@@deriving sexp, yojson { strict = false}] \ No newline at end of file -- cgit v1.2.3