Skip to content

Commit f345df6

Browse files
Add support for updating audio block ✨
1 parent 905b134 commit f345df6

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Newtonsoft.Json;
2+
3+
namespace Notion.Client
4+
{
5+
public class AudioUpdateBlock : UpdateBlock, IUpdateBlock
6+
{
7+
[JsonProperty("audio")]
8+
public IFileObjectInput Audio { get; set; }
9+
}
10+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using Newtonsoft.Json;
2+
3+
namespace Notion.Client
4+
{
5+
public class ExternalFileInput : IFileObjectInput
6+
{
7+
[JsonProperty("external")]
8+
public Data External { get; set; }
9+
10+
public class Data
11+
{
12+
[JsonProperty("url")]
13+
public string Url { get; set; }
14+
}
15+
}
16+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace Notion.Client
2+
{
3+
public interface IFileObjectInput
4+
{
5+
}
6+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
using Newtonsoft.Json;
3+
4+
namespace Notion.Client
5+
{
6+
public class UploadedFileInput : IFileObjectInput
7+
{
8+
[JsonProperty("file")]
9+
public Data File { get; set; }
10+
11+
public class Data
12+
{
13+
[JsonProperty("url")]
14+
public string Url { get; set; }
15+
16+
[JsonProperty("expiry_time")]
17+
public DateTime ExpiryTime { get; set; }
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)